mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 16:27:45 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
d4366617d1
8 files changed
+251
-89
No files matched your search
@@ -12,6 +12,7 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockCarvable;
|
||||
import com.cricketcraft.chisel.compat.Compatibility;
|
||||
import com.cricketcraft.chisel.compat.IMCHandler;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
@@ -31,7 +32,9 @@ import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
|
||||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
@@ -158,6 +161,13 @@ public class Chisel {
|
||||
Compatibility.init(event);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onIMC(IMCEvent event) {
|
||||
for (IMCMessage msg : event.getMessages()) {
|
||||
IMCHandler.INSTANCE.handleMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
|
||||
if (event.modID.equals("chisel")) {
|
||||
|
||||
@@ -1225,9 +1225,9 @@ public enum Features {
|
||||
lead.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/lead/caution");
|
||||
lead.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/lead/crate");
|
||||
lead.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/lead/thermal");
|
||||
lead.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/lead/adv");
|
||||
lead.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/lead/egregious");
|
||||
lead.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/lead/bolted");
|
||||
lead.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/lead/adv");
|
||||
lead.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/lead/egregious");
|
||||
lead.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/lead/bolted");
|
||||
lead.carverHelper.registerAll(lead, "leadblock");
|
||||
Carving.chisel.registerOre("leadblock", "blockLead");
|
||||
}
|
||||
@@ -1807,12 +1807,17 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.abyssal"), 0, 0);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.abyssal"), 1, 1);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.abyssal"), 2, 2);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.abyssal"), 3, 3);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.abyssal"), 4, 4);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.abyssal"), 5, 5);
|
||||
Block abyssal = GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.abyssal");
|
||||
if (abyssal == null) {
|
||||
abyssal = GameRegistry.findBlock("Railcraft", "brick.abyssal");
|
||||
}
|
||||
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 0, 0);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 1, 1);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 2, 2);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 3, 3);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 4, 4);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 5, 5);
|
||||
Carving.chisel.registerOre("RCAbyssalBlock", "RCAbyssalBlock");
|
||||
};
|
||||
},
|
||||
@@ -1820,12 +1825,17 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
Carving.chisel.addVariation("RCBleachedBone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bleachedbone"), 0, 0);
|
||||
Carving.chisel.addVariation("RCBleachedBone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bleachedbone"), 1, 1);
|
||||
Carving.chisel.addVariation("RCBleachedBone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bleachedbone"), 2, 2);
|
||||
Carving.chisel.addVariation("RCBleachedBone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bleachedbone"), 3, 3);
|
||||
Carving.chisel.addVariation("RCBleachedBone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bleachedbone"), 4, 4);
|
||||
Carving.chisel.addVariation("RCBleachedBone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bleachedbone"), 5, 5);
|
||||
Block bleachedBone = GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bleachedbone");
|
||||
if (bleachedBone == null) {
|
||||
bleachedBone = GameRegistry.findBlock("Railcraft", "brick.bleachedbone");
|
||||
}
|
||||
|
||||
Carving.chisel.addVariation("RCBleachedBone", bleachedBone, 0, 0);
|
||||
Carving.chisel.addVariation("RCBleachedBone", bleachedBone, 1, 1);
|
||||
Carving.chisel.addVariation("RCBleachedBone", bleachedBone, 2, 2);
|
||||
Carving.chisel.addVariation("RCBleachedBone", bleachedBone, 3, 3);
|
||||
Carving.chisel.addVariation("RCBleachedBone", bleachedBone, 4, 4);
|
||||
Carving.chisel.addVariation("RCBleachedBone", bleachedBone, 5, 5);
|
||||
Carving.chisel.registerOre("RCBleachedBone", "RCBleachedBone");
|
||||
}
|
||||
},
|
||||
@@ -1834,12 +1844,17 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
Carving.chisel.addVariation("RCBloodStained", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bloodstained"), 0, 0);
|
||||
Carving.chisel.addVariation("RCBloodStained", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bloodstained"), 1, 1);
|
||||
Carving.chisel.addVariation("RCBloodStained", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bloodstained"), 2, 2);
|
||||
Carving.chisel.addVariation("RCBloodStained", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bloodstained"), 3, 3);
|
||||
Carving.chisel.addVariation("RCBloodStained", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bloodstained"), 4, 4);
|
||||
Carving.chisel.addVariation("RCBloodStained", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bloodstained"), 5, 5);
|
||||
Block bloodStained = GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.bloodstained");
|
||||
if (bloodStained == null) {
|
||||
bloodStained = GameRegistry.findBlock("Railcraft", "brick.bloodstained");
|
||||
}
|
||||
|
||||
Carving.chisel.addVariation("RCBloodStained", bloodStained, 0, 0);
|
||||
Carving.chisel.addVariation("RCBloodStained", bloodStained, 1, 1);
|
||||
Carving.chisel.addVariation("RCBloodStained", bloodStained, 2, 2);
|
||||
Carving.chisel.addVariation("RCBloodStained", bloodStained, 3, 3);
|
||||
Carving.chisel.addVariation("RCBloodStained", bloodStained, 4, 4);
|
||||
Carving.chisel.addVariation("RCBloodStained", bloodStained, 5, 5);
|
||||
Carving.chisel.registerOre("RCBloodStained", "RCBloodStained");
|
||||
}
|
||||
},
|
||||
@@ -1848,12 +1863,16 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.frostbound"), 0, 0);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.frostbound"), 1, 1);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.frostbound"), 2, 2);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.frostbound"), 3, 3);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.frostbound"), 4, 4);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.frostbound"), 5, 5);
|
||||
Block frostBound = GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.frostbound");
|
||||
if (frostBound == null) {
|
||||
frostBound = GameRegistry.findBlock("Railcraft", "brick.frostbound");
|
||||
}
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", frostBound, 0, 0);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", frostBound, 1, 1);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", frostBound, 2, 2);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", frostBound, 3, 3);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", frostBound, 4, 4);
|
||||
Carving.chisel.addVariation("RCFrostBoundBlock", frostBound, 5, 5);
|
||||
Carving.chisel.registerOre("RCFrostBoundBlock", "RCFrostBoundBlock");
|
||||
}
|
||||
},
|
||||
@@ -1862,12 +1881,16 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
Carving.chisel.addVariation("RCInfernalStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.infernal"), 0, 0);
|
||||
Carving.chisel.addVariation("RCInfernalStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.infernal"), 1, 1);
|
||||
Carving.chisel.addVariation("RCInfernalStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.infernal"), 2, 2);
|
||||
Carving.chisel.addVariation("RCInfernalStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.infernal"), 3, 3);
|
||||
Carving.chisel.addVariation("RCInfernalStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.infernal"), 4, 4);
|
||||
Carving.chisel.addVariation("RCInfernalStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.infernal"), 5, 5);
|
||||
Block infernal = GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.infernal");
|
||||
if (infernal == null) {
|
||||
infernal = GameRegistry.findBlock("Railcraft", "brick.infernal");
|
||||
}
|
||||
Carving.chisel.addVariation("RCInfernalStone", infernal, 0, 0);
|
||||
Carving.chisel.addVariation("RCInfernalStone", infernal, 1, 1);
|
||||
Carving.chisel.addVariation("RCInfernalStone", infernal, 2, 2);
|
||||
Carving.chisel.addVariation("RCInfernalStone", infernal, 3, 3);
|
||||
Carving.chisel.addVariation("RCInfernalStone", infernal, 4, 4);
|
||||
Carving.chisel.addVariation("RCInfernalStone", infernal, 5, 5);
|
||||
Carving.chisel.registerOre("RCInfernalStone", "RCInfernalStone");
|
||||
}
|
||||
},
|
||||
@@ -1876,12 +1899,16 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.quarried"), 0, 0);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.quarried"), 1, 1);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.quarried"), 2, 2);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.quarried"), 3, 3);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.quarried"), 4, 4);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.quarried"), 5, 5);
|
||||
Block quarried = GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.quarried");
|
||||
if (quarried == null) {
|
||||
quarried = GameRegistry.findBlock("Railcraft", "brick.quarried");
|
||||
}
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", quarried, 0, 0);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", quarried, 1, 1);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", quarried, 2, 2);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", quarried, 3, 3);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", quarried, 4, 4);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", quarried, 5, 5);
|
||||
Carving.chisel.registerOre("RCQuarriedBlock", "RCQuarriedBlock");
|
||||
};
|
||||
},
|
||||
@@ -1890,12 +1917,16 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
Carving.chisel.addVariation("RCSandyStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.sandy"), 0, 0);
|
||||
Carving.chisel.addVariation("RCSandyStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.sandy"), 1, 1);
|
||||
Carving.chisel.addVariation("RCSandyStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.sandy"), 2, 2);
|
||||
Carving.chisel.addVariation("RCSandyStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.sandy"), 3, 3);
|
||||
Carving.chisel.addVariation("RCSandyStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.sandy"), 4, 4);
|
||||
Carving.chisel.addVariation("RCSandyStone", GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.sandy"), 5, 5);
|
||||
Block sandy = GameRegistry.findBlock("Railcraft", "tile.railcraft.brick.sandy");
|
||||
if (sandy == null) {
|
||||
sandy = GameRegistry.findBlock("Railcraft", "brick.sandy");
|
||||
}
|
||||
Carving.chisel.addVariation("RCSandyStone", sandy, 0, 0);
|
||||
Carving.chisel.addVariation("RCSandyStone", sandy, 1, 1);
|
||||
Carving.chisel.addVariation("RCSandyStone", sandy, 2, 2);
|
||||
Carving.chisel.addVariation("RCSandyStone", sandy, 3, 3);
|
||||
Carving.chisel.addVariation("RCSandyStone", sandy, 4, 4);
|
||||
Carving.chisel.addVariation("RCSandyStone", sandy, 5, 5);
|
||||
Carving.chisel.registerOre("RCSandyStone", "RCSandyStone");
|
||||
}
|
||||
},
|
||||
@@ -2025,9 +2056,9 @@ public enum Features {
|
||||
silver.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/silver/caution");
|
||||
silver.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/silver/crate");
|
||||
silver.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/silver/thermal");
|
||||
silver.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/silver/adv");
|
||||
silver.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/silver/egregious");
|
||||
silver.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/silver/bolted");
|
||||
silver.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/silver/adv");
|
||||
silver.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/silver/egregious");
|
||||
silver.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/silver/bolted");
|
||||
silver.carverHelper.registerAll(silver, "silverblock");
|
||||
Carving.chisel.registerOre("silverblock", "blockSilver");
|
||||
}
|
||||
@@ -2053,7 +2084,8 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockSnakestone sand_snakestone = (BlockSnakestone) new BlockSnakestone("Chisel:snakestone/sandsnake/").setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setBlockName("chisel.snakestoneSand");
|
||||
BlockSnakestone sand_snakestone = (BlockSnakestone) new BlockSnakestone("Chisel:snakestone/sandsnake/").setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setBlockName(
|
||||
"chisel.snakestoneSand");
|
||||
GameRegistry.registerBlock(sand_snakestone, ItemCarvable.class, "sand_snakestone");
|
||||
// TODO- eat me!
|
||||
// LanguageRegistry.addName(new ItemStack(sandSnakestone, 1, 1),
|
||||
@@ -2086,7 +2118,8 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockSnakestoneObsidian obsidian_snakestone = (BlockSnakestoneObsidian) new BlockSnakestoneObsidian("Chisel:snakestone/obsidian/").setBlockName("chisel.obsidianSnakestone").setHardness(50.0F)
|
||||
BlockSnakestoneObsidian obsidian_snakestone = (BlockSnakestoneObsidian) new BlockSnakestoneObsidian("Chisel:snakestone/obsidian/").setBlockName("chisel.obsidianSnakestone")
|
||||
.setHardness(50.0F)
|
||||
.setResistance(2000.0F);
|
||||
GameRegistry.registerBlock(obsidian_snakestone, ItemCarvable.class, "obsidian_snakestone");
|
||||
Carving.chisel.addVariation("obsidian", obsidian_snakestone, 1, 16);
|
||||
@@ -2105,9 +2138,9 @@ public enum Features {
|
||||
steel.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/steel/caution");
|
||||
steel.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/steel/crate");
|
||||
steel.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/steel/thermal");
|
||||
steel.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/steel/adv");
|
||||
steel.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/steel/egregious");
|
||||
steel.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/steel/bolted");
|
||||
steel.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/steel/adv");
|
||||
steel.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/steel/egregious");
|
||||
steel.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/steel/bolted");
|
||||
steel.carverHelper.registerAll(steel, "steelblock");
|
||||
Carving.chisel.registerOre("steelblock", "blockSteel");
|
||||
}
|
||||
@@ -2187,7 +2220,7 @@ public enum Features {
|
||||
technical.carverHelper.addVariation("tile.technical.11.desc", 11, "technical/cables");
|
||||
technical.carverHelper.addVariation("tile.technical.12.desc", 12, "technical/rustyBoltedPlates");
|
||||
technical.carverHelper.addVariation("tile.technical.13.desc", 13, "technical/grate");
|
||||
technical.carverHelper.addVariation("tile.technical.14.desc", 14, "technical/malfunctionFan");
|
||||
technical.carverHelper.addVariation("tile.technical.14.desc", 14, "technical/fanMalfunction");
|
||||
technical.carverHelper.addVariation("tile.technical.15.desc", 15, "technical/grateRusty");
|
||||
technical.carverHelper.registerAll(technical, "technical");
|
||||
|
||||
@@ -2279,9 +2312,9 @@ public enum Features {
|
||||
tin.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/tin/caution");
|
||||
tin.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/tin/crate");
|
||||
tin.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/tin/thermal");
|
||||
tin.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/tin/adv");
|
||||
tin.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/tin/egregious");
|
||||
tin.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/tin/bolted");
|
||||
tin.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/tin/adv");
|
||||
tin.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/tin/egregious");
|
||||
tin.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/tin/bolted");
|
||||
tin.carverHelper.registerAll(tin, "tinblock");
|
||||
Carving.chisel.registerOre("tinblock", "blockTin");
|
||||
}
|
||||
@@ -2407,13 +2440,13 @@ public enum Features {
|
||||
void addBlocks() {
|
||||
BlockCarvable uranium = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
uranium.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/uranium/caution");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/uranium/crate");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/uranium/thermal");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/uranium/adv");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/uranium/egregious");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/uranium/bolted");
|
||||
uranium.carverHelper.registerAll(uranium, "uraniumblock");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/uranium/caution");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/uranium/crate");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/uranium/thermal");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/uranium/adv");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/uranium/egregious");
|
||||
uranium.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/uranium/bolted");
|
||||
uranium.carverHelper.registerAll(uranium, "uraniumblock");
|
||||
Carving.chisel.registerOre("uraniumblock", "blockUranium");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.cricketcraft.chisel.api;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
|
||||
/**
|
||||
* Use the enum constants (using {@link #key} or calling {@link #toString()}) in this class as keys for IMC messages sent to chisel
|
||||
*/
|
||||
public enum IMC {
|
||||
|
||||
/**
|
||||
* Adds a variation to a group.
|
||||
*
|
||||
* Use this to add a variation to a group. String syntax:
|
||||
* <p>
|
||||
* groupname|blockname|meta
|
||||
* <p>
|
||||
* An example would be {@code "mygroup|minecraft:dirt|1"} and this will add the vanilla dirt block with metadata 1 to the "mygroup" group, creating that group if need be.
|
||||
*/
|
||||
ADD_VARIATION("variation:add"),
|
||||
|
||||
/**
|
||||
* Removes a variation from a group.
|
||||
*
|
||||
* Use this to remove a variation from a group. String syntax:
|
||||
* <p>
|
||||
* groupname|blockname|meta
|
||||
* <p>
|
||||
* An example would be {@code "mygroup|minecraft:dirt|1"} and this will add the vanilla dirt block with metadata 1 to the "mygroup" group, creating that group if need be.
|
||||
*/
|
||||
REMOVE_VARIATION("variation:remove"),
|
||||
|
||||
/**
|
||||
* Registers an oredict name to a group. This can be used to automatically add all blocks with this oredict name to a group. String syntax:
|
||||
* <p>
|
||||
* groupname|oredictname
|
||||
* <p>
|
||||
* An example would be {@code "mygroup|plankWood"} which will add all blocks registered in the oredict as "plankWood" to your group called "mygroup".
|
||||
*/
|
||||
REGISTER_GROUP_ORE("group:ore");
|
||||
|
||||
/**
|
||||
* The IMC message key for this message type.
|
||||
*/
|
||||
public final String key;
|
||||
|
||||
IMC(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* The modid of Chisel so you can easily send IMC to this mod.
|
||||
*/
|
||||
public static final String CHISEL_MODID = Chisel.MOD_ID;
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -11,14 +16,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockCarvable extends Block implements ICarvable {
|
||||
|
||||
@@ -31,6 +29,9 @@ public class BlockCarvable extends Block implements ICarvable {
|
||||
|
||||
public BlockCarvable(Material m) {
|
||||
super(m);
|
||||
if (m == Material.rock || m == Material.iron) {
|
||||
setHarvestLevel("pickaxe", 0);
|
||||
}
|
||||
carverHelper = new CarvableHelper();
|
||||
setResistance(10.0F);
|
||||
setHardness(2.0F);
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockTexturedOre;
|
||||
import com.cricketcraft.chisel.utils.Drawing;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockTexturedOre;
|
||||
import com.cricketcraft.chisel.utils.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class BlockTexturedOreRenderer implements ISimpleBlockRenderingHandler {
|
||||
|
||||
float bot = -0.001f, top = 1.0f - bot;
|
||||
@@ -56,15 +53,17 @@ public class BlockTexturedOreRenderer implements ISimpleBlockRenderingHandler {
|
||||
renderer.overrideBlockTexture = block.icon;
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.overrideBlockTexture = null;
|
||||
return true;
|
||||
} else if (block.base != null) {
|
||||
renderer.renderBlockByRenderType(block.base, x, y, z);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
renderer.setRenderBounds(bot, bot, bot, top, top, top);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.setRenderBounds(0, 0, 0, 1, 1, 1);
|
||||
return renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cricketcraft.chisel.compat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.IMC;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingRegistry;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
|
||||
public class IMCHandler {
|
||||
|
||||
public static final IMCHandler INSTANCE = new IMCHandler();
|
||||
|
||||
private int order = 1000;
|
||||
|
||||
private IMCHandler() {
|
||||
}
|
||||
|
||||
public void handleMessage(IMCMessage message) {
|
||||
for (IMC imc : IMC.values()) {
|
||||
if (imc.key.equals(message.key)) {
|
||||
handle(message, imc, message.getStringValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void handle(IMCMessage message, IMC type, String value) {
|
||||
ICarvingRegistry reg = Carving.chisel;
|
||||
String[] data = value.split("\\|");
|
||||
try {
|
||||
switch (type) {
|
||||
case ADD_VARIATION:
|
||||
case REMOVE_VARIATION:
|
||||
Block block = (Block) Block.blockRegistry.getObject(data[1]);
|
||||
int meta = Short.parseShort(data[2]);
|
||||
if (type == IMC.ADD_VARIATION) {
|
||||
reg.addVariation(data[0], block, meta, order++);
|
||||
} else {
|
||||
reg.removeVariation(block, meta, data[0]);
|
||||
}
|
||||
case REGISTER_GROUP_ORE:
|
||||
reg.registerOre(data[0], data[1]);
|
||||
default:
|
||||
throw new IllegalArgumentException("Invalid IMC constant! How...what...?");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Chisel.logger.error("Could not handle data {} for IMC type {}. This was sent from mod {}.\n"
|
||||
+ "!! This is a bug in that mod !!\nSwallowing error and continuing...",
|
||||
value, type.name(), message.getSender());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.cricketcraft.chisel.inventory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
import java.util.List;
|
||||
|
||||
public class InventoryChiselSelection implements IInventory {
|
||||
|
||||
@@ -163,6 +163,11 @@ public class InventoryChiselSelection implements IInventory {
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
//Really didn't think people would chisel a shovel
|
||||
if (stack.getItem() instanceof ItemTool) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !(stack != null && (stack.getItem() instanceof ItemChisel)) && i == normalSlots;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 290 B |
Reference in new issue
Block a user