diff --git a/client/src/main/resources/textures/blocks/black_quartz_block_bottom.png b/client/src/main/resources/textures/blocks/black_quartz_bottom.png similarity index 100% rename from client/src/main/resources/textures/blocks/black_quartz_block_bottom.png rename to client/src/main/resources/textures/blocks/black_quartz_bottom.png diff --git a/client/src/main/resources/textures/blocks/black_quartz_block_chiseled.png b/client/src/main/resources/textures/blocks/black_quartz_carved.png similarity index 100% rename from client/src/main/resources/textures/blocks/black_quartz_block_chiseled.png rename to client/src/main/resources/textures/blocks/black_quartz_carved.png diff --git a/client/src/main/resources/textures/blocks/black_quartz_block_chiseled_top.png b/client/src/main/resources/textures/blocks/black_quartz_carved_top.png similarity index 100% rename from client/src/main/resources/textures/blocks/black_quartz_block_chiseled_top.png rename to client/src/main/resources/textures/blocks/black_quartz_carved_top.png diff --git a/client/src/main/resources/textures/blocks/black_quartz_block_lines.png b/client/src/main/resources/textures/blocks/black_quartz_pillar.png similarity index 100% rename from client/src/main/resources/textures/blocks/black_quartz_block_lines.png rename to client/src/main/resources/textures/blocks/black_quartz_pillar.png diff --git a/client/src/main/resources/textures/blocks/black_quartz_block_lines_top.png b/client/src/main/resources/textures/blocks/black_quartz_pillar_top.png similarity index 100% rename from client/src/main/resources/textures/blocks/black_quartz_block_lines_top.png rename to client/src/main/resources/textures/blocks/black_quartz_pillar_top.png diff --git a/client/src/main/resources/textures/blocks/black_quartz_block_side.png b/client/src/main/resources/textures/blocks/black_quartz_side.png similarity index 100% rename from client/src/main/resources/textures/blocks/black_quartz_block_side.png rename to client/src/main/resources/textures/blocks/black_quartz_side.png diff --git a/client/src/main/resources/textures/blocks/charge_ore.png b/client/src/main/resources/textures/blocks/charged_ore.png similarity index 100% rename from client/src/main/resources/textures/blocks/charge_ore.png rename to client/src/main/resources/textures/blocks/charged_ore.png diff --git a/client/src/main/resources/textures/blocks/dense_coal_block.png b/client/src/main/resources/textures/blocks/coal_block_compressed.png similarity index 100% rename from client/src/main/resources/textures/blocks/dense_coal_block.png rename to client/src/main/resources/textures/blocks/coal_block_compressed.png diff --git a/client/src/main/resources/textures/blocks/very_dense_coal_block.png b/client/src/main/resources/textures/blocks/coal_block_compressed_2.png similarity index 100% rename from client/src/main/resources/textures/blocks/very_dense_coal_block.png rename to client/src/main/resources/textures/blocks/coal_block_compressed_2.png diff --git a/client/src/main/resources/textures/blocks/quartz_block_bottom.png b/client/src/main/resources/textures/blocks/quartz_bottom.png similarity index 100% rename from client/src/main/resources/textures/blocks/quartz_block_bottom.png rename to client/src/main/resources/textures/blocks/quartz_bottom.png diff --git a/client/src/main/resources/textures/blocks/quartz_block_chiseled.png b/client/src/main/resources/textures/blocks/quartz_carved.png similarity index 100% rename from client/src/main/resources/textures/blocks/quartz_block_chiseled.png rename to client/src/main/resources/textures/blocks/quartz_carved.png diff --git a/client/src/main/resources/textures/blocks/quartz_block_chiseled_top.png b/client/src/main/resources/textures/blocks/quartz_carved_top.png similarity index 100% rename from client/src/main/resources/textures/blocks/quartz_block_chiseled_top.png rename to client/src/main/resources/textures/blocks/quartz_carved_top.png diff --git a/client/src/main/resources/textures/blocks/quartz_block_lines.png b/client/src/main/resources/textures/blocks/quartz_pillar.png similarity index 100% rename from client/src/main/resources/textures/blocks/quartz_block_lines.png rename to client/src/main/resources/textures/blocks/quartz_pillar.png diff --git a/client/src/main/resources/textures/blocks/quartz_block_lines_top.png b/client/src/main/resources/textures/blocks/quartz_pillar_top.png similarity index 100% rename from client/src/main/resources/textures/blocks/quartz_block_lines_top.png rename to client/src/main/resources/textures/blocks/quartz_pillar_top.png diff --git a/client/src/main/resources/textures/blocks/quartz_block_side.png b/client/src/main/resources/textures/blocks/quartz_side.png similarity index 100% rename from client/src/main/resources/textures/blocks/quartz_block_side.png rename to client/src/main/resources/textures/blocks/quartz_side.png diff --git a/common/src/main/java/common/block/artificial/BlockMagneticExplosive.java b/common/src/main/java/common/block/artificial/BlockMagneticExplosive.java deleted file mode 100755 index a607eebb..00000000 --- a/common/src/main/java/common/block/artificial/BlockMagneticExplosive.java +++ /dev/null @@ -1,18 +0,0 @@ -package common.block.artificial; - -import common.block.Block; -import common.block.Material; - -public class BlockMagneticExplosive extends Block { - public BlockMagneticExplosive(Material material) { - super(material); - } - - public boolean isMagnetic() { - return true; - } - - public int getExplosive() { - return 3; - } -} diff --git a/common/src/main/java/common/block/artificial/BlockQuartz.java b/common/src/main/java/common/block/artificial/BlockQuartz.java index 8c23ac75..2fd1507f 100755 --- a/common/src/main/java/common/block/artificial/BlockQuartz.java +++ b/common/src/main/java/common/block/artificial/BlockQuartz.java @@ -8,29 +8,20 @@ import common.model.Model.ModelProvider; import common.world.State; public class BlockQuartz extends Block { - private final boolean dark; + private final String texture; private final boolean ornaments; - public BlockQuartz(boolean dark, boolean ornaments) { + public BlockQuartz(String texture, boolean ornaments) { super(Material.SOLID); - this.dark = dark; + this.texture = texture; this.ornaments = ornaments; this.setTab(CheatTab.BLOCKS); } - public boolean isDark() { - return this.dark; - } - - public boolean hasOrnaments() { - return this.ornaments; - } - public Model getModel(ModelProvider provider, String name, State state) { - String prefix = this.dark ? "black_" : ""; if(this.ornaments) - return provider.getModel(prefix + "quartz_block_chiseled").add().nswe().du(prefix + "quartz_block_chiseled_top"); + return provider.getModel(this.texture + "_carved").add().nswe().du(this.texture + "_carved_top"); else - return provider.getModel(prefix + "quartz_block_side").add().nswe().d(prefix + "quartz_block_bottom").u(prefix + "quartz_top"); + return provider.getModel(this.texture + "_side").add().nswe().d(this.texture + "_bottom").u(this.texture + "_top"); } } diff --git a/common/src/main/java/common/block/artificial/BlockQuartzPillar.java b/common/src/main/java/common/block/artificial/BlockQuartzPillar.java index cba22d3e..cccba048 100644 --- a/common/src/main/java/common/block/artificial/BlockQuartzPillar.java +++ b/common/src/main/java/common/block/artificial/BlockQuartzPillar.java @@ -13,42 +13,33 @@ import common.util.Facing; import common.world.State; import common.world.World; -public class BlockQuartzPillar extends BlockRotatedPillar -{ - private final boolean dark; - - public BlockQuartzPillar(boolean dark) - { - super(Material.SOLID); - this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.Y)); - this.setTab(CheatTab.BLOCKS); - this.dark = dark; - } - - public boolean isDark() { - return this.dark; - } +public class BlockQuartzPillar extends BlockRotatedPillar { + private final String texture; - public State getPlacedState(World worldIn, BlockPos pos, Facing facing, float hitX, float hitY, float hitZ, EntityLiving placer) - { - return this.getState().withProperty(AXIS, facing.getAxis()); - } + public BlockQuartzPillar(String texture) { + super(Material.SOLID); + this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.Y)); + this.setTab(CheatTab.BLOCKS); + this.texture = texture; + } - protected Property[] getProperties() - { - return new Property[] {AXIS}; - } + public State getPlacedState(World worldIn, BlockPos pos, Facing facing, float hitX, float hitY, float hitZ, EntityLiving placer) { + return this.getState().withProperty(AXIS, facing.getAxis()); + } - public Model getModel(ModelProvider provider, String name, State state) { - String prefix = this.dark ? "black_" : ""; + protected Property[] getProperties() { + return new Property[] {AXIS}; + } + + public Model getModel(ModelProvider provider, String name, State state) { switch(state.getValue(AXIS)) { - case X: - return provider.getModel(prefix + "quartz_block_lines").add().nswe().du(prefix + "quartz_block_lines_top").rotate(ModelRotation.X90_Y90); - case Y: - default: - return provider.getModel(prefix + "quartz_block_lines").add().nswe().du(prefix + "quartz_block_lines_top"); - case Z: - return provider.getModel(prefix + "quartz_block_lines").add().nswe().du(prefix + "quartz_block_lines_top").rotate(ModelRotation.X90_Y0); + case X: + return provider.getModel(this.texture + "_pillar").add().nswe().du(this.texture + "_pillar_top").rotate(ModelRotation.X90_Y90); + case Y: + default: + return provider.getModel(this.texture + "_pillar").add().nswe().du(this.texture + "_pillar_top"); + case Z: + return provider.getModel(this.texture + "_pillar").add().nswe().du(this.texture + "_pillar_top").rotate(ModelRotation.X90_Y0); } - } + } } diff --git a/common/src/main/java/common/block/natural/BlockCompressable.java b/common/src/main/java/common/block/natural/BlockCompressable.java index f9b5c014..02d54f66 100644 --- a/common/src/main/java/common/block/natural/BlockCompressable.java +++ b/common/src/main/java/common/block/natural/BlockCompressable.java @@ -6,7 +6,6 @@ import common.block.Block; import common.block.Material; import common.block.SoundType; import common.entity.npc.EntityNPC; -import common.item.CheatTab; import common.item.ItemStack; import common.util.BlockPos; import common.util.Clientside; @@ -25,10 +24,12 @@ public class BlockCompressable extends Block { this.compLevel = density; density = 1; for(int z = 0; z < this.compLevel; z++) { - density *= 9; + density *= 10; } this.density = density; - this.setHardness(5.0F).setResistance(10.0F).setSound(SoundType.STONE).setTab(CheatTab.NATURE).setFlammable(5, 5); + this.setHardness(5.0F).setResistance(10.0F).setSound(SoundType.STONE); + if(this.fuel > 0) + this.setFlammable(5, 5); } public int getFuelAmount() { diff --git a/common/src/main/java/common/init/BlockRegistry.java b/common/src/main/java/common/init/BlockRegistry.java index 6f6cce52..d4906416 100755 --- a/common/src/main/java/common/init/BlockRegistry.java +++ b/common/src/main/java/common/init/BlockRegistry.java @@ -159,9 +159,6 @@ public abstract class BlockRegistry { colored_clay[color.ordinal()] = register(color.getName() + "_clay", (new BlockColoredClay(color)).setHardness(1.25F).setResistance(7.0F) .setSound(SoundType.STONE).setDisplay(color.getDisplay() + " gefärbter Ton")); } - register("coal_block", new BlockCompressable(16000, 0).setDisplay("Kohleblock")); - register("dense_coal_block", new BlockCompressable(16000, 1).setDisplay("Verdichteter Kohleblock")); - register("very_dense_coal_block", new BlockCompressable(16000, 2).setDisplay("Zweifach verdichteter Kohleblock")); register("sand", (new BlockFalling(Material.LOOSE)).setHardness(0.5F).setSound(SoundType.SAND).setDisplay("Sand").setMiningTool(Equipment.SHOVEL).setTab(CheatTab.NATURE)); register("red_sand", (new BlockFalling(Material.LOOSE)).setHardness(0.5F).setSound(SoundType.SAND).setDisplay("Roter Sand").setMiningTool(Equipment.SHOVEL).setTab(CheatTab.NATURE)); register("gravel", (new BlockGravel()).setHardness(0.6F).setSound(SoundType.GRAVEL).setDisplay("Kies").setMiningTool(Equipment.SHOVEL)); @@ -195,18 +192,6 @@ public abstract class BlockRegistry { registerFluid("milk", "Milch", false, LiquidType.COLD, true, 0, 5, 0.0f, 1, 1); - register("coal_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE).setDisplay("Steinkohle")); - register("lapis_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE) - .setDisplay("Lapislazulierz").setMiningTool(Equipment.PICKAXE, 1)); - register("emerald_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE) - .setDisplay("Smaragderz").setMiningTool(Equipment.PICKAXE, 2)); - register("quartz_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE) - .setDisplay("Quarzerz")); - register("black_quartz_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE) - .setDisplay("Schwarzes Quarzerz")); - register("charge_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE) - .setDisplay("Geladenes Erz").setMiningTool(Equipment.PICKAXE, 2)); - for(MetalType metal : MetalType.values()) { // String loc = metal.name.substring(0, 1).toUpperCase() + metal.name.substring(1); register(metal.name + "_ore", (new BlockMetalOre(metal)).setHardness(3.0F).setResistance(5.0F) @@ -217,6 +202,10 @@ public abstract class BlockRegistry { register(ore.name + "_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE) .setDisplay(ore.display + "erz").setMiningTool(Equipment.PICKAXE, ore.material.getHarvestLevel() - 1)); } + for(MineralType mineral : MineralType.values()) { + register(mineral.name + "_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE) + .setDisplay(mineral.displayOre).setMiningTool(Equipment.PICKAXE, 1)); + } @@ -314,20 +303,13 @@ public abstract class BlockRegistry { .setDisplay(wood.getDisplay() + "holztür").setFlammable(5, 20)); } - register("soul_fire", (new BlockSoulFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Feuer der Seelen")); - register("black_fire", (new BlockBlackFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Dunkles Feuer")); register("web", (new BlockWeb()).setOpacity(1).setHardness(4.0F).setDisplay("Spinnennetz")); + register("fire", (new BlockFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Feuer")); + register("black_fire", (new BlockBlackFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Dunkles Feuer")); + register("soul_fire", (new BlockSoulFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Feuer der Seelen")); - - register("lapis_block", (new Block(Material.SOLID)).setHardness(3.0F).setResistance(5.0F) - .setSound(SoundType.STONE).setDisplay("Lapislazuliblock").setTab(CheatTab.GEMS).setMiningTool(Equipment.PICKAXE, 1)); - register("emerald_block", (new Block(Material.SOLID)).setHardness(5.0F).setResistance(10.0F) - .setSound(SoundType.STONE).setDisplay("Smaragdblock").setTab(CheatTab.GEMS).setMiningTool(Equipment.PICKAXE, 2)); - register("charged_block", (new BlockMagneticExplosive(Material.SOLID)).setHardness(5.0F).setResistance(10.0F) - .setSound(SoundType.STONE).setDisplay("Geladener Block").setTab(CheatTab.GEMS)); - register("glass", (new BlockGlass()).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay("Glas")); for(Color color : Color.values()) { register(color.getName() + "_glass", (new BlockStainedGlass(color)).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay(color.getDisplay() + " gefärbtes Glas")); @@ -396,8 +378,21 @@ public abstract class BlockRegistry { } for(OreType ore : OreType.values()) { // String loc = ore.name.substring(0, 1).toUpperCase() + ore.name.substring(1); - register(ore.name + "_block", (new Block(Material.SOLID)).setHardness(5.0F).setResistance(10.0F).setSound(SoundType.STONE) - .setDisplay(ore.display + "block").setTab(CheatTab.GEMS).setMiningTool(Equipment.PICKAXE, ore.material.getHarvestLevel() - 1)); + for(int z = 0; z <= ore.getCompressability(); z++) { + register(ore.name + "_block" + (z == 0 ? "" : "_compressed" + (z == 1 ? "" : "_" + z)), (new BlockCompressable(ore.getFuel(), z)) + .setDisplay(Util.getCompressionPrefix("Verdichteter", z) + ore.display + "block").setTab(CheatTab.GEMS).setMiningTool(Equipment.PICKAXE, ore.material.getHarvestLevel() - 1)); + } + } + for(MineralType mineral : MineralType.values()) { + Block block = (new BlockQuartz(mineral.name, false)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay(mineral.displayBlock).setMiningTool(Equipment.PICKAXE, 1); + register(mineral.name + "_block", block); + register(mineral.name + "_slab", (new BlockSlab(block, mineral.name + "_bottom", mineral.name + "_top")).setDisplay(mineral.displaySlab).setMiningTool(Equipment.PICKAXE, 1)); + register(mineral.name + "_stairs", (new BlockStairs(block, mineral.name + "_bottom", mineral.name + "_top")).setDisplay(mineral.displayStairs).setMiningTool(Equipment.PICKAXE, 1)); + Block ornaments; + register(mineral.name + "_ornaments", (ornaments = new BlockQuartz(mineral.name, true)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay(mineral.displayCarved).setMiningTool(Equipment.PICKAXE, 1)); + register(mineral.name + "_ornaments_slab", (new BlockSlab(ornaments, mineral.name + "_carved", mineral.name + "_carved_top")).setDisplay(mineral.displayCarvedSlab).setMiningTool(Equipment.PICKAXE, 1)); + register(mineral.name + "_ornaments_stairs", (new BlockStairs(ornaments, mineral.name + "_carved", mineral.name + "_carved_top")).setDisplay(mineral.displayCarvedStairs).setMiningTool(Equipment.PICKAXE, 1)); + register(mineral.name + "_pillar", (new BlockQuartzPillar(mineral.name)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay(mineral.displayPillar).setMiningTool(Equipment.PICKAXE, 1)); } register("stone_slab", (new BlockSlab(stone)).setDisplay("Steinstufe")); @@ -484,26 +479,6 @@ public abstract class BlockRegistry { register("cheese_slab", (new BlockSlab(cheese)).setDisplay("Käsestufe")); register("cheese_stairs", (new BlockStairs(cheese)).setDisplay("Käsetreppe")); - Block quartz_block = (new BlockQuartz(false, false)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Quarzblock"); - register("quartz_block", quartz_block); - register("quartz_slab", (new BlockSlab(quartz_block, "quartz_block_bottom", "quartz_top")).setDisplay("Quarzstufe")); - register("quartz_stairs", (new BlockStairs(quartz_block, "quartz_block_bottom", "quartz_top")).setDisplay("Quarztreppe")); - Block quartz_ornaments; - register("quartz_ornaments", (quartz_ornaments = new BlockQuartz(false, true)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Gemeißelter Quarzblock")); - register("quartz_ornaments_slab", (new BlockSlab(quartz_ornaments, "quartz_block_chiseled", "quartz_block_chiseled_top")).setDisplay("Gemeißelte Quarzstufe")); - register("quartz_ornaments_stairs", (new BlockStairs(quartz_ornaments, "quartz_block_chiseled", "quartz_block_chiseled_top")).setDisplay("Gemeißelte Quarztreppe")); - register("quartz_pillar", (new BlockQuartzPillar(false)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Quarzsäule")); - - Block black_quartz_block = (new BlockQuartz(true, false)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Schwarzer Quarzblock"); - register("black_quartz_block", black_quartz_block); - register("black_quartz_slab", (new BlockSlab(black_quartz_block, "black_quartz_block_bottom", "black_quartz_top")).setDisplay("Schwarze Quarzstufe")); - register("black_quartz_stairs", (new BlockStairs(black_quartz_block, "black_quartz_block_bottom", "black_quartz_top")).setDisplay("Schwarze Quarztreppe")); - Block black_quartz_ornaments; - register("black_quartz_ornaments", (black_quartz_ornaments = new BlockQuartz(true, true)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Schwarzer gemeißelter Quarzblock")); - register("black_quartz_ornaments_slab", (new BlockSlab(black_quartz_ornaments, "black_quartz_block_chiseled", "black_quartz_block_chiseled_top")).setDisplay("Schwarze gemeißelte Quarzstufe")); - register("black_quartz_ornaments_stairs", (new BlockStairs(black_quartz_ornaments, "black_quartz_block_chiseled", "black_quartz_block_chiseled_top")).setDisplay("Schwarze gemeißelte Quarztreppe")); - register("black_quartz_pillar", (new BlockQuartzPillar(true)).setSound(SoundType.STONE).setHardness(0.8F).setDisplay("Schwarze Quarzsäule")); - register("iron_bars", (new BlockPane(Material.SOLID)).setHardness(5.0F).setResistance(10.0F).setSound(SoundType.STONE).setDisplay("Eisengitter")); Block brick_block = (new Block(Material.SOLID)).setHardness(2.0F).setResistance(10.0F).setSound(SoundType.STONE) @@ -562,8 +537,7 @@ public abstract class BlockRegistry { register("trapdoor", (new BlockTrapDoor(Material.WOOD)).setHardness(3.0F).setSound(SoundType.WOOD).setDisplay("Holzfalltür").setFlammable(5, 20)); register("iron_trapdoor", (new BlockTrapDoor(Material.SOLID)).setHardness(5.0F).setSound(SoundType.STONE).setDisplay("Eisenfalltür")); - register("core", new BlockCore().setHardness(1.5F).setResistance(10.0F).setSound(SoundType.STONE) - .setDisplay("Chunk-Lade-Kern")); + register("core", new BlockCore().setHardness(1.5F).setResistance(10.0F).setSound(SoundType.STONE).setDisplay("Chunk-Lade-Kern")); register("mob_spawner", (new BlockMobSpawner()).setHardness(3.0F).setResistance(8.0F).setSound(SoundType.STONE).setDisplay("Mob-Spawner")); register("workbench", (new BlockWorkbench(3)).setHardness(2.5F).setSound(SoundType.WOOD).setDisplay("Werkbank")); register("furnace", (new BlockFurnace(false)).setHardness(3.5F).setSound(SoundType.STONE).setDisplay("Ofen") diff --git a/common/src/main/java/common/init/Blocks.java b/common/src/main/java/common/init/Blocks.java index cef32e54..c6929067 100755 --- a/common/src/main/java/common/init/Blocks.java +++ b/common/src/main/java/common/init/Blocks.java @@ -42,7 +42,6 @@ public abstract class Blocks { public static final BlockAnvil anvil = get("anvil"); public static final BlockAnvil anvil_damaged_1 = get("anvil_damaged_1"); public static final BlockAnvil anvil_damaged_2 = get("anvil_damaged_2"); - public static final Block ardite_block = get("ardite_block"); public static final BlockOre ardite_ore = get("ardite_ore"); public static final BlockMetalBlock arsenic_block = get("arsenic_block"); public static final BlockMetalOre arsenic_ore = get("arsenic_ore"); @@ -150,12 +149,9 @@ public abstract class Blocks { public static final BlockStairs cherry_stairs = get("cherry_stairs"); public static final BlockMetalBlock chrome_block = get("chrome_block"); public static final BlockMetalOre chrome_ore = get("chrome_ore"); - public static final Block cinnabar_block = get("cinnabar_block"); public static final BlockOre cinnabar_ore = get("cinnabar_ore"); public static final BlockClay clay = get("clay"); public static final BlockCompressable coal_block = get("coal_block"); - public static final BlockCompressable dense_coal_block = get("dense_coal_block"); - public static final BlockCompressable very_dense_coal_block = get("very_dense_coal_block"); public static final BlockOre coal_ore = get("coal_ore"); public static final Block coarse_dirt = get("coarse_dirt"); public static final BlockMetalBlock cobalt_block = get("cobalt_block"); @@ -191,14 +187,12 @@ public abstract class Blocks { public static final BlockStairs dark_oak_stairs = get("dark_oak_stairs"); public static final BlockTallGrass dead_bush = get("dead_bush"); public static final BlockDeadBush deadbush = get("deadbush"); - public static final Block diamond_block = get("diamond_block"); public static final BlockOre diamond_ore = get("diamond_ore"); public static final Block dirt = get("dirt"); public static final BlockDispenser dispenser = get("dispenser"); public static final BlockDragonEgg dragon_egg = get("dragon_egg"); public static final BlockDropper dropper = get("dropper"); public static final BlockDryLeaves dry_leaves = get("dry_leaves"); - public static final Block emerald_block = get("emerald_block"); public static final BlockOre emerald_ore = get("emerald_ore"); public static final BlockEnchantmentTable enchanting_table = get("enchanting_table"); public static final BlockFarmland farmland = get("farmland"); @@ -253,7 +247,6 @@ public abstract class Blocks { public static final BlockStainedGlass green_glass = get("green_glass"); public static final BlockStainedGlassPane green_glass_pane = get("green_glass_pane"); public static final BlockWool green_wool = get("green_wool"); - public static final Block gyriyn_block = get("gyriyn_block"); public static final BlockOre gyriyn_ore = get("gyriyn_ore"); public static final BlockHardenedClay hardened_clay = get("hardened_clay"); public static final BlockHay hay_block = get("hay_block"); @@ -284,7 +277,6 @@ public abstract class Blocks { public static final BlockSlab jungle_slab = get("jungle_slab"); public static final BlockStairs jungle_stairs = get("jungle_stairs"); public static final BlockLadder ladder = get("ladder"); - public static final Block lapis_block = get("lapis_block"); public static final BlockOre lapis_ore = get("lapis_ore"); public static final BlockDoublePlant large_fern = get("large_fern"); public static final BlockDoublePlant large_tallgrass = get("large_tallgrass"); @@ -338,7 +330,6 @@ public abstract class Blocks { public static final BlockMetalOre neodymium_ore = get("neodymium_ore"); public static final BlockMetalBlock neptunium_block = get("neptunium_block"); public static final BlockMetalOre neptunium_ore = get("neptunium_ore"); - public static final Block nichun_block = get("nichun_block"); public static final BlockOre nichun_ore = get("nichun_ore"); public static final BlockMetalBlock nickel_block = get("nickel_block"); public static final BlockMetalOre nickel_ore = get("nickel_ore"); @@ -409,13 +400,11 @@ public abstract class Blocks { public static final BlockFalling red_sand = get("red_sand"); public static final BlockFlower red_tulip = get("red_tulip"); public static final BlockWool red_wool = get("red_wool"); - public static final BlockMagneticExplosive charged_block = get("charged_block"); - public static final BlockOre charge_ore = get("charge_ore"); + public static final BlockOre charged_ore = get("charged_ore"); public static final BlockReed reeds = get("reeds"); public static final Block rock = get("rock"); public static final BlockFlower rose = get("rose"); public static final BlockDoublePlant rose_bush = get("rose_bush"); - public static final Block ruby_block = get("ruby_block"); public static final BlockOre ruby_ore = get("ruby_ore"); public static final BlockFalling sand = get("sand"); public static final BlockSandStone sandstone = get("sandstone"); @@ -470,7 +459,6 @@ public abstract class Blocks { public static final BlockDoublePlant sunflower = get("sunflower"); public static final BlockDoublePlant syringa = get("syringa"); public static final BlockTallGrass tallgrass = get("tallgrass"); - public static final Block thetium_block = get("thetium_block"); public static final BlockOre thetium_ore = get("thetium_ore"); public static final Block tian = get("tian"); public static final BlockDoor tian_wood_door = get("tian_wood_door"); @@ -854,6 +842,18 @@ public abstract class Blocks { public static final BlockStairs blackened_cobble_stairs = get("blackened_cobble_stairs"); public static final BlockSlab blackened_stone_slab = get("blackened_stone_slab"); public static final BlockStairs blackened_stone_stairs = get("blackened_stone_stairs"); + public static final BlockCompressable ardite_block = get("ardite_block"); + public static final BlockCompressable cinnabar_block = get("cinnabar_block"); + public static final BlockCompressable diamond_block = get("diamond_block"); + public static final BlockCompressable emerald_block = get("emerald_block"); + public static final BlockCompressable gyriyn_block = get("gyriyn_block"); + public static final BlockCompressable lapis_block = get("lapis_block"); + public static final BlockCompressable nichun_block = get("nichun_block"); + public static final BlockCompressable charged_block = get("charged_block"); + public static final BlockCompressable ruby_block = get("ruby_block"); + public static final BlockCompressable thetium_block = get("thetium_block"); + public static final BlockCompressable coal_block_compressed = get("coal_block_compressed"); + public static final BlockCompressable coal_block_compressed_2 = get("coal_block_compressed_2"); private static T get(String id) { T block = (T)BlockRegistry.byNameExact(id); diff --git a/common/src/main/java/common/init/CraftingRegistry.java b/common/src/main/java/common/init/CraftingRegistry.java index 9e9de8e3..12ffdf1f 100755 --- a/common/src/main/java/common/init/CraftingRegistry.java +++ b/common/src/main/java/common/init/CraftingRegistry.java @@ -23,15 +23,6 @@ import common.util.Equipment; public abstract class CraftingRegistry { - private static final Object[][] COMPRESSED = new Object[][] { - {Items.emerald_block, new ItemStack(Items.emerald, 9)}, - {Items.lapis_block, new ItemStack(Items.lapis_lazuli, 9)}, - {Items.charged_block, new ItemStack(Items.charged_powder, 9)}, - {Items.coal_block, new ItemStack(Items.coal, 9)}, - {Items.hay_block, new ItemStack(Items.wheat, 9)}, - {Items.slime_block, new ItemStack(Items.slime_blob, 9)} - }; - private static final List recipes = Lists.newArrayList(); private static void registerTools(ToolMaterial material, Item item, String name) { @@ -68,18 +59,26 @@ public abstract class CraftingRegistry registerTools(tool.material, item, tool.name); } } + for(MineralType mineral : MineralType.values()) { + Item item = ItemRegistry.byName(mineral.name + "_block"); + Item carved = ItemRegistry.byName(mineral.name + "_ornaments"); + addShapeless(new ItemStack(carved), item); + add(new ItemStack(item, 1), "##", "##", '#', ItemRegistry.byName(mineral.name)); + add(new ItemStack(ItemRegistry.byName(mineral.name + "_slab"), 6), "###", '#', item); + add(new ItemStack(ItemRegistry.byName(mineral.name + "_stairs"), 4), "# ", "## ", "###", '#', item); + add(new ItemStack(ItemRegistry.byName(mineral.name + "_ornaments_slab"), 6), "###", '#', carved); + add(new ItemStack(ItemRegistry.byName(mineral.name + "_ornaments_stairs"), 4), "# ", "## ", "###", '#', carved); + add(new ItemStack(ItemRegistry.byName(mineral.name + "_pillar"), 2), "#", "#", '#', item); + } add(new ItemStack(Items.hoe), "XX", " #", " #", '#', Items.stick, 'X', Items.cobblestone); add(new ItemStack(Items.bow, 1), " #X", "# X", " #X", 'X', Items.string, '#', Items.stick); add(new ItemStack(Items.arrow, 4), "X", "#", "Y", 'Y', Items.feather, 'X', Items.flint, '#', Items.stick); - for (int i = 0; i < COMPRESSED.length; ++i) - { - Item block = (Item)COMPRESSED[i][0]; - ItemStack itemstack = (ItemStack)COMPRESSED[i][1]; - add(new ItemStack(block), "###", "###", "###", '#', itemstack); - add(itemstack, "#", '#', block); - } + add(new ItemStack(Items.hay_block), "###", "###", "###", '#', Items.wheat); + add(new ItemStack(Items.wheat, 9), "#", '#', Items.hay_block); + add(new ItemStack(Items.slime_block), "###", "###", "###", '#', Items.slime_blob); + add(new ItemStack(Items.slime_blob, 9), "#", '#', Items.slime_block); add(new ItemStack(Items.gold_ingot), "###", "###", "###", '#', Items.gold_nugget); add(new ItemStack(Items.gold_nugget, 9), "#", '#', Items.gold_ingot); @@ -94,7 +93,6 @@ public abstract class CraftingRegistry add(new ItemStack(Items.furnace), "###", "# #", "###", '#', Items.cobblestone); add(new ItemStack(Items.sandstone), "##", "##", '#', Items.sand); add(new ItemStack(Items.smooth_sandstone, 4), "##", "##", '#', Items.sandstone); - add(new ItemStack(Items.quartz_pillar, 2), "#", "#", '#', Items.quartz_block); add(new ItemStack(Items.stonebrick, 4), "##", "##", '#', Items.stone); addShapeless(new ItemStack(Items.mossy_stonebrick), Items.stonebrick, Items.vine); addShapeless(new ItemStack(Items.mossy_stonebrick), Items.stonebrick, Items.swamp_vine); @@ -195,13 +193,13 @@ public abstract class CraftingRegistry add(new ItemStack(Items.mossy_cobblestone_wall, 6), "###", "###", '#', Items.mossy_cobblestone); add(new ItemStack(Items.blood_brick_fence, 6), "###", "###", '#', Items.blood_brick); - add(new ItemStack(Items.lead, 2), "~~ ", "~O ", " ~", '~', Items.string, 'O', Items.slime_blob); + add(new ItemStack(Items.lead, 2), "~~ ", "~~ ", " ~", '~', Items.string); + add(new ItemStack(Items.saddle, 1), "###", "~ ~", '#', Items.leather, '~', Items.string); add(new ItemStack(Items.snow, 1), "##", "##", '#', Items.snowball); add(new ItemStack(Items.snow_layer, 6), "###", '#', Items.snow); add(new ItemStack(Items.clay, 1), "##", "##", '#', Items.clay_lump); add(new ItemStack(Items.brick_block, 1), "##", "##", '#', Items.brick); add(new ItemStack(Items.glowstone, 1), "##", "##", '#', Items.glowing_powder); - add(new ItemStack(Items.quartz_block, 1), "##", "##", '#', Items.quartz); add(new ItemStack(Items.white_wool, 1), "##", "##", '#', Items.string); add(new ItemStack(Items.tnt, 1), "X#X", "#X#", "X#X", 'X', Items.gunpowder, '#', Items.sand); @@ -240,7 +238,6 @@ public abstract class CraftingRegistry add(new ItemStack(Items.stonebrick_stairs, 4), "# ", "## ", "###", '#', Items.stonebrick); add(new ItemStack(Items.blood_brick_stairs, 4), "# ", "## ", "###", '#', Items.blood_brick); add(new ItemStack(Items.sandstone_stairs, 4), "# ", "## ", "###", '#', Items.sandstone); - add(new ItemStack(Items.quartz_stairs, 4), "# ", "## ", "###", '#', Items.quartz_block); add(new ItemStack(Items.golden_apple, 1), "###", "#X#", "###", '#', Items.gold_ingot, 'X', Items.apple); add(new ItemStack(Items.charged_apple, 1), "###", "#X#", "###", '#', Items.gold_block, 'X', Items.apple); add(new ItemStack(Items.lever, 1), "X", "#", '#', Items.cobblestone, 'X', Items.stick); diff --git a/common/src/main/java/common/init/ItemRegistry.java b/common/src/main/java/common/init/ItemRegistry.java index 571521db..2ba2a5e6 100755 --- a/common/src/main/java/common/init/ItemRegistry.java +++ b/common/src/main/java/common/init/ItemRegistry.java @@ -208,8 +208,6 @@ public abstract class ItemRegistry { register("rocket_launcher", (new ItemRocketLauncher()).setDisplay("Raketenwerfer")); register("rocket", (new ItemAmmo(6, 6.0f, StackSize.L)).setDisplay("Rakete").setExplosive(4)); register("arrow", (new ItemArrow()).setDisplay("Pfeil").setTab(CheatTab.WEAPONS).setMaxAmount(StackSize.L)); - Item coal = (new Item()).setDisplay("Kohle").setTab(CheatTab.METALS).setFuelAmount(1600); - register("coal", coal); register("charcoal", (new Item()).setDisplay("Holzkohle").setTab(CheatTab.METALS).setFuelAmount(1200)); register("stick", (new Item()).setDisplay("Stock").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XL).setFuelAmount(100)); register("feather", (new Item()).setDisplay("Feder").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XXL)); @@ -272,11 +270,7 @@ public abstract class ItemRegistry { .setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XL).setFuelAmount(600)); register("charged_orb", (new ItemChargedOrb()).setDisplay("Geladene Kugel")); register("fireball", (new ItemFireball()).setDisplay("Feuerkugel").setFuelAmount(1000)); - Item emerald = (new Item()).setDisplay("Smaragd").setTab(CheatTab.METALS); - register("emerald", emerald); register("cocoa_powder", new Item().setTab(CheatTab.MATERIALS).setDisplay("Gemahlene Kakaobohnen").setMaxAmount(StackSize.L)); - Item lapis = new Item().setTab(CheatTab.METALS).setDisplay("Lapislazuli").setMaxAmount(StackSize.L); - register("lapis_lazuli", lapis); register("grinded_bones", new ItemGrindedBones().setTab(CheatTab.MATERIALS).setDisplay("Gemahlene Knochen").setMaxAmount(StackSize.L)); register("ink_sack", new Item().setTab(CheatTab.MATERIALS).setDisplay("Tintenbeutel").setMaxAmount(StackSize.L)); @@ -300,21 +294,15 @@ public abstract class ItemRegistry { } register("bloodbrick", (new Item()).setDisplay("Blutroter Ziegel").setTab(CheatTab.MATERIALS)); register("blackbrick", (new Item()).setDisplay("Schwarzer Ziegel").setTab(CheatTab.MATERIALS)); - Item quartz = (new Item()).setDisplay("Quarz").setTab(CheatTab.METALS); - register("quartz", quartz); - Item bquartz = (new Item()).setDisplay("Schwarzes Quarz").setTab(CheatTab.METALS); - register("black_quartz", bquartz); register("lead", (new ItemLead()).setDisplay("Leine").setMaxAmount(StackSize.L)); register("name_tag", (new ItemNameTag()).setDisplay("Namensschild")); for(int z = 0; z < ItemDynamite.DYNAMITE.length; z++) { register("dynamite" + (z == 0 ? "" : ("_" + z)), (new ItemDynamite(z)).setDisplay("Dynamit" + Util.getTierSuffix(z)).setColor(Color.RED)); } register("chain", (new Item()).setDisplay("Kette").setTab(CheatTab.MATERIALS).setMagnetic()); - Item chargedPowder = (new Item()).setDisplay("Geladener Staub").setTab(CheatTab.METALS).setMagnetic().setExplosive(2); - register("charged_powder", chargedPowder); for(OreType ore : OreType.values()) { - Item itm = (new Item()).setDisplay(ore.itemDisplay).setTab(CheatTab.METALS); + Item itm = (new Item()).setDisplay(ore.itemDisplay).setTab(CheatTab.METALS).setFuelAmount(ore.getFuel() / 10); register(ore.item, itm); ((BlockOre)BlockRegistry.byName(ore.name + "_ore")).setDropItem(new ItemStack(itm, ore.dropQuantity), ore.bonusChance, ore.experience); @@ -337,6 +325,11 @@ public abstract class ItemRegistry { for(ToolType tool : ToolType.values()) { registerTools(tool.material, tool.name, tool.display); } + for(MineralType mineral : MineralType.values()) { + Item item = (new Item()).setDisplay(mineral.display).setTab(CheatTab.METALS); + register(mineral.name, item); + ((BlockOre)BlockRegistry.byName(mineral.name + "_ore")).setDropItem(new ItemStack(item), mineral.experience); + } register("record_13", (new ItemRecord()).setDisplay("Protokoll #1 - 13 Tage ohne Kaffee")); register("record_cat", (new ItemRecord()).setDisplay("Protokoll #2 - Versuchskatzen")); @@ -353,12 +346,6 @@ public abstract class ItemRegistry { register("record_delay", (new ItemRecord()).setDisplay("Protokoll #13 - Verzögerung der Umsetzung")); register("record_extend", (new ItemRecord()).setDisplay("Protokoll #14 - Explosive Erweiterung unseres Labors")); - Blocks.coal_ore.setDropItem(new ItemStack(coal), 0); - Blocks.emerald_ore.setDropItem(new ItemStack(emerald), 3); - Blocks.lapis_ore.setDropItem(new ItemStack(lapis, 4), 4, 2); - Blocks.quartz_ore.setDropItem(new ItemStack(quartz), 2); - Blocks.black_quartz_ore.setDropItem(new ItemStack(bquartz), 3); - Blocks.charge_ore.setDropItem(new ItemStack(chargedPowder, 4), 2, 1); Blocks.iron_door.setKeyItem(key); Blocks.iron_trapdoor.setKeyItem(key); diff --git a/common/src/main/java/common/init/Items.java b/common/src/main/java/common/init/Items.java index 68950aa4..8623cba1 100755 --- a/common/src/main/java/common/init/Items.java +++ b/common/src/main/java/common/init/Items.java @@ -252,8 +252,6 @@ public abstract class Items { public static final ItemArmor cloth_leggings = get("cloth_leggings"); public static final Item coal = get("coal"); public static final Item coal_block = get("coal_block"); - public static final Item dense_coal_block = get("dense_coal_block"); - public static final Item very_dense_coal_block = get("very_dense_coal_block"); public static final Item coal_ore = get("coal_ore"); public static final Item coarse_dirt = get("coarse_dirt"); public static final Item cobalt_block = get("cobalt_block"); @@ -923,7 +921,7 @@ public abstract class Items { public static final Item charged_powder = get("charged_powder"); public static final Item wire = get("wire"); public static final Item charged_block = get("charged_block"); - public static final Item charge_ore = get("charge_ore"); + public static final Item charged_ore = get("charged_ore"); public static final Item torch = get("torch"); public static final Item soul_torch = get("soul_torch"); public static final Item tian_torch = get("tian_torch"); @@ -1238,6 +1236,8 @@ public abstract class Items { public static final Item blackened_cobble_stairs = get("blackened_cobble_stairs"); public static final Item blackened_stone_slab = get("blackened_stone_slab"); public static final Item blackened_stone_stairs = get("blackened_stone_stairs"); + public static final Item coal_block_compressed = get("coal_block_compressed"); + public static final Item coal_block_compressed_2 = get("coal_block_compressed_2"); private static T get(String id) { T item = (T)ItemRegistry.byName(id); diff --git a/common/src/main/java/common/init/MineralType.java b/common/src/main/java/common/init/MineralType.java new file mode 100644 index 00000000..e9438c0b --- /dev/null +++ b/common/src/main/java/common/init/MineralType.java @@ -0,0 +1,33 @@ +package common.init; + +public enum MineralType { + QUARTZ("quartz", "Quarz", "Quarzerz", "Quarzblock", "Quarzstufe", "Quarztreppe", "Gemeißelter Quarzblock", "Gemeißelte Quarzstufe", "Gemeißelte Quarztreppe", "Quarzsäule", 2), + BLACK_QUARTZ("black_quartz", "Schwarzes Quarz", "Schwarzes Quarzerz", "Schwarzer Quarzblock", "Schwarze Quarzstufe", "Schwarze Quarztreppe", "Schwarzer gemeißelter Quarzblock", + "Schwarze gemeißelte Quarzstufe", "Schwarze gemeißelte Quarztreppe", "Schwarze Quarzsäule", 3); + + public final String name; + public final String display; + public final String displayOre; + public final String displayBlock; + public final String displaySlab; + public final String displayStairs; + public final String displayCarved; + public final String displayCarvedSlab; + public final String displayCarvedStairs; + public final String displayPillar; + public final int experience; + + private MineralType(String name, String item, String ore, String block, String slab, String stairs, String carved, String carvedSlab, String carvedStairs, String pillar, int xpDrop) { + this.name = name; + this.display = item; + this.displayOre = ore; + this.displayBlock = block; + this.displaySlab = slab; + this.displayStairs = stairs; + this.displayCarved = carved; + this.displayCarvedSlab = carvedSlab; + this.displayCarvedStairs = carvedStairs; + this.displayPillar = pillar; + this.experience = xpDrop; + } +} diff --git a/common/src/main/java/common/init/OreType.java b/common/src/main/java/common/init/OreType.java index 24d19fff..86eabd03 100755 --- a/common/src/main/java/common/init/OreType.java +++ b/common/src/main/java/common/init/OreType.java @@ -1,13 +1,19 @@ package common.init; public enum OreType { - DIAMOND("diamond", "Diamant", new ToolMaterial(3, 12.0f, 2.0f, 1561, 8, 3, 10, true, 33, 10, 3, 8, 6, 3), "diamond", 3, 1, 0), + COAL("coal", "Kohle", new ToolMaterial(2), 0, 1, 0) {{ + this.setFuel(16000).setCompressability(2); + }}, + CINNABAR("cinnabar", "Zinnober", new ToolMaterial(2), 2, 1, 1), + LAPIS("lapis", "Lapislazuli", new ToolMaterial(2), "lapis_lazuli", 2, 4, 4), + EMERALD("emerald", "Smaragd", new ToolMaterial(3), 3, 1, 0), + RUBY("ruby", "Rubin", new ToolMaterial(3), 3, 1, 0), + CHARGED("charged", "Ladungs", "Geladener Staub", new ToolMaterial(3), "charged_powder", 1, 4, 2), + DIAMOND("diamond", "Diamant", new ToolMaterial(3, 12.0f, 2.0f, 1561, 8, 3, 10, true, 33, 10, 3, 8, 6, 3), 3, 1, 0), THETIUM("thetium", "Thetium", "Thi-Fragment", new ToolMaterial(4, 20.0f, 4.0f, 3451, 11, 7, 12, false, 59, 12, 4, 9, 7, 4), "thi_fragment", 5, 1, 0), ARDITE("ardite", "Ardit", "Ahrd-Fragment", new ToolMaterial(5, 30.0f, 12.0f, 7320, 15, 11, 12, 86, 12, 6, 12, 9, 5), "ahrd_fragment", 7, 1, 0), GYRIYN("gyriyn", "Gyriyn", "Ghi-Fragment", new ToolMaterial(5, 7320, 15, 11, 12, false), "ghi_fragment", 7, 1, 0), - NICHUN("nichun", "Nichun", "Nieh-Fragment", new ToolMaterial(6, 50.0f, 40.0f, 21300, 20, 18, 15, false, 172, 15, 12, 23, 14, 11), "nieh_fragment", 10, 1, 0), - RUBY("ruby", "Rubin", new ToolMaterial(3), "ruby", 3, 1, 0), - CINNABAR("cinnabar", "Zinnober", new ToolMaterial(2), "cinnabar", 2, 1, 1); + NICHUN("nichun", "Nichun", "Nieh-Fragment", new ToolMaterial(6, 50.0f, 40.0f, 21300, 20, 18, 15, false, 172, 15, 12, 23, 14, 11), "nieh_fragment", 10, 1, 0); public final ToolMaterial material; public final String name; @@ -18,6 +24,13 @@ public enum OreType { public final int dropQuantity; public final int bonusChance; + private int fuel; + private int compressability; + + private OreType(String name, String display, ToolMaterial material, int xpDrop, int dropped, int bonus) { + this(name, display, material, name, xpDrop, dropped, bonus); + } + private OreType(String name, String display, ToolMaterial material, String gem, int xpDrop, int dropped, int bonus) { this(name, display, display, material, gem, xpDrop, dropped, bonus); } @@ -32,4 +45,22 @@ public enum OreType { this.dropQuantity = dropped; this.bonusChance = bonus; } + + protected OreType setFuel(int fuel) { + this.fuel = fuel; + return this; + } + + protected OreType setCompressability(int comp) { + this.compressability = comp; + return this; + } + + public int getFuel() { + return this.fuel; + } + + public int getCompressability() { + return this.compressability; + } } diff --git a/common/src/main/java/common/init/SmeltingRegistry.java b/common/src/main/java/common/init/SmeltingRegistry.java index f5bb236f..557ecfca 100755 --- a/common/src/main/java/common/init/SmeltingRegistry.java +++ b/common/src/main/java/common/init/SmeltingRegistry.java @@ -10,95 +10,79 @@ import common.item.consumable.ItemFishFood; import java.util.Set; -public abstract class SmeltingRegistry -{ - private static final Map smeltingList = Maps.newHashMap(); - private static final Map experienceList = Maps.newHashMap(); - - private static boolean compareItemStacks(ItemStack stack1, ItemStack stack2) - { - return stack2.getItem() == stack1.getItem(); - } +public abstract class SmeltingRegistry { + private static final Map smeltingList = Maps.newHashMap(); + private static final Map experienceList = Maps.newHashMap(); - static void register() - { - add(Items.sand, new ItemStack(Items.glass), 0.1F); - add(Items.red_sand, new ItemStack(Items.glass), 0.1F); - add(Items.porkchop, new ItemStack(Items.cooked_porkchop), 0.35F); - add(Items.beef, new ItemStack(Items.cooked_beef), 0.35F); - add(Items.chicken, new ItemStack(Items.cooked_chicken), 0.35F); - add(Items.cobblestone, new ItemStack(Items.stone), 0.1F); - add(Items.stonebrick, new ItemStack(Items.cracked_stonebrick), 0.1F); - add(Items.clay_lump, new ItemStack(Items.brick), 0.3F); - add(Items.clay, new ItemStack(Items.hardened_clay), 0.35F); - add(Items.hellrock, new ItemStack(Items.bloodbrick), 0.1F); + private static boolean compareItemStacks(ItemStack stack1, ItemStack stack2) { + return stack2.getItem() == stack1.getItem(); + } - for (ItemFishFood.FishType fish : ItemFishFood.FishType.values()) - { - add(ItemRegistry.byName(fish.getName()), new ItemStack(ItemRegistry.byName("cooked_" + fish.getName())), 0.35F); - } + static void register() { + add(Items.sand, Items.glass, 0.1F); + add(Items.red_sand, Items.glass, 0.1F); + add(Items.porkchop, Items.cooked_porkchop, 0.35F); + add(Items.beef, Items.cooked_beef, 0.35F); + add(Items.chicken, Items.cooked_chicken, 0.35F); + add(Items.cobblestone, Items.stone, 0.1F); + add(Items.stonebrick, Items.cracked_stonebrick, 0.1F); + add(Items.clay_lump, Items.brick, 0.3F); + add(Items.clay, Items.hardened_clay, 0.35F); + add(Items.hellrock, Items.bloodbrick, 0.1F); - add(Items.emerald_ore, new ItemStack(Items.emerald), 1.0F); - add(Items.coal_ore, new ItemStack(Items.coal), 0.1F); - add(Items.lapis_ore, new ItemStack(Items.lapis_lazuli), 0.2F); - add(Items.quartz_ore, new ItemStack(Items.quartz), 0.2F); - add(Items.charge_ore, new ItemStack(Items.charged_powder), 0.7F); + for(ItemFishFood.FishType fish : ItemFishFood.FishType.values()) { + add(ItemRegistry.byName(fish.getName()), ItemRegistry.byName("cooked_" + fish.getName()), 0.35F); + } - for(OreType ore : OreType.values()) { - Item item = ItemRegistry.byName(ore.item); - add(ItemRegistry.byName(ore.name + "_ore"), new ItemStack(item), ((float)ore.experience) / 3.0F); - } - for(MetalType metal : MetalType.values()) { - Item item = ItemRegistry.byName(metal.isPowder ? (metal.name + "_powder") : (metal.name + "_ingot")); - add(ItemRegistry.byName(metal.name + "_ore"), new ItemStack(item), 0.7F); - } - for(WoodType wood : WoodType.values()) { - add(ItemRegistry.byName(wood.getName() + "_log"), new ItemStack(Items.charcoal), 0.15F); - } - } - - private static void add(Item input, ItemStack stack, float experience) - { - add(new ItemStack(input), stack, experience); - } - - private static void add(ItemStack input, ItemStack stack, float experience) - { - smeltingList.put(input, stack); - experienceList.put(stack, Float.valueOf(experience)); - } - - public static ItemStack getResult(ItemStack stack) - { - for (Entry entry : smeltingList.entrySet()) - { - if (compareItemStacks(stack, (ItemStack)entry.getKey())) - { - return (ItemStack)entry.getValue(); - } - } + for(OreType ore : OreType.values()) { + Item item = ItemRegistry.byName(ore.item); + add(ItemRegistry.byName(ore.name + "_ore"), item, ((float)ore.experience) / 3.0F); + } + for(MetalType metal : MetalType.values()) { + Item item = ItemRegistry.byName(metal.isPowder ? (metal.name + "_powder") : (metal.name + "_ingot")); + add(ItemRegistry.byName(metal.name + "_ore"), item, 0.7F); + } + for(WoodType wood : WoodType.values()) { + add(ItemRegistry.byName(wood.getName() + "_log"), Items.charcoal, 0.15F); + } + for(MineralType mineral : MineralType.values()) { + Item item = ItemRegistry.byName(mineral.name); + add(ItemRegistry.byName(mineral.name + "_ore"), item, ((float)mineral.experience) / 10.0F); + } + } - return null; - } + private static void add(Item input, Item output, float experience) { + add(new ItemStack(input), new ItemStack(output), experience); + } - public static float getExperience(ItemStack stack) - { - for (Entry entry : experienceList.entrySet()) - { - if (compareItemStacks(stack, (ItemStack)entry.getKey())) - { - return ((Float)entry.getValue()).floatValue(); - } - } + private static void add(ItemStack input, ItemStack stack, float experience) { + smeltingList.put(input, stack); + experienceList.put(stack, Float.valueOf(experience)); + } - return 0.0F; - } + public static ItemStack getResult(ItemStack stack) { + for(Entry entry : smeltingList.entrySet()) { + if(compareItemStacks(stack, (ItemStack)entry.getKey())) { + return (ItemStack)entry.getValue(); + } + } - public static void getSmeltingList(Set set) - { - for (ItemStack itemstack : smeltingList.values()) - { - set.add(itemstack.getItem()); - } - } + return null; + } + + public static float getExperience(ItemStack stack) { + for(Entry entry : experienceList.entrySet()) { + if(compareItemStacks(stack, (ItemStack)entry.getKey())) { + return ((Float)entry.getValue()).floatValue(); + } + } + + return 0.0F; + } + + public static void getSmeltingList(Set set) { + for(ItemStack itemstack : smeltingList.values()) { + set.add(itemstack.getItem()); + } + } } diff --git a/common/src/main/java/common/util/Util.java b/common/src/main/java/common/util/Util.java index 72b6d22b..f1bea97d 100644 --- a/common/src/main/java/common/util/Util.java +++ b/common/src/main/java/common/util/Util.java @@ -36,6 +36,7 @@ public abstract class Util { public static final int PROTOCOL = Version.MAJOR << 16 | Version.MINOR << 8 | Version.PATCH; public static final String VERSION = "v" + Version.MAJOR + "." + Version.MINOR + "." + Version.PATCH + Version.RELEASE; private static final String[] TIERS = new String[] {"II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"}; + private static final String[] COMPRESSION = new String[] {"Zwei", "Drei", "Vier", "Fünf", "Sechs", "Sieben", "Acht", "Neun", "Zehn", "Elf", "Zwölf"}; private static boolean crashed; @@ -536,6 +537,10 @@ public abstract class Util { public static String getTierSuffix(int tier) { return tier <= 0 ? "" : " " + (tier > TIERS.length ? (tier + 1) : TIERS[tier - 1]); } + + public static String getCompressionPrefix(String prefix, int level) { + return level <= 0 ? "" : (level == 1 ? prefix + " " : (level > TIERS.length ? level + "-Fach " + prefix.toLowerCase() + " " : COMPRESSION[level - 2] + "fach " + prefix.toLowerCase() + " ")); + } public static ThreadFactory getThreadFactory(String name) { final String format = name + " #%d"; diff --git a/server/src/main/java/server/init/UniverseRegistry.java b/server/src/main/java/server/init/UniverseRegistry.java index 0fbf3e61..0fc35ebc 100755 --- a/server/src/main/java/server/init/UniverseRegistry.java +++ b/server/src/main/java/server/init/UniverseRegistry.java @@ -535,7 +535,7 @@ public abstract class UniverseRegistry extends DimensionRegistry { .addOre(Blocks.gravel.getState(), 8, 0, 33, 0, 256, false) .addOre(Blocks.rock.getState(), 6, 0, 22, 24, 72, false) .addOre(Blocks.coal_ore.getState(), 20, 0, 17, 0, 128, false) - .addOre(Blocks.charge_ore.getState(), 8, 0, 8, 0, 16, false) + .addOre(Blocks.charged_ore.getState(), 8, 0, 8, 0, 16, false) .addOre(Blocks.lapis_ore.getState(), 1, 0, 7, 16, 16, true) .addOre(Blocks.diamond_ore.getState(), 1, 0, 8, 0, 16, false) .addOre(Blocks.ruby_ore.getState(), 1, 0, 4, 12, 8, true) diff --git a/server/src/main/java/server/world/Converter.java b/server/src/main/java/server/world/Converter.java index 74c4d7b1..536ca100 100644 --- a/server/src/main/java/server/world/Converter.java +++ b/server/src/main/java/server/world/Converter.java @@ -737,8 +737,8 @@ public abstract class Converter { mapBlock(Blocks.iron_door, 71); mapBlock(Blocks.wooden_pressure_plate.getState().withProperty(BlockPressurePlate.POWERED, false), 72); mapBlock(Blocks.wooden_pressure_plate.getState().withProperty(BlockPressurePlate.POWERED, true), 72, 1); - mapBlock(Blocks.charge_ore, 73); - mapBlock(Blocks.charge_ore, 74); + mapBlock(Blocks.stone, 73); + mapBlock(Blocks.stone, 74); mapBlock(Blocks.lit_torch.getState().withProperty(BlockTorch.FACING, Facing.UP), 75); mapBlock(Blocks.lit_torch.getState().withProperty(BlockTorch.FACING, Facing.EAST), 75, 1); mapBlock(Blocks.lit_torch.getState().withProperty(BlockTorch.FACING, Facing.WEST), 75, 2);