From 6b7e5c6e28a1753276970a7b552bdd40e76cff7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sun, 3 Jul 2016 12:54:02 +0200 Subject: [PATCH] A few server mode fixes --- src/java/mmm/tech/base/alloy_furnace/AlloyFurnace.java | 8 +++++++- src/java/mmm/tech/base/alloy_furnace/TBAFBlock.java | 3 --- src/java/mmm/tech/tools/TTArmor.java | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/java/mmm/tech/base/alloy_furnace/AlloyFurnace.java b/src/java/mmm/tech/base/alloy_furnace/AlloyFurnace.java index 49eeaee..606dcb9 100644 --- a/src/java/mmm/tech/base/alloy_furnace/AlloyFurnace.java +++ b/src/java/mmm/tech/base/alloy_furnace/AlloyFurnace.java @@ -4,6 +4,7 @@ package mmm.tech.base.alloy_furnace; import mmm.utils.UNetwork; import mmm.utils.URegistry; import mmm.utils.gui.GUIUtils; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.GameRegistry; @@ -14,6 +15,8 @@ public enum AlloyFurnace { INSTANCE; + public final CreativeTabs CREATIVE_TAB = CreativeTabs.DECORATIONS; + public final TBAFBlock INACTIVE; public final TBAFBlock ACTIVE; public final Item ITEM; @@ -22,11 +25,14 @@ public enum AlloyFurnace { private AlloyFurnace( ) { this.INACTIVE = new TBAFBlock( false ); + this.INACTIVE.setCreativeTab( this.CREATIVE_TAB ); + this.ACTIVE = new TBAFBlock( true ); + this.ACTIVE.setCreativeTab( this.CREATIVE_TAB ); this.ITEM = new ItemBlock( this.INACTIVE )// .setMaxStackSize( 16 )// - .setCreativeTab( this.INACTIVE.getCreativeTabToDisplayOn( ) ); + .setCreativeTab( this.CREATIVE_TAB ); URegistry.setIdentifiers( this.ITEM , "tech" , "base" , "alloy_furnace" ); URegistry.addBlock( this.INACTIVE , this.ITEM ); diff --git a/src/java/mmm/tech/base/alloy_furnace/TBAFBlock.java b/src/java/mmm/tech/base/alloy_furnace/TBAFBlock.java index f3839e3..8732388 100644 --- a/src/java/mmm/tech/base/alloy_furnace/TBAFBlock.java +++ b/src/java/mmm/tech/base/alloy_furnace/TBAFBlock.java @@ -20,7 +20,6 @@ import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -68,8 +67,6 @@ public class TBAFBlock super( Material.ROCK ); this.active = active; - this.setCreativeTab( CreativeTabs.DECORATIONS ); - this.setResistance( 17.5f ); this.setHardness( 3.5f ); this.setHarvestLevel( "pickaxe" , 0 ); diff --git a/src/java/mmm/tech/tools/TTArmor.java b/src/java/mmm/tech/tools/TTArmor.java index 6836818..856067a 100644 --- a/src/java/mmm/tech/tools/TTArmor.java +++ b/src/java/mmm/tech/tools/TTArmor.java @@ -28,7 +28,7 @@ public class TTArmor { String l0 , l1 , l2; - switch ( this.getEquipmentSlot( ) ) { + switch ( this.armorType ) { case CHEST: l0 = "I I";