mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 16:27:45 +00:00
1 parent
7be5379b59
commit
48a66e6e9e
7 files changed
+110
-134
No files matched your search
@@ -18,8 +18,7 @@ import com.cricketcraft.chisel.inventory.ContainerPresent;
|
||||
import com.cricketcraft.chisel.inventory.InventoryChiselSelection;
|
||||
import com.cricketcraft.chisel.proxy.CommonProxy;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
import com.cricketcraft.chisel.world.GeneratorLimestone;
|
||||
import com.cricketcraft.chisel.world.GeneratorMarble;
|
||||
import com.cricketcraft.chisel.world.GeneratorChisel;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
@@ -177,8 +176,11 @@ public class Chisel
|
||||
});
|
||||
|
||||
|
||||
GameRegistry.registerWorldGenerator(new GeneratorMarble(ModBlocks.marble, 32, Configurations.marbleAmount), 1000);
|
||||
GameRegistry.registerWorldGenerator(new GeneratorLimestone(ModBlocks.limestone, 32, Configurations.limestoneAmount), 1000);
|
||||
GameRegistry.registerWorldGenerator(new GeneratorChisel(ModBlocks.marble, 32, Configurations.marbleAmount), 1000);
|
||||
GameRegistry.registerWorldGenerator(new GeneratorChisel(ModBlocks.limestone, 32, Configurations.limestoneAmount), 1000);
|
||||
GameRegistry.registerWorldGenerator(new GeneratorChisel(ModBlocks.andesite, 32, Configurations.andesiteAmount), 1000);
|
||||
GameRegistry.registerWorldGenerator(new GeneratorChisel(ModBlocks.granite, 32, Configurations.graniteAmount), 1000);
|
||||
GameRegistry.registerWorldGenerator(new GeneratorChisel(ModBlocks.diorite, 32, Configurations.dioriteAmount), 1000);
|
||||
|
||||
if (event.getSide() == Side.CLIENT) {
|
||||
initModIntegration();
|
||||
|
||||
@@ -22,6 +22,9 @@ public class Configurations
|
||||
public static int particlesTickrate;
|
||||
public static int marbleAmount;
|
||||
public static int limestoneAmount;
|
||||
public static int graniteAmount;
|
||||
public static int dioriteAmount;
|
||||
public static int andesiteAmount;
|
||||
|
||||
public static double concreteVelocity;
|
||||
|
||||
@@ -38,6 +41,9 @@ public class Configurations
|
||||
allowMossy = config.get("general", "allowCobbleToMossyInChisel", true).getBoolean(true);
|
||||
marbleAmount = config.get("worldgen", "marbleAmount", 7, "Amount of marble to generate in the world; use 0 for none").getInt(7);
|
||||
limestoneAmount = config.get("worldgen", "limestoneAmount", 8, "Amount of limestone to generate in the world; use 0 for none").getInt(8);
|
||||
graniteAmount = config.get("worldgen", "graniteAmount", 8, "Amount of granite to generate in the world; use 0 for none.").getInt(8);
|
||||
dioriteAmount = config.get("worldgen", "dioriteAmount", 8, "Amount of diorite to generate in the world; use 0 for none.").getInt(8);
|
||||
andesiteAmount = config.get("worldgen", "andesiteAmount", 8, "Amount of andesite to generate in the world; use 0 for none.").getInt(8);
|
||||
chiselRecipe = config.get("general", "chiselAlternateRecipe", false, "Use alternative crafting recipe for the chisel").getBoolean(false);
|
||||
autoChisel = config.get("general", "autoChisel", true, "Should people be allowed to use the auto chisel").getBoolean(true);
|
||||
enableFMP = config.get("general", "enableFMP", true, "Do you want to enable FMP").getBoolean(true);
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.cricketcraft.chisel.compat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.cricketcraft.chisel.compat.ModIntegration.IModIntegration;
|
||||
import com.cricketcraft.chisel.init.ModBlocks;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class FMPIntegration implements IModIntegration{
|
||||
@Override
|
||||
@@ -76,8 +74,6 @@ public class FMPIntegration implements IModIntegration{
|
||||
registerMaterial(ModBlocks.factory, 0, 12);
|
||||
registerMaterial(ModBlocks.factory, 14, 14);
|
||||
registerMaterial(ModBlocks.stainedGlass[0]); //White
|
||||
registerMaterial(ModBlocks.stainedGlass[8]); //Light Gray
|
||||
registerMaterial(ModBlocks.stainedGlass[12]); //Brown
|
||||
registerMaterial(ModBlocks.woolenClay);
|
||||
registerMaterial(ModBlocks.laboratory, 2, 3);
|
||||
registerMaterial(ModBlocks.laboratory, 5, 12);
|
||||
|
||||
@@ -103,6 +103,11 @@ public class ModBlocks {
|
||||
public static BlockCarvableGlass[] stainedGlass = new BlockCarvableGlass[4];
|
||||
public static BlockCarvablePane[] stainedGlassPane = new BlockCarvablePane[8];
|
||||
|
||||
//1.8 or at least so you thing :P
|
||||
public static BlockCarvable granite, polishedGranite;
|
||||
public static BlockCarvable diorite, polishedDiorite;
|
||||
public static BlockCarvable andesite, polishedAndesite;
|
||||
|
||||
public static void load()
|
||||
{
|
||||
Blocks.stone.setHarvestLevel("chisel", 0);
|
||||
@@ -1685,6 +1690,82 @@ public class ModBlocks {
|
||||
Carving.chisel.addVariation("quartz", Blocks.quartz_block, 2, 0);
|
||||
Carving.chisel.registerOre("quartz", "quartz");
|
||||
}
|
||||
|
||||
if (Configurations.featureEnabled("OCD"))
|
||||
{
|
||||
OCD = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10F).setStepSound(Chisel.soundMetalFootstep);
|
||||
OCD.carverHelper.setChiselBlockName("OCD");
|
||||
OCD.carverHelper.register(OCD, "OCD");
|
||||
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.0.desc"), 0, "OCD/White-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.1.desc"), 1, "OCD/White-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.2.desc"), 2, "OCD/Orange-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.3.desc"), 3, "OCD/Orange-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.4.desc"), 4, "OCD/Magenta-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.5.desc"), 5, "OCD/Magenta-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.6.desc"), 6, "OCD/LightBlue-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.7.desc"), 7, "OCD/LightBlue-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.8.desc"), 8, "OCD/Yellow-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.9.desc"), 9, "OCD/Yellow-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.10.desc"), 10, "OCD/Lime-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.11.desc"), 11, "OCD/Lime-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.12.desc"), 12, "OCD/Pink-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.13.desc"), 13, "OCD/Pink-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.14.desc"), 14, "OCD/Gray-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.15.desc"), 15, "OCD/Gray-Thin");
|
||||
}
|
||||
|
||||
if (Configurations.featureEnabled("OCD2"))
|
||||
{
|
||||
OCD2 = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10F).setStepSound(Chisel.soundMetalFootstep);
|
||||
OCD2.carverHelper.setChiselBlockName("OCD2");
|
||||
OCD2.carverHelper.register(OCD2, "OCD2");
|
||||
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.0.desc"), 0, "OCD/LightGray-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.1.desc"), 1, "OCD/LightGray-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.2.desc"), 2, "OCD/Cyan-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.3.desc"), 3, "OCD/Cyan-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.4.desc"), 4, "OCD/Purple-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.5.desc"), 5, "OCD/Purple-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.6.desc"), 6, "OCD/Blue-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.7.desc"), 7, "OCD/Blue-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.8.desc"), 8, "OCD/Brown-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.9.desc"), 9, "OCD/Brown-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.10.desc"), 10, "OCD/Green-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.11.desc"), 11, "OCD/Green-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.12.desc"), 12, "OCD/Red-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.13.desc"), 13, "OCD/Red-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.14.desc"), 14, "OCD/Black-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.15.desc"), 15, "OCD/Black-Thin");
|
||||
}
|
||||
|
||||
//1.8
|
||||
if(Configurations.featureEnabled("granite")){
|
||||
granite = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ModTabs.tabStoneChiselBlocks);
|
||||
granite.carverHelper.setChiselBlockName("granite");
|
||||
granite.carverHelper.addVariation(StatCollector.translateToLocal("tile.granite.0.desc"), 0, "granite/granite");
|
||||
granite.carverHelper.addVariation(StatCollector.translateToLocal("tile.granite.1.desc"), 1, "granite/polishedGranite");
|
||||
granite.carverHelper.register(granite, "granite");
|
||||
Carving.chisel.registerOre("granite", "granite");
|
||||
}
|
||||
|
||||
if(Configurations.featureEnabled("diorite")){
|
||||
diorite = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ModTabs.tabStoneChiselBlocks);
|
||||
diorite.carverHelper.setChiselBlockName("diorite");
|
||||
diorite.carverHelper.addVariation(StatCollector.translateToLocal("tile.diorite.0.desc"), 0, "diorite/diorite");
|
||||
diorite.carverHelper.addVariation(StatCollector.translateToLocal("tile.diorite.1.desc"), 1, "diorite/polishedDiorite");
|
||||
diorite.carverHelper.register(diorite, "diorite");
|
||||
Carving.chisel.registerOre("diorite", "diorite");
|
||||
}
|
||||
|
||||
if(Configurations.featureEnabled("andesite")){
|
||||
andesite = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ModTabs.tabStoneChiselBlocks);
|
||||
andesite.carverHelper.setChiselBlockName("andesite");
|
||||
andesite.carverHelper.addVariation(StatCollector.translateToLocal("tile.andesite.0.desc"), 0, "andesite/andesite");
|
||||
andesite.carverHelper.addVariation(StatCollector.translateToLocal("tile.andesite.1.desc"), 1, "andesite/polishedAndesite");
|
||||
andesite.carverHelper.register(andesite, "andesite");
|
||||
Carving.chisel.registerOre("andesite", "andesite");
|
||||
}
|
||||
}
|
||||
public static void postLoad()
|
||||
{
|
||||
@@ -1837,51 +1918,5 @@ public class ModBlocks {
|
||||
Carving.chisel.addVariation("RCBloodStained", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bloodstained"), 5, 5);
|
||||
Carving.chisel.registerOre("RCBloodStained", "RCBloodStained");
|
||||
}
|
||||
if (Configurations.featureEnabled("OCD"))
|
||||
{
|
||||
OCD = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10F).setStepSound(Chisel.soundMetalFootstep);
|
||||
OCD.carverHelper.setChiselBlockName("OCD");
|
||||
OCD.carverHelper.register(OCD, "OCD");
|
||||
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.0.desc"), 0, "OCD/White-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.1.desc"), 1, "OCD/White-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.2.desc"), 2, "OCD/Orange-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.3.desc"), 3, "OCD/Orange-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.4.desc"), 4, "OCD/Magenta-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.5.desc"), 5, "OCD/Magenta-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.6.desc"), 6, "OCD/LightBlue-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.7.desc"), 7, "OCD/LightBlue-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.8.desc"), 8, "OCD/Yellow-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.9.desc"), 9, "OCD/Yellow-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.10.desc"), 10, "OCD/Lime-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.11.desc"), 11, "OCD/Lime-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.12.desc"), 12, "OCD/Pink-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.13.desc"), 13, "OCD/Pink-Thin");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.14.desc"), 14, "OCD/Gray-Thick");
|
||||
OCD.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD.15.desc"), 15, "OCD/Gray-Thin");
|
||||
}
|
||||
if (Configurations.featureEnabled("OCD2"))
|
||||
{
|
||||
OCD2 = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10F).setStepSound(Chisel.soundMetalFootstep);
|
||||
OCD2.carverHelper.setChiselBlockName("OCD2");
|
||||
OCD2.carverHelper.register(OCD2, "OCD2");
|
||||
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.0.desc"), 0, "OCD/LightGray-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.1.desc"), 1, "OCD/LightGray-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.2.desc"), 2, "OCD/Cyan-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.3.desc"), 3, "OCD/Cyan-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.4.desc"), 4, "OCD/Purple-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.5.desc"), 5, "OCD/Purple-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.6.desc"), 6, "OCD/Blue-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.7.desc"), 7, "OCD/Blue-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.8.desc"), 8, "OCD/Brown-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.9.desc"), 9, "OCD/Brown-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.10.desc"), 10, "OCD/Green-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.11.desc"), 11, "OCD/Green-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.12.desc"), 12, "OCD/Red-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.13.desc"), 13, "OCD/Red-Thin");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.14.desc"), 14, "OCD/Black-Thick");
|
||||
OCD2.carverHelper.addVariation(StatCollector.translateToLocal("tile.OCD2.15.desc"), 15, "OCD/Black-Thin");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.cricketcraft.chisel.world;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class GeneratorLimestone implements IWorldGenerator
|
||||
{
|
||||
WorldGenMinable gen;
|
||||
int amount;
|
||||
|
||||
public GeneratorLimestone(Block block, int count, int am)
|
||||
{
|
||||
gen = new WorldGenMinable(block, count);
|
||||
amount = am;
|
||||
}
|
||||
|
||||
protected void genStandardOre1(World world, Random random, int x, int z, int bot, int top)
|
||||
{
|
||||
for(int l = 0; l < amount; ++l)
|
||||
{
|
||||
int i1 = x + random.nextInt(15) - 1;
|
||||
int j1 = bot + random.nextInt(top - bot);
|
||||
int k1 = z + random.nextInt(15);
|
||||
gen.generate(world, random, i1, j1, k1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
genStandardOre1(world, random, chunkX * 16, chunkZ * 16, 40, 128);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.cricketcraft.chisel.world;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class GeneratorMarble implements IWorldGenerator
|
||||
{
|
||||
WorldGenMinable gen;
|
||||
int amount;
|
||||
|
||||
public GeneratorMarble(Block block, int count, int am)
|
||||
{
|
||||
gen = new WorldGenMinable(block, count);
|
||||
amount = am;
|
||||
}
|
||||
|
||||
protected void genStandardOre1(World world, Random random, int x, int z, int bot, int top)
|
||||
{
|
||||
for(int l = 0; l < amount; ++l)
|
||||
{
|
||||
int i1 = x + random.nextInt(16);
|
||||
int j1 = bot + random.nextInt(top - bot);
|
||||
int k1 = z + random.nextInt(16);
|
||||
gen.generate(world, random, i1, j1, k1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
genStandardOre1(world, random, chunkX * 16, chunkZ * 16, 40, 128);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user