Complete Distributor
This commit is contained in:
parent
3eb4eec55a
commit
61bf289f43
2 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"nortmal": { "model": "techreborn:techreborn.distributor" }
|
||||
"normal": { "model": "techreborn:techreborn.distributor" }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue