Complete Distributor

This commit is contained in:
modmuss50 2016-05-15 09:53:38 +01:00
parent 3eb4eec55a
commit 61bf289f43
2 changed files with 9 additions and 3 deletions

View file

@ -8,6 +8,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
@ -31,7 +32,7 @@ public class BlockDistributor extends Block {
public static ItemStack getReleaseStack(){
ItemStack newStack = new ItemStack(Items.SHIELD);
ItemNBTHelper.setString(newStack, "type", "modmuss50");
ItemNBTHelper.setString(newStack, "type", "btm");
ItemNBTHelper.setBoolean(newStack, "vanilla", false);
return newStack;
}
@ -67,7 +68,7 @@ public class BlockDistributor extends Block {
if(entityIn instanceof EntityPlayer){
EntityPlayer player = (EntityPlayer) entityIn;
if(player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() == Items.SHIELD){
if(ItemNBTHelper.getString(player.getHeldItemOffhand(), "type", "null").equals("modmuss50")){
if(ItemNBTHelper.getString(player.getHeldItemOffhand(), "type", "null").equals("btm")){
return;
}
}
@ -75,4 +76,9 @@ public class BlockDistributor extends Block {
}
}
}
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
return EnumBlockRenderType.INVISIBLE;
}
}

View file

@ -1,5 +1,5 @@
{
"variants": {
"nortmal": { "model": "techreborn:techreborn.distributor" }
"normal": { "model": "techreborn:techreborn.distributor" }
}
}