Cleanup and get other wands working.

This commit is contained in:
James McKay committed 2015-11-30 23:41:05 +11:00
1 parent f345abc27d
commit ffa72fe772
17 files changed
+235 -246

No files matched your search

@@ -10,14 +10,18 @@ import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.item.Item;
import net.minecraftforge.common.MinecraftForge;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.simple.SimpleLogger;
import org.apache.logging.log4j.util.PropertiesUtil;
import portablejim.bbw.core.BlockEvents;
import portablejim.bbw.core.items.ItemRestrictedWandAdvanced;
import portablejim.bbw.core.items.ItemRestrictedWandBasic;
import portablejim.bbw.core.items.ItemUnbreakableWand;
import portablejim.bbw.core.items.ItemUnrestrictedWand;
import portablejim.bbw.core.wands.RestrictedWand;
import portablejim.bbw.core.wands.UnbreakingWand;
import portablejim.bbw.network.PacketWandActivate;
import portablejim.bbw.proxy.IProxy;
@@ -38,8 +42,10 @@ public class BetterBuildersWandsMod {
public static Logger logger = new SimpleLogger("BetterBuildersWand", Level.ALL, true, false, true, false, "YYYY-MM-DD", null, PropertiesUtil.getProperties(), null);
public static ItemUnbreakableWand itemUnbreakableWand;
public static ItemRestrictedWandBasic itemDiamondWand;
public static ItemRestrictedWandBasic itemStoneWand;
public static ItemRestrictedWandAdvanced itemIronWand;
public static ItemUnrestrictedWand itemDiamondWand;
public static ItemUnrestrictedWand itemUnbreakableWand;
public SimpleNetworkWrapper networkWrapper;
@@ -47,10 +53,15 @@ public class BetterBuildersWandsMod {
public void preInit(FMLPreInitializationEvent event) {
logger = event.getModLog();
itemUnbreakableWand = new ItemUnbreakableWand();
itemDiamondWand = new ItemRestrictedWandBasic(200);
GameRegistry.registerItem(itemUnbreakableWand, "unbreakableWand");
GameRegistry.registerItem(itemDiamondWand, "diamondWand");
itemStoneWand = new ItemRestrictedWandBasic(new RestrictedWand(5));
itemIronWand = new ItemRestrictedWandAdvanced(new RestrictedWand(9));
itemDiamondWand = new ItemUnrestrictedWand(new RestrictedWand(Item.ToolMaterial.EMERALD.getMaxUses()), "Unrestricted", "Diamond");
itemDiamondWand.setMaxDamage(Item.ToolMaterial.EMERALD.getMaxUses());
itemUnbreakableWand = new ItemUnrestrictedWand(new UnbreakingWand(), "Unbreakable", "Unbreakable");
GameRegistry.registerItem(itemStoneWand, "wandStone");
GameRegistry.registerItem(itemIronWand, "wandIron");
GameRegistry.registerItem(itemDiamondWand, "wandDiamond");
GameRegistry.registerItem(itemUnbreakableWand, "wandUnbreakable");
networkWrapper = NetworkRegistry.INSTANCE.newSimpleChannel("bbwands");
networkWrapper.registerMessage(PacketWandActivate.Handler.class, PacketWandActivate.class, 0, Side.SERVER);