1.15 port

This commit is contained in:
yueh
2020-05-18 14:02:45 +02:00
parent 0ea86c939c
commit 16d6d55d7f
630 changed files with 4211 additions and 12664 deletions
@@ -26,40 +26,40 @@ import java.util.Random;
import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.BlockStateContainer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleDigging;
import net.minecraft.client.particle.ParticleManager;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.state.IProperty;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.RayTraceResult.Type;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.property.ExtendedBlockState;
import net.minecraftforge.common.property.IExtendedBlockState;
import net.minecraftforge.common.property.IUnlistedProperty;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import appeng.api.parts.IFacadeContainer;
import appeng.api.parts.IFacadePart;
@@ -71,7 +71,6 @@ import appeng.block.AEBaseTileBlock;
import appeng.client.UnlistedProperty;
import appeng.client.render.cablebus.CableBusBakedModel;
import appeng.client.render.cablebus.CableBusRenderState;
import appeng.core.Api;
import appeng.core.AppEng;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketClick;
@@ -110,7 +109,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public boolean isFullCube( IBlockState state )
public boolean isFullCube( BlockState state )
{
return false;
}
@@ -122,7 +121,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public IBlockState getExtendedState( IBlockState state, IBlockAccess world, BlockPos pos )
public BlockState getExtendedState( BlockState state, IBlockReader world, BlockPos pos )
{
CableBusRenderState renderState = this.cb( world, pos ).getRenderState();
renderState.setWorld( world );
@@ -131,25 +130,25 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public void randomDisplayTick( final IBlockState state, final World worldIn, final BlockPos pos, final Random rand )
public void randomDisplayTick( final BlockState state, final World worldIn, final BlockPos pos, final Random rand )
{
this.cb( worldIn, pos ).randomDisplayTick( worldIn, pos, rand );
}
@Override
public void onNeighborChange( final IBlockAccess w, final BlockPos pos, final BlockPos neighbor )
public void onNeighborChange( final IBlockReader w, final BlockPos pos, final BlockPos neighbor )
{
this.cb( w, pos ).onNeighborChanged( w, pos, neighbor );
}
@Override
public Item getItemDropped( final IBlockState state, final Random rand, final int fortune )
public Item getItemDropped( final BlockState state, final Random rand, final int fortune )
{
return null;
}
@Override
public int getWeakPower( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
public int getWeakPower( final BlockState state, final IBlockReader w, final BlockPos pos, final Direction side )
{
return this.cb( w, pos ).isProvidingWeakPower( side.getOpposite() ); // TODO:
// IS
@@ -157,19 +156,19 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public boolean canProvidePower( final IBlockState state )
public boolean canProvidePower( final BlockState state )
{
return true;
}
@Override
public void onEntityCollidedWithBlock( final World w, final BlockPos pos, final IBlockState state, final Entity entityIn )
public void onEntityCollidedWithBlock( final World w, final BlockPos pos, final BlockState state, final Entity entityIn )
{
this.cb( w, pos ).onEntityCollision( entityIn );
}
@Override
public int getStrongPower( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
public int getStrongPower( final BlockState state, final IBlockReader w, final BlockPos pos, final Direction side )
{
return this.cb( w, pos ).isProvidingStrongPower( side.getOpposite() ); // TODO:
// IS
@@ -177,7 +176,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public int getLightValue( final IBlockState state, final IBlockAccess world, final BlockPos pos )
public int getLightValue( final BlockState state, final IBlockReader world, final BlockPos pos )
{
if( state.getBlock() != this )
{
@@ -187,25 +186,25 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public boolean isLadder( final IBlockState state, final IBlockAccess world, final BlockPos pos, final EntityLivingBase entity )
public boolean isLadder( final BlockState state, final IBlockReader world, final BlockPos pos, final LivingEntity entity )
{
return this.cb( world, pos ).isLadder( entity );
}
@Override
public boolean isSideSolid( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
public boolean isSideSolid( final BlockState state, final IBlockReader w, final BlockPos pos, final Direction side )
{
return this.cb( w, pos ).isSolidOnSide( side );
}
@Override
public boolean isReplaceable( final IBlockAccess w, final BlockPos pos )
public boolean isReplaceable( final IBlockReader w, final BlockPos pos )
{
return this.cb( w, pos ).isEmpty();
}
@Override
public boolean removedByPlayer( final IBlockState state, final World world, final BlockPos pos, final EntityPlayer player, final boolean willHarvest )
public boolean removedByPlayer( final BlockState state, final World world, final BlockPos pos, final PlayerEntity player, final boolean willHarvest )
{
if( player.capabilities.isCreativeMode )
{
@@ -220,18 +219,18 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public boolean canConnectRedstone( final IBlockState state, final IBlockAccess w, final BlockPos pos, EnumFacing side )
public boolean canConnectRedstone( final BlockState state, final IBlockReader w, final BlockPos pos, Direction side )
{
if( side == null )
{
side = EnumFacing.UP;
side = Direction.UP;
}
return this.cb( w, pos ).canConnectRedstone( EnumSet.of( side ) );
}
@Override
public ItemStack getPickBlock( final IBlockState state, final RayTraceResult target, final World world, final BlockPos pos, final EntityPlayer player )
public ItemStack getPickBlock( final BlockState state, final RayTraceResult target, final World world, final BlockPos pos, final PlayerEntity player )
{
final Vec3d v3 = target.hitVec.subtract( pos.getX(), pos.getY(), pos.getZ() );
final SelectedPart sp = this.cb( world, pos ).selectPart( v3 );
@@ -249,8 +248,8 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
@SideOnly( Side.CLIENT )
public boolean addHitEffects( final IBlockState state, final World world, final RayTraceResult target, final ParticleManager effectRenderer )
@OnlyIn( Dist.CLIENT )
public boolean addHitEffects( final BlockState state, final World world, final RayTraceResult target, final ParticleManager effectRenderer )
{
// Half the particle rate. Since we're spawning concentrated on a specific spot,
@@ -263,7 +262,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
ICableBusContainer cb = this.cb( world, target.getBlockPos() );
// Our built-in model has the actual baked sprites we need
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState( this.getDefaultState() );
IBakedModel model = Minecraft.getInstance().getBlockRendererDispatcher().getModelForState( this.getDefaultState() );
// We cannot add the effect if we don't have the model
if( !( model instanceof CableBusBakedModel ) )
@@ -292,13 +291,13 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public boolean addDestroyEffects( final World world, final BlockPos pos, final ParticleManager effectRenderer )
{
ICableBusContainer cb = this.cb( world, pos );
// Our built-in model has the actual baked sprites we need
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState( this.getDefaultState() );
IBakedModel model = Minecraft.getInstance().getBlockRendererDispatcher().getModelForState( this.getDefaultState() );
// We cannot add the effect if we dont have the model
if( !( model instanceof CableBusBakedModel ) )
@@ -341,7 +340,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
{
if( Platform.isServer() )
{
@@ -349,7 +348,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
}
private ICableBusContainer cb( final IBlockAccess w, final BlockPos pos )
private ICableBusContainer cb( final IBlockReader w, final BlockPos pos )
{
final TileEntity te = w.getTileEntity( pos );
ICableBusContainer out = null;
@@ -363,7 +362,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Nullable
private IFacadeContainer fc( final IBlockAccess w, final BlockPos pos )
private IFacadeContainer fc( final IBlockReader w, final BlockPos pos )
{
final TileEntity te = w.getTileEntity( pos );
IFacadeContainer out = null;
@@ -377,43 +376,43 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
public void onBlockClicked( World worldIn, BlockPos pos, EntityPlayer playerIn )
public void onBlockClicked( World worldIn, BlockPos pos, PlayerEntity playerIn )
{
if( Platform.isClient() )
{
final RayTraceResult rtr = Minecraft.getMinecraft().objectMouseOver;
final RayTraceResult rtr = Minecraft.getInstance().objectMouseOver;
if( rtr != null && rtr.typeOfHit == Type.BLOCK && pos.equals( rtr.getBlockPos() ) )
{
final Vec3d hitVec = rtr.hitVec.subtract( new Vec3d( pos ) );
if( this.cb( worldIn, pos ).clicked( playerIn, EnumHand.MAIN_HAND, hitVec ) )
if( this.cb( worldIn, pos ).clicked( playerIn, Hand.MAIN_HAND, hitVec ) )
{
NetworkHandler.instance()
.sendToServer(
new PacketClick( pos, rtr.sideHit, (float) hitVec.x, (float) hitVec.y, (float) hitVec.z, EnumHand.MAIN_HAND, true ) );
new PacketClick( pos, rtr.sideHit, (float) hitVec.x, (float) hitVec.y, (float) hitVec.z, Hand.MAIN_HAND, true ) );
}
}
}
}
public void onBlockClickPacket( World worldIn, BlockPos pos, EntityPlayer playerIn, EnumHand hand, Vec3d hitVec )
public void onBlockClickPacket( World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, Vec3d hitVec )
{
this.cb( worldIn, pos ).clicked( playerIn, hand, hitVec );
}
@Override
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
public boolean onActivated( final World w, final BlockPos pos, final PlayerEntity player, final Hand hand, final @Nullable ItemStack heldItem, final Direction side, final float hitX, final float hitY, final float hitZ )
{
return this.cb( w, pos ).activate( player, hand, new Vec3d( hitX, hitY, hitZ ) );
}
@Override
public boolean recolorBlock( final World world, final BlockPos pos, final EnumFacing side, final EnumDyeColor color )
public boolean recolorBlock( final World world, final BlockPos pos, final Direction side, final EnumDyeColor color )
{
return this.recolorBlock( world, pos, side, color, null );
}
public boolean recolorBlock( final World world, final BlockPos pos, final EnumFacing side, final EnumDyeColor color, final EntityPlayer who )
public boolean recolorBlock( final World world, final BlockPos pos, final Direction side, final EnumDyeColor color, final PlayerEntity who )
{
try
{
@@ -426,7 +425,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
@Override
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public void getSubBlocks( final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
{
// do nothing
@@ -434,7 +433,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
public void setupTile()
{
noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class );
noTesrTile = TileCableBus.class;
this.setTileEntity( noTesrTile );
GameRegistry.registerTileEntity( noTesrTile, AppEng.MOD_ID.toLowerCase() + ":" + "BlockCableBus" );
@@ -445,22 +444,22 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
}
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
private static void setupTesr()
{
tesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBusTESR.class );
tesrTile = TileCableBusTESR.class;
GameRegistry.registerTileEntity( tesrTile, AppEng.MOD_ID.toLowerCase() + ":" + "ClientOnly_TESR_CableBus" );
ClientRegistry.bindTileEntitySpecialRenderer( BlockCableBus.getTesrTile(), new CableBusTESR() );
}
@Override
public boolean canRenderInLayer( IBlockState state, BlockRenderLayer layer )
public boolean canRenderInLayer( BlockState state, BlockRenderLayer layer )
{
return true;
}
@Override
public IBlockState getFacadeState( IBlockAccess world, BlockPos pos, EnumFacing side )
public BlockState getFacadeState( IBlockReader world, BlockPos pos, Direction side )
{
if( side != null )
{
@@ -488,10 +487,10 @@ public class BlockCableBus extends AEBaseTileBlock implements IAEFacade
}
// Helper to get access to the protected constructor
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
private static class DestroyFX extends ParticleDigging
{
DestroyFX( World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, IBlockState state )
DestroyFX( World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, BlockState state )
{
super( worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, state );
}
@@ -23,12 +23,12 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockStateContainer;
import net.minecraft.block.BlockState;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
@@ -98,7 +98,7 @@ public class BlockController extends AEBaseTileBlock
* get a rudimentary connected texture feel for the controller based on how it is placed.
*/
@Override
public IBlockState getActualState( IBlockState state, IBlockAccess world, BlockPos pos )
public BlockState getActualState( BlockState state, IBlockReader world, BlockPos pos )
{
// Only used for columns, really
@@ -148,19 +148,19 @@ public class BlockController extends AEBaseTileBlock
}
@Override
public IBlockState getExtendedState( IBlockState state, IBlockAccess world, BlockPos pos )
public BlockState getExtendedState( BlockState state, IBlockReader world, BlockPos pos )
{
return state;
}
@Override
public int getMetaFromState( final IBlockState state )
public int getMetaFromState( final BlockState state )
{
return state.getValue( CONTROLLER_STATE ).ordinal();
}
@Override
public IBlockState getStateFromMeta( final int meta )
public BlockState getStateFromMeta( final int meta )
{
ControllerBlockState state = ControllerBlockState.values()[meta];
return this.getDefaultState().withProperty( CONTROLLER_STATE, state );
@@ -173,7 +173,7 @@ public class BlockController extends AEBaseTileBlock
}
@Override
public void neighborChanged( IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
public void neighborChanged( BlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos )
{
final TileController tc = this.getTileEntity( world, pos );
if( tc != null )
@@ -21,13 +21,13 @@ package appeng.block.networking;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.block.AEBaseTileBlock;
import appeng.helpers.AEGlassMaterial;
@@ -40,13 +40,13 @@ public class BlockEnergyCell extends AEBaseTileBlock
public static final PropertyInteger ENERGY_STORAGE = PropertyInteger.create( "fullness", 0, 7 );
@Override
public int getMetaFromState( final IBlockState state )
public int getMetaFromState( final BlockState state )
{
return state.getValue( ENERGY_STORAGE );
}
@Override
public IBlockState getStateFromMeta( final int meta )
public BlockState getStateFromMeta( final int meta )
{
return this.getDefaultState().withProperty( ENERGY_STORAGE, Math.min( 7, Math.max( 0, meta ) ) );
}
@@ -57,13 +57,13 @@ public class BlockEnergyCell extends AEBaseTileBlock
}
@Override
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public void getSubBlocks( final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
{
super.getSubBlocks( tabs, itemStacks );
final ItemStack charged = new ItemStack( this, 1 );
final NBTTagCompound tag = Platform.openNbtData( charged );
final CompoundNBT tag = Platform.openNbtData( charged );
tag.setDouble( "internalCurrentPower", this.getMaxPower() );
tag.setDouble( "internalMaxPower", this.getMaxPower() );
@@ -24,7 +24,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import appeng.api.implementations.items.IAEItemPowerStorage;
import appeng.block.AEBaseItemBlockChargeable;
import appeng.block.AEBaseBlockItemChargeable;
import appeng.bootstrap.BlockRenderingCustomizer;
import appeng.bootstrap.IBlockRendering;
import appeng.bootstrap.IItemRendering;
@@ -71,7 +71,7 @@ public class BlockEnergyCellRendering extends BlockRenderingCustomizer
return 0;
}
AEBaseItemBlockChargeable itemChargeable = (AEBaseItemBlockChargeable) is.getItem();
AEBaseBlockItemChargeable itemChargeable = (AEBaseBlockItemChargeable) is.getItem();
double curPower = itemChargeable.getAECurrentPower( is );
double maxPower = itemChargeable.getAEMaxPower( is );
@@ -24,16 +24,16 @@ import java.util.List;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import appeng.api.util.AEPartLocation;
@@ -79,7 +79,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
}
@Override
public IBlockState getActualState( IBlockState state, IBlockAccess worldIn, BlockPos pos )
public BlockState getActualState( BlockState state, IBlockReader worldIn, BlockPos pos )
{
State teState = State.OFF;
@@ -107,11 +107,11 @@ 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 EnumFacing side, final float hitX, final float hitY, final float hitZ )
public boolean onBlockActivated( final World w, final BlockPos pos, final BlockState state, final PlayerEntity player, final Hand hand, final Direction side, final float hitX, final float hitY, final float hitZ )
{
final TileWireless tg = this.getTileEntity( w, pos );
if( tg != null && !player.isSneaking() )
if( tg != null && !player.isShiftKeyDown() )
{
if( Platform.isServer() )
{
@@ -129,7 +129,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
final TileWireless tile = this.getTileEntity( w, pos );
if( tile != null )
{
final EnumFacing forward = tile.getForward();
final Direction forward = tile.getForward();
double minX = 0;
double minY = 0;
@@ -191,7 +191,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
final TileWireless tile = this.getTileEntity( w, pos );
if( tile != null )
{
final EnumFacing forward = tile.getForward();
final Direction forward = tile.getForward();
double minX = 0;
double minY = 0;
@@ -251,7 +251,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
}
@Override
public boolean isFullCube( IBlockState state )
public boolean isFullCube( BlockState state )
{
return false;
}
@@ -19,13 +19,13 @@
package appeng.block.networking;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraftforge.common.property.IExtendedBlockState;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.api.util.AEColor;
import appeng.client.render.cablebus.CableBusRenderState;
@@ -34,12 +34,12 @@ import appeng.client.render.cablebus.CableBusRenderState;
/**
* Exposes the cable bus color as tint indices 0 (dark variant), 1 (medium variant) and 2 (bright variant).
*/
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public class CableBusColor implements IBlockColor
{
@Override
public int colorMultiplier( IBlockState state, IBlockAccess worldIn, BlockPos pos, int color )
public int colorMultiplier( BlockState state, IBlockReader worldIn, BlockPos pos, int color )
{
AEColor busColor = AEColor.TRANSPARENT;
@@ -19,8 +19,8 @@
package appeng.block.networking;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.bootstrap.BlockRenderingCustomizer;
import appeng.bootstrap.IBlockRendering;
@@ -42,7 +42,7 @@ public class CableBusRendering extends BlockRenderingCustomizer
}
@Override
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
{
rendering.builtInModel( "models/block/builtin/cable_bus", new CableBusModel( this.partModels ) );
@@ -2,8 +2,8 @@
package appeng.block.networking;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.api.util.AEColor;
import appeng.bootstrap.BlockRenderingCustomizer;
@@ -15,7 +15,7 @@ import appeng.client.render.StaticBlockColor;
public class WirelessRendering extends BlockRenderingCustomizer
{
@Override
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
{
rendering.blockColor( new StaticBlockColor( AEColor.TRANSPARENT ) );