Port to 1.11
This commit is contained in:
@@ -46,6 +46,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@@ -330,11 +331,11 @@ public class BlockCableBus extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
this.cb( w, pos ).onNeighborChanged();
|
||||
this.cb( world, pos ).onNeighborChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,7 +378,7 @@ public class BlockCableBus extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
public void getSubBlocks( final Item item, final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@@ -170,9 +170,9 @@ public class BlockController extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
|
||||
{
|
||||
final TileController tc = this.getTileEntity( w, pos );
|
||||
final TileController tc = this.getTileEntity( world, pos );
|
||||
if( tc != null )
|
||||
{
|
||||
tc.onNeighborChange( false );
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
package appeng.block.networking;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -28,6 +26,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -63,7 +62,7 @@ public class BlockEnergyCell extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
public void getSubBlocks( final Item item, final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
|
||||
{
|
||||
super.getSubBlocks( item, tabs, itemStacks );
|
||||
|
||||
|
||||
@@ -22,14 +22,11 @@ package appeng.block.networking;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
@@ -47,6 +44,7 @@ import appeng.helpers.ICustomCollision;
|
||||
import appeng.tile.networking.TileWireless;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
@@ -63,7 +61,6 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static final PropertyEnum<State> STATE = PropertyEnum.create( "state", State.class );
|
||||
|
||||
public BlockWireless()
|
||||
@@ -111,7 +108,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer player, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user