Remove needed block, update forge

This commit is contained in:
modmuss50 2016-08-01 09:37:55 +01:00
parent 25e709239f
commit cb44c79256
3 changed files with 1 additions and 88 deletions

View file

@ -72,7 +72,7 @@ if (ENV.BUILD_NUMBER) {
}
minecraft {
version = "1.10.2-12.18.0.2006-1.10.0"
version = "1.10.2-12.18.1.2044"
if(ENV.JOB_BASE_NAME == "TechReborn-1.10"){
version = "1.10-12.18.0.1992-1.10.0"
}

View file

@ -1,83 +0,0 @@
package techreborn.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
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;
import net.minecraft.world.World;
import reborncore.common.util.ItemNBTHelper;
import techreborn.client.TechRebornCreativeTab;
/**
* Created by mark on 14/05/16.
*/
public class BlockDistributor extends Block {
AxisAlignedBB AABB = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.0625D, 0.9375D);
public BlockDistributor( ) {
super(Material.IRON);
setHardness(2f);
setUnlocalizedName("techreborn.distributor");
}
public static ItemStack getReleaseStack(){
ItemStack newStack = new ItemStack(Items.SHIELD);
ItemNBTHelper.setString(newStack, "type", "btm");
ItemNBTHelper.setBoolean(newStack, "vanilla", false);
return newStack;
}
@Override
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) {
return NULL_AABB;
}
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
return AABB;
}
public boolean isOpaqueCube(IBlockState state)
{
return false;
}
public boolean isFullCube(IBlockState state)
{
return false;
}
public boolean isPassable(IBlockAccess worldIn, BlockPos pos)
{
return true;
}
@Override
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
if(!entityIn.worldObj.isRemote){
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("btm")){
return;
}
}
player.setItemStackToSlot(EntityEquipmentSlot.OFFHAND, getReleaseStack());
}
}
}
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
return EnumBlockRenderType.INVISIBLE;
}
}

View file

@ -171,7 +171,6 @@ public class ModBlocks
public static Block rubberPlanks;
public static Block ironFence;
public static Block distributor;
public static void init()
{
@ -438,9 +437,6 @@ public class ModBlocks
registerBlock(scrapboxinator, "scrapboxinator");
GameRegistry.registerTileEntity(TileScrapboxinator.class, "TileScrapboxinatorTR");
distributor = new BlockDistributor();
registerBlock(distributor, "distributor");
evt = new BlockEVTransformer();
registerBlock(evt, "evt");
GameRegistry.registerTileEntity(TileEVTransformer.class, "TileEVTransformer");