First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name fixes, etc... Although some parts of second were done where changes aren't important. Errors: ~1400 -> 82.
This commit is contained in:
parent
d9725a7d9b
commit
5498eb6d7c
|
@ -23,13 +23,16 @@ import java.util.ArrayList;
|
|||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
|
@ -39,12 +42,13 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
|
@ -72,7 +76,7 @@ import appeng.helpers.ICustomCollision;
|
|||
import appeng.util.LookDirection;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
//TODO 1.9.4 - setBlockBounds => ?
|
||||
public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
{
|
||||
public static final PropertyEnum AXIS_ORIENTATION = PropertyEnum.create( "axis", EnumFacing.Axis.class );
|
||||
|
@ -107,21 +111,21 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
{
|
||||
super( mat );
|
||||
|
||||
if( mat == AEGlassMaterial.INSTANCE || mat == Material.glass )
|
||||
if( mat == AEGlassMaterial.INSTANCE || mat == Material.GLASS )
|
||||
{
|
||||
this.setStepSound( Block.soundTypeGlass );
|
||||
this.setSoundType( SoundType.GLASS );
|
||||
}
|
||||
else if( mat == Material.rock )
|
||||
else if( mat == Material.ROCK )
|
||||
{
|
||||
this.setStepSound( Block.soundTypeStone );
|
||||
this.setSoundType( SoundType.STONE );
|
||||
}
|
||||
else if( mat == Material.wood )
|
||||
else if( mat == Material.WOOD )
|
||||
{
|
||||
this.setStepSound( Block.soundTypeWood );
|
||||
this.setSoundType( SoundType.WOOD );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setStepSound( Block.soundTypeMetal );
|
||||
this.setSoundType( SoundType.METAL );
|
||||
}
|
||||
|
||||
this.featureFullName = new FeatureNameExtractor( this.getClass(), subName ).get();
|
||||
|
@ -138,7 +142,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
public static final UnlistedBlockAccess AE_BLOCK_ACCESS = new UnlistedBlockAccess();
|
||||
|
||||
@Override
|
||||
protected final BlockState createBlockState()
|
||||
protected final BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] { AE_BLOCK_POS, AE_BLOCK_ACCESS } );
|
||||
}
|
||||
|
@ -184,6 +188,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
}
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - Move to IBlockColor
|
||||
@Override
|
||||
public int colorMultiplier( final IBlockAccess worldIn, final BlockPos pos, final int colorTint )
|
||||
{
|
||||
|
@ -225,7 +230,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isNormalCube()
|
||||
public boolean isNormalCube(IBlockState state)
|
||||
{
|
||||
return this.isFullSize() && this.isOpaque();
|
||||
}
|
||||
|
@ -260,7 +265,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList( final World w, final BlockPos pos, final IBlockState state, final AxisAlignedBB bb, final List out, final Entity e )
|
||||
public void addCollisionBoxToList( final IBlockState state, final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
|
||||
|
||||
|
@ -279,13 +284,13 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
}
|
||||
else
|
||||
{
|
||||
super.addCollisionBoxesToList( w, pos, state, bb, out, e );
|
||||
super.addCollisionBoxToList( state, w, pos, bb, out, e );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public AxisAlignedBB getSelectedBoundingBox( final World w, final BlockPos pos )
|
||||
public AxisAlignedBB getSelectedBoundingBox( IBlockState state, final World w, final BlockPos pos )
|
||||
{
|
||||
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
|
||||
|
||||
|
@ -305,7 +310,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
{
|
||||
this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ );
|
||||
|
||||
final MovingObjectPosition r = super.collisionRayTrace( w, pos, ld.getA(), ld.getB() );
|
||||
final RayTraceResult r = super.collisionRayTrace( state, w, pos, ld.getA(), ld.getB() );
|
||||
|
||||
this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
|
@ -327,7 +332,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
|
||||
if( br != null )
|
||||
{
|
||||
br = AxisAlignedBB.fromBounds( br.minX + pos.getX(), br.minY + pos.getY(), br.minZ + pos.getZ(), br.maxX + pos.getX(), br.maxY + pos.getY(), br.maxZ + pos.getZ() );
|
||||
br = new AxisAlignedBB( br.minX + pos.getX(), br.minY + pos.getY(), br.minZ + pos.getZ(), br.maxX + pos.getX(), br.maxY + pos.getY(), br.maxZ + pos.getZ() );
|
||||
return br;
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +354,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
final double maxY = Math.max( b.maxY, bx.maxY );
|
||||
final double maxZ = Math.max( b.maxZ, bx.maxZ );
|
||||
|
||||
b = AxisAlignedBB.fromBounds( minX, minY, minZ, maxX, maxY, maxZ );
|
||||
b = new AxisAlignedBB( minX, minY, minZ, maxX, maxY, maxZ );
|
||||
}
|
||||
|
||||
if( b == null )
|
||||
|
@ -358,30 +363,30 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
}
|
||||
else
|
||||
{
|
||||
b = AxisAlignedBB.fromBounds( b.minX + pos.getX(), b.minY + pos.getY(), b.minZ + pos.getZ(), b.maxX + pos.getX(), b.maxY + pos.getY(), b.maxZ + pos.getZ() );
|
||||
b = new AxisAlignedBB( b.minX + pos.getX(), b.minY + pos.getY(), b.minZ + pos.getZ(), b.maxX + pos.getX(), b.maxY + pos.getY(), b.maxZ + pos.getZ() );
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
return super.getSelectedBoundingBox( w, pos );
|
||||
return super.getSelectedBoundingBox( state, w, pos );
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isOpaqueCube()
|
||||
public final boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return this.isOpaque();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MovingObjectPosition collisionRayTrace( final World w, final BlockPos pos, final Vec3 a, final Vec3 b )
|
||||
public RayTraceResult collisionRayTrace( final IBlockState state, final World w, final BlockPos pos, final Vec3d a, final Vec3d b )
|
||||
{
|
||||
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
|
||||
|
||||
if( collisionHandler != null )
|
||||
{
|
||||
final Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, pos, null, true );
|
||||
MovingObjectPosition br = null;
|
||||
RayTraceResult br = null;
|
||||
|
||||
double lastDist = 0;
|
||||
|
||||
|
@ -389,7 +394,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
{
|
||||
this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ );
|
||||
|
||||
final MovingObjectPosition r = super.collisionRayTrace( w, pos, a, b );
|
||||
final RayTraceResult r = super.collisionRayTrace( state, w, pos, a, b );
|
||||
|
||||
this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
|
@ -417,10 +422,10 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
}
|
||||
|
||||
this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
|
||||
return super.collisionRayTrace( w, pos, a, b );
|
||||
return super.collisionRayTrace( state, w, pos, a, b );
|
||||
}
|
||||
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -434,19 +439,19 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride()
|
||||
public boolean hasComparatorInputOverride(IBlockState state)
|
||||
{
|
||||
return this.isInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride( final World worldIn, final BlockPos pos )
|
||||
public int getComparatorInputOverride( IBlockState state, final World worldIn, final BlockPos pos )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNormalCube( final IBlockAccess world, final BlockPos pos )
|
||||
public boolean isNormalCube( IBlockState state, final IBlockAccess world, final BlockPos pos )
|
||||
{
|
||||
return this.isFullSize();
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
|
|
@ -41,8 +41,9 @@ import net.minecraft.item.EnumDyeColor;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
@ -214,7 +215,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride( final World w, final BlockPos pos )
|
||||
public int getComparatorInputOverride( IBlockState state, final World w, final BlockPos pos )
|
||||
{
|
||||
final TileEntity te = this.getTileEntity( w, pos );
|
||||
if( te instanceof IInventory )
|
||||
|
@ -224,8 +225,9 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||
return 0;
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - Move to IBlockState
|
||||
@Override
|
||||
public boolean onBlockEventReceived( final World worldIn, final BlockPos pos, final IBlockState state, final int eventID, final int eventParam )
|
||||
public boolean onBlockAdded( final World worldIn, final BlockPos pos, final IBlockState state, final int eventID, final int eventParam )
|
||||
{
|
||||
super.onBlockEventReceived( worldIn, pos, state, eventID, eventParam );
|
||||
final TileEntity tileentity = worldIn.getTileEntity( pos );
|
||||
|
@ -246,16 +248,16 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer player, 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 @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player != null )
|
||||
{
|
||||
final ItemStack is = player.inventory.getCurrentItem();
|
||||
if( is != null )
|
||||
if( heldItem != null )
|
||||
{
|
||||
if( Platform.isWrench( player, is, pos ) && player.isSneaking() )
|
||||
if( Platform.isWrench( player, heldItem, pos ) && player.isSneaking() )
|
||||
{
|
||||
final Block id = w.getBlockState( pos ).getBlock();
|
||||
final IBlockState ids = w.getBlockState( pos );
|
||||
final Block id = ids.getBlock();
|
||||
if( id != null )
|
||||
{
|
||||
final AEBaseTile tile = this.getTileEntity( w, pos );
|
||||
|
@ -284,7 +286,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||
}
|
||||
}
|
||||
|
||||
if( id.removedByPlayer( w, pos, player, false ) )
|
||||
if( id.removedByPlayer( ids, w, pos, player, false ) )
|
||||
{
|
||||
final List<ItemStack> l = Lists.newArrayList( drops );
|
||||
Platform.spawnDrops( w, pos, l );
|
||||
|
@ -294,9 +296,9 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||
return false;
|
||||
}
|
||||
|
||||
if( is.getItem() instanceof IMemoryCard && !( this instanceof BlockCableBus ) )
|
||||
if( heldItem.getItem() instanceof IMemoryCard && !( this instanceof BlockCableBus ) )
|
||||
{
|
||||
final IMemoryCard memoryCard = (IMemoryCard) is.getItem();
|
||||
final IMemoryCard memoryCard = (IMemoryCard) heldItem.getItem();
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
final AEBaseTile t = this.getTileEntity( w, pos );
|
||||
|
@ -306,7 +308,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||
final NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
|
||||
if( data != null )
|
||||
{
|
||||
memoryCard.setMemoryCardContents( is, name, data );
|
||||
memoryCard.setMemoryCardContents( heldItem, name, data );
|
||||
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
|
||||
return true;
|
||||
}
|
||||
|
@ -314,8 +316,8 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||
}
|
||||
else
|
||||
{
|
||||
final String name = memoryCard.getSettingsName( is );
|
||||
final NBTTagCompound data = memoryCard.getData( is );
|
||||
final String name = memoryCard.getSettingsName( heldItem );
|
||||
final NBTTagCompound data = memoryCard.getData( heldItem );
|
||||
if( this.getUnlocalizedName().equals( name ) )
|
||||
{
|
||||
final AEBaseTile t = this.getTileEntity( w, pos );
|
||||
|
@ -332,7 +334,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||
}
|
||||
}
|
||||
|
||||
return this.onActivated( w, pos, player, side, hitX, hitY, hitZ );
|
||||
return this.onActivated( w, pos, player, hand, heldItem, side, hitX, hitY, hitZ );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
package appeng.block;
|
||||
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@ package appeng.block.crafting;
|
|||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -33,9 +35,10 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -64,7 +67,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
|||
|
||||
public BlockCraftingUnit( final CraftingUnitType type )
|
||||
{
|
||||
super( Material.iron, Optional.of( type.name() ) );
|
||||
super( Material.IRON, Optional.of( type.name() ) );
|
||||
|
||||
this.type = type;
|
||||
this.setTileEntity( TileCraftingTile.class );
|
||||
|
@ -86,7 +89,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World worldIn, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World worldIn, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TileCraftingTile cp = this.getTileEntity( worldIn, pos );
|
||||
if( cp != null )
|
||||
|
@ -96,9 +99,9 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -114,7 +117,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer p, 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 p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
final TileCraftingTile tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
|
||||
|
|
|
@ -21,12 +21,16 @@ package appeng.block.crafting;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -46,7 +50,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
|||
|
||||
public BlockMolecularAssembler()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileMolecularAssembler.class );
|
||||
this.setOpaque( false );
|
||||
|
@ -55,9 +59,9 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer( final net.minecraft.util.EnumWorldBlockLayer layer )
|
||||
public boolean canRenderInLayer( final IBlockState state, final BlockRenderLayer layer )
|
||||
{
|
||||
return layer == EnumWorldBlockLayer.CUTOUT_MIPPED;
|
||||
return layer == BlockRenderLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +72,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer p, 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 p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
final TileMolecularAssembler tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isSneaking() )
|
||||
|
|
|
@ -21,6 +21,8 @@ package appeng.block.grindstone;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -28,8 +30,9 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
|
||||
|
@ -48,7 +51,7 @@ public class BlockCrank extends AEBaseTileBlock
|
|||
|
||||
public BlockCrank()
|
||||
{
|
||||
super( Material.wood );
|
||||
super( Material.WOOD );
|
||||
|
||||
this.setTileEntity( TileCrank.class );
|
||||
this.setLightOpacity( 0 );
|
||||
|
@ -64,7 +67,7 @@ public class BlockCrank extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( player instanceof FakePlayer || player == null )
|
||||
{
|
||||
|
@ -87,6 +90,7 @@ public class BlockCrank extends AEBaseTileBlock
|
|||
private void dropCrank( final World world, final BlockPos pos )
|
||||
{
|
||||
world.destroyBlock( pos, true ); // w.destroyBlock( x, y, z, true );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
world.markBlockForUpdate( pos );
|
||||
}
|
||||
|
||||
|
@ -138,7 +142,7 @@ public class BlockCrank extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World world, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World world, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
|
||||
final AEBaseTile tile = this.getTileEntity( world, pos );
|
||||
|
|
|
@ -21,11 +21,14 @@ package appeng.block.grindstone;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -41,7 +44,7 @@ public class BlockGrinder extends AEBaseTileBlock
|
|||
|
||||
public BlockGrinder()
|
||||
{
|
||||
super( Material.rock );
|
||||
super( Material.ROCK );
|
||||
|
||||
this.setTileEntity( TileGrinder.class );
|
||||
this.setHardness( 3.2F );
|
||||
|
@ -49,14 +52,7 @@ public class BlockGrinder extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated( final World worldIn, final BlockPos pos, final IBlockState state, final EntityPlayer playerIn, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return super.onBlockActivated( worldIn, pos, state, playerIn, side, hitX, hitY, hitZ );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
final TileGrinder tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isSneaking() )
|
||||
|
|
|
@ -21,10 +21,14 @@ package appeng.block.misc;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -40,14 +44,14 @@ public class BlockCellWorkbench extends AEBaseTileBlock
|
|||
|
||||
public BlockCellWorkbench()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileCellWorkbench.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
|
|
@ -24,14 +24,18 @@ import java.util.EnumSet;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -56,7 +60,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
|||
|
||||
public BlockCharger()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileCharger.class );
|
||||
this.setLightOpacity( 2 );
|
||||
|
@ -71,7 +75,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
|
@ -92,7 +96,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
|||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick( final World w, final BlockPos pos, final IBlockState state, final Random r )
|
||||
public void randomDisplayTick( final IBlockState state, final World w, final BlockPos pos, final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
|
@ -136,7 +140,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
|||
final double twoPixels = 2.0 / 16.0;
|
||||
final EnumFacing up = tile.getUp();
|
||||
final EnumFacing forward = tile.getForward();
|
||||
final AEAxisAlignedBB bb = AEAxisAlignedBB.fromBounds( twoPixels, twoPixels, twoPixels, 1.0 - twoPixels, 1.0 - twoPixels, 1.0 - twoPixels );
|
||||
final AEAxisAlignedBB bb = new AEAxisAlignedBB( twoPixels, twoPixels, twoPixels, 1.0 - twoPixels, 1.0 - twoPixels, 1.0 - twoPixels );
|
||||
|
||||
if( up.getFrontOffsetX() != 0 )
|
||||
{
|
||||
|
@ -180,12 +184,12 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
|||
|
||||
return Collections.singletonList( bb.getBoundingBox() );
|
||||
}
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
out.add( new AxisAlignedBB( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,14 @@ package appeng.block.misc;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -40,14 +44,14 @@ public class BlockCondenser extends AEBaseTileBlock
|
|||
|
||||
public BlockCondenser()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileCondenser.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
|
|
|
@ -21,11 +21,14 @@ package appeng.block.misc;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -43,7 +46,7 @@ public class BlockInscriber extends AEBaseTileBlock
|
|||
|
||||
public BlockInscriber()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileInscriber.class );
|
||||
this.setLightOpacity( 2 );
|
||||
|
@ -58,7 +61,7 @@ public class BlockInscriber extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
|
|
@ -21,10 +21,14 @@ package appeng.block.misc;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -43,7 +47,7 @@ public class BlockInterface extends AEBaseTileBlock
|
|||
|
||||
public BlockInterface()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileInterface.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
|
@ -56,7 +60,7 @@ public class BlockInterface extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
|
|
@ -30,9 +30,9 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
|||
|
||||
public BlockLightDetector()
|
||||
{
|
||||
super( Material.circuits );
|
||||
super( Material.CIRCUITS );
|
||||
|
||||
this.setLightOpacity( 0 );
|
||||
this.setFullSize( false );
|
||||
|
@ -80,7 +80,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getWeakPower( final IBlockAccess w, final BlockPos pos, final IBlockState state, final EnumFacing side )
|
||||
public int getWeakPower( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
|
||||
{
|
||||
if( w instanceof World && ( (TileLightDetector) this.getTileEntity( w, pos ) ).isReady() )
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
|||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick( final World worldIn, final BlockPos pos, final IBlockState state, final Random rand )
|
||||
public void randomDisplayTick( final IBlockState state, final World worldIn, final BlockPos pos, final Random rand )
|
||||
{
|
||||
// cancel out lightning
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
|||
final double xOff = -0.3 * up.getFrontOffsetX();
|
||||
final double yOff = -0.3 * up.getFrontOffsetY();
|
||||
final double zOff = -0.3 * up.getFrontOffsetZ();
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -145,20 +145,21 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
|||
* + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( IBlockState state, World w, BlockPos pos, Block blockIn )
|
||||
{
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
|
||||
if( !this.canPlaceAt( (World) w, pos, up.getOpposite() ) )
|
||||
{
|
||||
this.dropTorch( w, pos );
|
||||
this.dropTorch( (World) w, pos );
|
||||
}
|
||||
}
|
||||
|
||||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
w.markBlockForUpdate( pos );
|
||||
}
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -51,7 +51,7 @@ public class BlockPaint extends AEBaseTileBlock
|
|||
|
||||
public BlockPaint()
|
||||
{
|
||||
super( new MaterialLiquid( MapColor.airColor ) );
|
||||
super( new MaterialLiquid( MapColor.AIR ) );
|
||||
|
||||
this.setTileEntity( TilePaint.class );
|
||||
this.setLightOpacity( 0 );
|
||||
|
@ -61,9 +61,9 @@ public class BlockPaint extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,7 +80,7 @@ public class BlockPaint extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox( final World worldIn, final BlockPos pos, final IBlockState state )
|
||||
public AxisAlignedBB getCollisionBoundingBox( final IBlockState state, final World worldIn, final BlockPos pos )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -92,13 +92,13 @@ public class BlockPaint extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TilePaint tp = this.getTileEntity( w, pos );
|
||||
|
||||
if( tp != null )
|
||||
{
|
||||
tp.onNeighborBlockChange();
|
||||
tp.neighborChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ public class BlockPaint extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue( final IBlockAccess w, final BlockPos pos )
|
||||
public int getLightValue( final IBlockState state, final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
final TilePaint tp = this.getTileEntity( w, pos );
|
||||
|
||||
|
@ -137,13 +137,13 @@ public class BlockPaint extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isAir( final IBlockAccess world, final BlockPos pos )
|
||||
public boolean isAir( final IBlockState state, final IBlockAccess world, final BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable( final World worldIn, final BlockPos pos )
|
||||
public boolean isReplaceable( final IBlockAccess worldIn, final BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -22,12 +22,12 @@ package appeng.block.misc;
|
|||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
|
@ -45,8 +45,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
|
|||
{
|
||||
public BlockQuartzGrowthAccelerator()
|
||||
{
|
||||
super( Material.rock );
|
||||
this.setStepSound( Block.soundTypeMetal );
|
||||
super( Material.ROCK );
|
||||
this.setSoundType( SoundType.METAL );
|
||||
this.setTileEntity( TileQuartzGrowthAccelerator.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick( final World w, final BlockPos pos, final IBlockState state, final Random r )
|
||||
public void randomDisplayTick( final IBlockState state, final World w, final BlockPos pos, final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
|
|||
break;
|
||||
}
|
||||
|
||||
if( !w.getBlockState( pt ).getBlock().isAir( w, pt ) )
|
||||
if( !w.getBlockState( pt ).getBlock().isAir( w.getBlockState( pt ), w, pt ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ import net.minecraft.block.properties.IProperty;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -56,7 +56,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||
{
|
||||
public BlockQuartzTorch()
|
||||
{
|
||||
super( Material.circuits );
|
||||
super( Material.CIRCUITS );
|
||||
|
||||
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
|
||||
this.setLightLevel( 0.9375F );
|
||||
|
@ -108,7 +108,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||
final double xOff = -0.3 * up.getFrontOffsetX();
|
||||
final double yOff = -0.3 * up.getFrontOffsetY();
|
||||
final double zOff = -0.3 * up.getFrontOffsetZ();
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -122,7 +122,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick( final World w, final BlockPos pos, final IBlockState state, final Random r )
|
||||
public void randomDisplayTick( final IBlockState state, final World w, final BlockPos pos, final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos,final Block neighborBlock )
|
||||
{
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
|
||||
|
@ -162,6 +162,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
w.markBlockForUpdate( pos );
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,15 @@ package appeng.block.misc;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -43,16 +47,16 @@ public class BlockSecurity extends AEBaseTileBlock
|
|||
|
||||
public BlockSecurity()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileSecurity.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Security ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,7 +66,7 @@ public class BlockSecurity extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
|
|
@ -27,9 +27,9 @@ 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.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
|
@ -45,7 +45,7 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
|||
|
||||
public BlockSkyCompass()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileSkyCompass.class );
|
||||
this.setOpaque( this.setFullSize( false ) );
|
||||
this.lightOpacity = 0;
|
||||
|
@ -75,7 +75,7 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TileSkyCompass sc = this.getTileEntity( w, pos );
|
||||
final EnumFacing up = sc.getForward();
|
||||
|
@ -88,6 +88,7 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
|||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
w.markBlockForUpdate( pos );
|
||||
}
|
||||
|
||||
|
@ -161,9 +162,9 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
|||
break;
|
||||
}
|
||||
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
}
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,8 +23,11 @@ import java.util.Collections;
|
|||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -33,9 +36,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
|
@ -55,11 +60,12 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||
|
||||
public BlockTinyTNT()
|
||||
{
|
||||
super( Material.tnt );
|
||||
super( Material.TNT );
|
||||
this.setLightOpacity( 1 );
|
||||
//TODO 1.9.4 - setBlockBounds => ?
|
||||
this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||
this.setFullSize( this.setOpaque( false ) );
|
||||
this.setStepSound( soundTypeGrass );
|
||||
this.setSoundType( SoundType.GROUND );
|
||||
this.setHardness( 0F );
|
||||
this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
|
||||
|
||||
|
@ -76,22 +82,22 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||
public void postInit()
|
||||
{
|
||||
super.postInit();
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject( Item.getItemFromBlock( this ), new DispenserBehaviorTinyTNT() );
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject( Item.getItemFromBlock( this ), new DispenserBehaviorTinyTNT() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.flint_and_steel )
|
||||
if( heldItem != null && heldItem.getItem() == Items.FLINT_AND_STEEL )
|
||||
{
|
||||
this.startFuse( w, pos, player );
|
||||
w.setBlockToAir( pos );
|
||||
player.getCurrentEquippedItem().damageItem( 1, player );
|
||||
heldItem.damageItem( 1, player );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.onActivated( w, pos, player, side, hitX, hitY, hitZ );
|
||||
return super.onActivated( w, pos, player, hand, heldItem, side, hitX, hitY, hitZ );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,12 +107,13 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||
{
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter );
|
||||
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||
//TODO 1.9.4 - playSoundAtEntity => ?
|
||||
w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
if( w.isBlockIndirectlyGettingPowered( pos ) > 0 )
|
||||
{
|
||||
|
@ -128,7 +135,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock( final World w, final BlockPos pos, final Entity entity )
|
||||
public void onEntityWalk( final World w, final BlockPos pos, final Entity entity )
|
||||
{
|
||||
if( entity instanceof EntityArrow && !w.isRemote )
|
||||
{
|
||||
|
@ -154,7 +161,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||
if( !w.isRemote )
|
||||
{
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, exp.getExplosivePlacedBy() );
|
||||
primedTinyTNTEntity.fuse = w.rand.nextInt( primedTinyTNTEntity.fuse / 4 ) + primedTinyTNTEntity.fuse / 8;
|
||||
primedTinyTNTEntity.setFuse( w.rand.nextInt( primedTinyTNTEntity.getFuse() / 4 ) + primedTinyTNTEntity.getFuse() / 8 );
|
||||
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||
}
|
||||
}
|
||||
|
@ -162,12 +169,12 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity thePlayer, final boolean b )
|
||||
{
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
out.add( new AxisAlignedBB( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,16 @@ package appeng.block.misc;
|
|||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -48,7 +52,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
|||
|
||||
public BlockVibrationChamber()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileVibrationChamber.class );
|
||||
this.setHardness( 4.2F );
|
||||
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
|
||||
|
@ -69,7 +73,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
|
@ -88,9 +92,9 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick( final World w, final BlockPos pos, final IBlockState state, final Random r )
|
||||
public void randomDisplayTick( final IBlockState state, final World w, final BlockPos pos, final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
|
|
|
@ -23,9 +23,11 @@ import java.util.EnumSet;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.ParticleManager;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -34,11 +36,12 @@ import net.minecraft.item.EnumDyeColor;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
@ -104,7 +107,7 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick( final World worldIn, final BlockPos pos, final IBlockState state, final Random rand )
|
||||
public void randomDisplayTick( final IBlockState state, final World worldIn, final BlockPos pos, final Random rand )
|
||||
{
|
||||
this.cb( worldIn, pos ).randomDisplayTick( worldIn, pos, rand );
|
||||
}
|
||||
|
@ -122,7 +125,7 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getWeakPower( final IBlockAccess w, final BlockPos pos, final IBlockState state, final EnumFacing side )
|
||||
public int getWeakPower( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
|
||||
{
|
||||
return this.cb( w, pos ).isProvidingWeakPower( side.getOpposite() ); // TODO:
|
||||
// IS
|
||||
|
@ -130,7 +133,7 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower()
|
||||
public boolean canProvidePower( final IBlockState state )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -142,7 +145,7 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getStrongPower( final IBlockAccess w, final BlockPos pos, final IBlockState state, final EnumFacing side )
|
||||
public int getStrongPower( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
|
||||
{
|
||||
return this.cb( w, pos ).isProvidingStrongPower( side.getOpposite() ); // TODO:
|
||||
// IS
|
||||
|
@ -150,14 +153,13 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue( final IBlockAccess world, final BlockPos pos )
|
||||
public int getLightValue( final IBlockState state, final IBlockAccess world, final BlockPos pos )
|
||||
{
|
||||
final IBlockState block = world.getBlockState( pos );
|
||||
if( block != null && block.getBlock() != this )
|
||||
if( state != null && state.getBlock() != this )
|
||||
{
|
||||
return block.getBlock().getLightValue( world, pos );
|
||||
return state.getBlock().getLightValue( state, world, pos );
|
||||
}
|
||||
if( block == null )
|
||||
if( state == null )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -165,25 +167,25 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isLadder( final IBlockAccess world, final BlockPos pos, final EntityLivingBase entity )
|
||||
public boolean isLadder( final IBlockState state, final IBlockAccess world, final BlockPos pos, final EntityLivingBase entity )
|
||||
{
|
||||
return this.cb( world, pos ).isLadder( entity );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid( final IBlockAccess w, final BlockPos pos, final EnumFacing side )
|
||||
public boolean isSideSolid( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
|
||||
{
|
||||
return this.cb( w, pos ).isSolidOnSide( side );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable( final World w, final BlockPos pos )
|
||||
public boolean isReplaceable( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
return this.cb( w, pos ).isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer( final World world, final BlockPos pos, final EntityPlayer player, final boolean willHarvest )
|
||||
public boolean removedByPlayer( final IBlockState state, final World world, final BlockPos pos, final EntityPlayer player, final boolean willHarvest )
|
||||
{
|
||||
if( player.capabilities.isCreativeMode )
|
||||
{
|
||||
|
@ -194,11 +196,11 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
// maybe ray trace?
|
||||
}
|
||||
return super.removedByPlayer( world, pos, player, willHarvest );
|
||||
return super.removedByPlayer( state, world, pos, player, willHarvest );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectRedstone( final IBlockAccess w, final BlockPos pos, EnumFacing side )
|
||||
public boolean canConnectRedstone( final IBlockState state, final IBlockAccess w, final BlockPos pos, EnumFacing side )
|
||||
{
|
||||
if( side == null )
|
||||
{
|
||||
|
@ -209,20 +211,20 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer( final EnumWorldBlockLayer layer )
|
||||
public boolean canRenderInLayer( final BlockRenderLayer layer )
|
||||
{
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
||||
{
|
||||
return layer == EnumWorldBlockLayer.CUTOUT || layer == EnumWorldBlockLayer.TRANSLUCENT;
|
||||
return layer == BlockRenderLayer.CUTOUT || layer == BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
return layer == EnumWorldBlockLayer.CUTOUT;
|
||||
return layer == BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock( final MovingObjectPosition target, final World world, final BlockPos pos )
|
||||
public ItemStack getPickBlock( final IBlockState state, final RayTraceResult target, final World world, final BlockPos pos, final EntityPlayer player )
|
||||
{
|
||||
final Vec3 v3 = target.hitVec.subtract( pos.getX(), pos.getY(), pos.getZ() );
|
||||
final Vec3d v3 = target.hitVec.subtract( pos.getX(), pos.getY(), pos.getZ() );
|
||||
final SelectedPart sp = this.cb( world, pos ).selectPart( v3 );
|
||||
|
||||
if( sp.part != null )
|
||||
|
@ -236,10 +238,10 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public boolean addHitEffects( final World world, final MovingObjectPosition target, final EffectRenderer effectRenderer )
|
||||
public boolean addHitEffects( final IBlockState state, final World world, final RayTraceResult target, final ParticleManager effectRenderer )
|
||||
{
|
||||
final Object object = this.cb( world, target.getBlockPos() );
|
||||
if( object instanceof IPartHost )
|
||||
|
@ -270,7 +272,7 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean addDestroyEffects( final World world, final BlockPos pos, final EffectRenderer effectRenderer )
|
||||
public boolean addDestroyEffects( final World world, final BlockPos pos, final ParticleManager effectRenderer )
|
||||
{
|
||||
final Object object = this.cb( world, pos );
|
||||
if( object instanceof IPartHost )
|
||||
|
@ -296,7 +298,7 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
|
@ -328,9 +330,9 @@ public class BlockCableBus extends AEBaseTileBlock // implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
return this.cb( w, pos ).activate( player, new Vec3( hitX, hitY, hitZ ) );
|
||||
return this.cb( w, pos ).activate( player, new Vec3d( hitX, hitY, hitZ ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,9 +26,9 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
|
@ -74,21 +74,21 @@ public class BlockController extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
public BlockController()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileController.class );
|
||||
this.setHardness( 6 );
|
||||
this.setFeature( EnumSet.of( AEFeature.Channels ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TileController tc = this.getTileEntity( w, pos );
|
||||
if( tc != null )
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BlockEnergyAcceptor extends AEBaseTileBlock
|
|||
|
||||
public BlockEnergyAcceptor()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileEnergyAcceptor.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
}
|
||||
|
|
|
@ -23,13 +23,17 @@ import java.util.Collections;
|
|||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -64,13 +68,13 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer player, 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 @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
|
@ -146,9 +150,9 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
|||
break;
|
||||
}
|
||||
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
}
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -208,11 +212,11 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
|||
break;
|
||||
}
|
||||
|
||||
out.add( AxisAlignedBB.fromBounds( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
out.add( new AxisAlignedBB( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
out.add( new AxisAlignedBB( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ import java.util.EnumSet;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
|
@ -43,6 +43,7 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
|||
super( mat );
|
||||
this.setTileEntity( TileQuantumBridge.class );
|
||||
final float shave = 2.0f / 16.0f;
|
||||
//TODO 1.9.4 - setBlockBounds => ?
|
||||
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
|
||||
this.setLightOpacity( 0 );
|
||||
this.setFullSize( this.setOpaque( false ) );
|
||||
|
@ -50,13 +51,13 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
if( bridge != null )
|
||||
|
|
|
@ -23,12 +23,16 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -49,7 +53,7 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
|
|||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick( final World w, final BlockPos pos, final IBlockState state, final Random rand )
|
||||
public void randomDisplayTick( final IBlockState state, final World w, final BlockPos pos, final Random rand )
|
||||
{
|
||||
final TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
if( bridge != null )
|
||||
|
@ -65,7 +69,7 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
@ -88,13 +92,13 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
|
|||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity thePlayer, final boolean b )
|
||||
{
|
||||
final double onePixel = 2.0 / 16.0;
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
final double onePixel = 2.0 / 16.0;
|
||||
out.add( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
out.add( new AxisAlignedBB( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
|
@ -36,7 +36,7 @@ public class BlockQuantumRing extends BlockQuantumBase
|
|||
|
||||
public BlockQuantumRing()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,7 +52,7 @@ public class BlockQuantumRing extends BlockQuantumBase
|
|||
{
|
||||
onePixel = 1.0 / 16.0;
|
||||
}
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,6 +68,6 @@ public class BlockQuantumRing extends BlockQuantumBase
|
|||
{
|
||||
onePixel = 1.0 / 16.0;
|
||||
}
|
||||
out.add( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
out.add( new AxisAlignedBB( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,12 +24,13 @@ import java.util.EnumSet;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -48,7 +49,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
|||
|
||||
public BlockMatrixFrame()
|
||||
{
|
||||
super( Material.anvil );
|
||||
super( Material.ANVIL );
|
||||
this.setResistance( 6000000.0F );
|
||||
this.setBlockUnbreakable();
|
||||
this.setLightOpacity( 0 );
|
||||
|
@ -79,7 +80,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
|||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
out.add( new AxisAlignedBB( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -95,7 +96,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canEntityDestroy( final IBlockAccess world, final BlockPos pos, final Entity entity )
|
||||
public boolean canEntityDestroy( final IBlockState state, final IBlockAccess world, final BlockPos pos, final Entity entity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -21,12 +21,16 @@ package appeng.block.spatial;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -42,13 +46,13 @@ public class BlockSpatialIOPort extends AEBaseTileBlock
|
|||
|
||||
public BlockSpatialIOPort()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileSpatialIOPort.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TileSpatialIOPort te = this.getTileEntity( w, pos );
|
||||
if( te != null )
|
||||
|
@ -58,7 +62,7 @@ public class BlockSpatialIOPort extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.util.EnumSet;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -46,24 +46,24 @@ public class BlockSpatialPylon extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TileSpatialPylon tsp = this.getTileEntity( w, pos );
|
||||
if( tsp != null )
|
||||
{
|
||||
tsp.onNeighborBlockChange();
|
||||
tsp.neighborChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue( final IBlockAccess w, final BlockPos pos )
|
||||
public int getLightValue( final IBlockState state, final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
final TileSpatialPylon tsp = this.getTileEntity( w, pos );
|
||||
if( tsp != null )
|
||||
{
|
||||
return tsp.getLightValue();
|
||||
}
|
||||
return super.getLightValue( w, pos );
|
||||
return super.getLightValue( state, w, pos );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,12 +21,15 @@ package appeng.block.storage;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
@ -47,15 +50,15 @@ public class BlockChest extends AEBaseTileBlock
|
|||
|
||||
public BlockChest()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileChest.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -65,7 +68,7 @@ public class BlockChest extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
final TileChest tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isSneaking() )
|
||||
|
|
|
@ -21,11 +21,15 @@ package appeng.block.storage;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -43,15 +47,15 @@ public class BlockDrive extends AEBaseTileBlock
|
|||
|
||||
public BlockDrive()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileDrive.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +65,7 @@ public class BlockDrive extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
|
|
@ -21,12 +21,16 @@ package appeng.block.storage;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -42,13 +46,13 @@ public class BlockIOPort extends AEBaseTileBlock
|
|||
|
||||
public BlockIOPort()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileIOPort.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TileIOPort te = this.getTileEntity( w, pos );
|
||||
if( te != null )
|
||||
|
@ -58,7 +62,7 @@ public class BlockIOPort extends AEBaseTileBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
|
|
@ -23,14 +23,18 @@ import java.util.Collections;
|
|||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -56,7 +60,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
|||
|
||||
public BlockSkyChest( final SkyChestType type )
|
||||
{
|
||||
super( Material.rock, Optional.of( type.name() ) );
|
||||
super( Material.ROCK, Optional.of( type.name() ) );
|
||||
this.setTileEntity( TileSkyChest.class );
|
||||
this.setOpaque( this.setFullSize( false ) );
|
||||
this.lightOpacity = 0;
|
||||
|
@ -74,7 +78,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
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 )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
|
@ -100,12 +104,12 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
|||
final double offsetZ = o.getFrontOffsetZ() == 0 ? 0.06 : 0.0;
|
||||
|
||||
final double sc = 0.06;
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( Math.max( 0.0, offsetX - o.getFrontOffsetX() * sc ), Math.max( 0.0, offsetY - o.getFrontOffsetY() * sc ), Math.max( 0.0, offsetZ - o.getFrontOffsetZ() * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.getFrontOffsetX() * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.getFrontOffsetY() * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.getFrontOffsetZ() * sc ) ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( Math.max( 0.0, offsetX - o.getFrontOffsetX() * sc ), Math.max( 0.0, offsetY - o.getFrontOffsetY() * sc ), Math.max( 0.0, offsetZ - o.getFrontOffsetZ() * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.getFrontOffsetX() * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.getFrontOffsetY() * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.getFrontOffsetZ() * sc ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( 0.05, 0.05, 0.05, 0.95, 0.95, 0.95 ) );
|
||||
out.add( new AxisAlignedBB( 0.05, 0.05, 0.05, 0.95, 0.95, 0.95 ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,19 +33,20 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.ItemModelMesher;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.statemap.DefaultStateMapper;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.MouseEvent;
|
||||
|
@ -55,7 +56,6 @@ import net.minecraftforge.common.MinecraftForge;
|
|||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
|
||||
import appeng.api.parts.CableRenderMode;
|
||||
import appeng.api.parts.IPartItem;
|
||||
|
@ -200,7 +200,7 @@ public class ClientHelper extends ServerHelper
|
|||
this.spawnLightning( worldObj, posX, posY, posZ );
|
||||
return;
|
||||
case LightningArc:
|
||||
this.spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o );
|
||||
this.spawnLightningArc( worldObj, posX, posY, posZ, (Vec3d) o );
|
||||
return;
|
||||
default:
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ public class ClientHelper extends ServerHelper
|
|||
}
|
||||
|
||||
@Override
|
||||
public MovingObjectPosition getMOP()
|
||||
public RayTraceResult getRTR()
|
||||
{
|
||||
return Minecraft.getMinecraft().objectMouseOver;
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ public class ClientHelper extends ServerHelper
|
|||
final String MODID = AppEng.MOD_ID + ":";
|
||||
for( final List<IconReg> reg : this.iconRegistrations.values() )
|
||||
{
|
||||
final String[] names = new String[reg.size()];
|
||||
final ResourceLocation[] names = new ResourceLocation[reg.size()];
|
||||
|
||||
Item it = null;
|
||||
|
||||
|
@ -325,10 +325,10 @@ public class ClientHelper extends ServerHelper
|
|||
mesher.register( (Item) r.item, r.meta, r.loc );
|
||||
}
|
||||
|
||||
names[offset++] = MODID + r.name;
|
||||
names[offset++] = new ResourceLocation( MODID, r.name );
|
||||
}
|
||||
|
||||
ModelBakery.addVariantName( it, names );
|
||||
ModelBakery.registerItemVariants( it, names );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -409,7 +409,7 @@ public class ClientHelper extends ServerHelper
|
|||
@SubscribeEvent
|
||||
public void postPlayerRender( final RenderLivingEvent.Pre p )
|
||||
{
|
||||
final PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.entity.getEntityId() );
|
||||
final PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.getEntity().getEntityId() );
|
||||
if( player != null )
|
||||
{
|
||||
final AEColor col = player.myColor;
|
||||
|
@ -448,11 +448,11 @@ public class ClientHelper extends ServerHelper
|
|||
final float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
|
||||
final CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
||||
final CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.DIAMOND );
|
||||
|
||||
fx.motionX = -x * 0.2;
|
||||
fx.motionY = -y * 0.2;
|
||||
fx.motionZ = -z * 0.2;
|
||||
fx.setMotionX( -x * 0.2f );
|
||||
fx.setMotionY( -y * 0.2f );
|
||||
fx.setMotionZ( -z * 0.2f );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
@ -463,11 +463,11 @@ public class ClientHelper extends ServerHelper
|
|||
final float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
|
||||
final EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
||||
final EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.DIAMOND );
|
||||
|
||||
fx.motionX = -x * 0.1;
|
||||
fx.motionY = -y * 0.1;
|
||||
fx.motionZ = -z * 0.1;
|
||||
fx.setMotionX( -x * 0.1f );
|
||||
fx.setMotionY( -y * 0.1f );
|
||||
fx.setMotionZ( -z * 0.1f );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
@ -478,7 +478,7 @@ public class ClientHelper extends ServerHelper
|
|||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnLightningArc( final World worldObj, final double posX, final double posY, final double posZ, final Vec3 second )
|
||||
private void spawnLightningArc( final World worldObj, final double posX, final double posY, final double posZ, final Vec3d second )
|
||||
{
|
||||
final LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
|
@ -489,14 +489,15 @@ public class ClientHelper extends ServerHelper
|
|||
{
|
||||
// inventory renderer
|
||||
final SmartModel buses = new SmartModel( new BlockRenderInfo( ( new RendererCableBus() ) ) );
|
||||
event.modelRegistry.putObject( this.partRenderer, buses );
|
||||
event.getModelRegistry().putObject( this.partRenderer, buses );
|
||||
|
||||
for( final IconReg reg : this.iconTmp )
|
||||
{
|
||||
if( reg.item instanceof IPartItem || reg.item instanceof IFacadeItem )
|
||||
{
|
||||
//TODO 1.9.4 - UniqueIdentifier => ?
|
||||
final UniqueIdentifier i = GameRegistry.findUniqueIdentifierFor( (Item) reg.item );
|
||||
event.modelRegistry.putObject( new ModelResourceLocation( new ResourceLocation( i.modId, i.name ), "inventory" ), buses );
|
||||
event.getModelRegistry().putObject( new ModelResourceLocation( new ResourceLocation( i.modId, i.name ), "inventory" ), buses );
|
||||
}
|
||||
|
||||
if( reg.item instanceof AEBaseBlock )
|
||||
|
@ -508,13 +509,13 @@ public class ClientHelper extends ServerHelper
|
|||
}
|
||||
|
||||
final SmartModel sm = new SmartModel( renderer );
|
||||
event.modelRegistry.putObject( renderer.getRendererInstance().getResourcePath(), sm );
|
||||
event.getModelRegistry().putObject( renderer.getRendererInstance().getResourcePath(), sm );
|
||||
|
||||
final Map data = new DefaultStateMapper().putStateModelLocations( (Block) reg.item );
|
||||
for( final Object Loc : data.values() )
|
||||
{
|
||||
final ModelResourceLocation res = (ModelResourceLocation) Loc;
|
||||
event.modelRegistry.putObject( res, sm );
|
||||
event.getModelRegistry().putObject( res, sm );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -523,20 +524,21 @@ public class ClientHelper extends ServerHelper
|
|||
@SubscribeEvent
|
||||
public void wheelEvent( final MouseEvent me )
|
||||
{
|
||||
if( me.isCanceled() || me.dwheel == 0 )
|
||||
if( me.isCanceled() || me.getDwheel() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
final ItemStack is = player.getHeldItem();
|
||||
//TODO 1.9.4 - 2 hands. Just do something!
|
||||
final ItemStack is = player.getItemStackFromSlot( EntityEquipmentSlot.MAINHAND );
|
||||
|
||||
if( is != null && is.getItem() instanceof IMouseWheelItem && player.isSneaking() )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Item", me.dwheel > 0 ? "WheelUp" : "WheelDown" ) );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Item", me.getDwheel() > 0 ? "WheelUp" : "WheelDown" ) );
|
||||
me.setCanceled( true );
|
||||
}
|
||||
catch( final IOException e )
|
||||
|
@ -553,7 +555,7 @@ public class ClientHelper extends ServerHelper
|
|||
{
|
||||
if( reg.item instanceof AEBaseItem )
|
||||
{
|
||||
( (AEBaseItem) reg.item ).registerCustomIcon( ev.map );
|
||||
( (AEBaseItem) reg.item ).registerCustomIcon( ev.getMap() );
|
||||
}
|
||||
else if( reg.item instanceof AEBaseBlock )
|
||||
{
|
||||
|
@ -563,17 +565,17 @@ public class ClientHelper extends ServerHelper
|
|||
continue;
|
||||
}
|
||||
|
||||
( (AEBaseBlock) reg.item ).registerBlockIcons( ev.map, reg.name );
|
||||
( (AEBaseBlock) reg.item ).registerBlockIcons( ev.getMap(), reg.name );
|
||||
}
|
||||
}
|
||||
|
||||
this.extraIcons.forEach( ev.map::registerSprite );
|
||||
this.extraIcons.forEach( ev.getMap()::registerSprite );
|
||||
|
||||
// if( ev.map.getTextureType() == ITEM_RENDERER )
|
||||
{
|
||||
for( final ExtraItemTextures et : ExtraItemTextures.values() )
|
||||
{
|
||||
et.registerIcon( ev.map );
|
||||
et.registerIcon( ev.getMap() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -581,12 +583,12 @@ public class ClientHelper extends ServerHelper
|
|||
{
|
||||
for( final ExtraBlockTextures et : ExtraBlockTextures.values() )
|
||||
{
|
||||
et.registerIcon( ev.map );
|
||||
et.registerIcon( ev.getMap() );
|
||||
}
|
||||
|
||||
for( final CableBusTextures cb : CableBusTextures.values() )
|
||||
{
|
||||
cb.registerIcon( ev.map );
|
||||
cb.registerIcon( ev.getMap() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,20 +2,23 @@
|
|||
package appeng.client;
|
||||
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.model.ISmartBlockModel;
|
||||
import net.minecraftforge.client.model.ISmartItemModel;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -27,7 +30,7 @@ import appeng.client.texture.MissingIcon;
|
|||
|
||||
|
||||
// net.minecraft.client.renderer.tileentity.TileEntityItemStackRenderer
|
||||
public class SmartModel implements IBakedModel, ISmartBlockModel, ISmartItemModel
|
||||
public class SmartModel implements IBakedModel
|
||||
{
|
||||
|
||||
private final BlockRenderInfo aeRenderer;
|
||||
|
@ -37,18 +40,6 @@ public class SmartModel implements IBakedModel, ISmartBlockModel, ISmartItemMode
|
|||
this.aeRenderer = rendererInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getFaceQuads( final EnumFacing p_177551_1_ )
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getGeneralQuads()
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
|
@ -80,18 +71,7 @@ public class SmartModel implements IBakedModel, ISmartBlockModel, ISmartItemMode
|
|||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState( final ItemStack stack )
|
||||
{
|
||||
final ModelGenerator helper = new BakingModelGenerator();
|
||||
final Block blk = Block.getBlockFromItem( stack.getItem() );
|
||||
helper.setRenderBoundsFromBlock( blk );
|
||||
this.aeRenderer.getRendererInstance().renderInventory( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, stack, helper, ItemRenderType.INVENTORY, null );
|
||||
helper.finalizeModel( true );
|
||||
return helper.getOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleBlockState( final IBlockState state )
|
||||
public List<BakedQuad> getQuads( IBlockState state, EnumFacing side, long rand )
|
||||
{
|
||||
final ModelGenerator helper = new BakingModelGenerator();
|
||||
final Block blk = state.getBlock();
|
||||
|
@ -102,7 +82,26 @@ public class SmartModel implements IBakedModel, ISmartBlockModel, ISmartItemMode
|
|||
helper.setBlockAccess( world );
|
||||
this.aeRenderer.getRendererInstance().renderInWorld( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, world, pos, helper );
|
||||
helper.finalizeModel( false );
|
||||
return helper.getOutput();
|
||||
return helper.getOutput().getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return new ItemOverrideList( Lists.newArrayList() ){
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState( IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity )
|
||||
{
|
||||
final ModelGenerator helper = new BakingModelGenerator();
|
||||
final Block blk = Block.getBlockFromItem( stack.getItem() );
|
||||
helper.setRenderBoundsFromBlock( blk );
|
||||
aeRenderer.getRendererInstance().renderInventory( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, stack, helper, ItemRenderType.INVENTORY, null );
|
||||
helper.finalizeModel( true );
|
||||
return helper.getOutput();
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,11 +42,12 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ClickType;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -380,14 +381,15 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
}
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - Whole ClickType thing and 1.8.9 conversion, to be checked
|
||||
@Override
|
||||
protected void handleMouseClick( final Slot slot, final int slotIdx, final int ctrlDown, final int key )
|
||||
protected void handleMouseClick( final Slot slot, final int slotIdx, final int key, final ClickType clickType )
|
||||
{
|
||||
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if( slot instanceof SlotFake )
|
||||
{
|
||||
final InventoryAction action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
final InventoryAction action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
|
||||
if( this.drag_click.size() > 1 )
|
||||
{
|
||||
|
@ -430,7 +432,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
}
|
||||
else
|
||||
{
|
||||
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||
action = isCtrlKeyDown() ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||
}
|
||||
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
|
@ -470,10 +472,10 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
switch( key )
|
||||
{
|
||||
case 0: // pickup / set-down.
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
break;
|
||||
case 1:
|
||||
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
action = isCtrlKeyDown() ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
break;
|
||||
|
||||
case 3: // creative dupe:
|
||||
|
@ -507,7 +509,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
switch( key )
|
||||
{
|
||||
case 0: // pickup / set-down.
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
stack = ( (SlotME) slot ).getAEStack();
|
||||
|
||||
if( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
||||
|
@ -517,7 +519,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
|
||||
break;
|
||||
case 1:
|
||||
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
action = isCtrlKeyDown() ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
stack = ( (SlotME) slot ).getAEStack();
|
||||
break;
|
||||
|
||||
|
@ -580,7 +582,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
{
|
||||
if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot( inventorySlot, this.dbl_whichItem, true ) )
|
||||
{
|
||||
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, ctrlDown, 1 );
|
||||
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, 1, clickType );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -588,7 +590,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
this.disableShiftClick = false;
|
||||
}
|
||||
|
||||
super.handleMouseClick( slot, slotIdx, ctrlDown, key );
|
||||
super.handleMouseClick( slot, slotIdx, key, clickType );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -625,7 +627,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
|
||||
if( theSlot.getSlotStackLimit() == 64 )
|
||||
{
|
||||
this.handleMouseClick( theSlot, theSlot.slotNumber, j, 2 );
|
||||
this.handleMouseClick( theSlot, theSlot.slotNumber, j, ClickType.SWAP );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -816,18 +818,18 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
final float par4 = uv_y * 16;
|
||||
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
final VertexBuffer VertexBuffer = tessellator.getBuffer();
|
||||
|
||||
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
;
|
||||
final float f1 = 0.00390625F;
|
||||
final float f = 0.00390625F;
|
||||
final float par6 = 16;
|
||||
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).endVertex();
|
||||
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).endVertex();
|
||||
final float par5 = 16;
|
||||
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).endVertex();
|
||||
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).endVertex();
|
||||
worldrenderer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).endVertex();
|
||||
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).endVertex();
|
||||
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).endVertex();
|
||||
VertexBuffer.color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).endVertex();
|
||||
tessellator.draw();
|
||||
}
|
||||
catch( final Exception err )
|
||||
|
|
|
@ -55,7 +55,7 @@ import appeng.util.Platform;
|
|||
import appeng.util.ReadableNumberConverter;
|
||||
|
||||
|
||||
public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
public class GuICraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
private static final int GUI_HEIGHT = 184;
|
||||
private static final int GUI_WIDTH = 238;
|
||||
|
@ -92,12 +92,12 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||
private GuiButton cancel;
|
||||
private int tooltip = -1;
|
||||
|
||||
public GuiCraftingCPU( final InventoryPlayer inventoryPlayer, final Object te )
|
||||
public GuICraftingCPU( final InventoryPlayer inventoryPlayer, final Object te )
|
||||
{
|
||||
this( new ContainerCraftingCPU( inventoryPlayer, te ) );
|
||||
}
|
||||
|
||||
protected GuiCraftingCPU( final ContainerCraftingCPU container )
|
||||
protected GuICraftingCPU( final ContainerCraftingCPU container )
|
||||
{
|
||||
super( container );
|
||||
this.craftingCpu = container;
|
||||
|
|
|
@ -49,7 +49,7 @@ import appeng.parts.reporting.PartPatternTerminal;
|
|||
import appeng.parts.reporting.PartTerminal;
|
||||
|
||||
|
||||
public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
public class GuIContainerListenerStatus extends GuICraftingCPU
|
||||
{
|
||||
|
||||
private final ContainerCraftingStatus status;
|
||||
|
@ -59,7 +59,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||
private GuiBridge originalGui;
|
||||
private ItemStack myIcon = null;
|
||||
|
||||
public GuiCraftingStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
public GuIContainerListenerStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( new ContainerCraftingStatus( inventoryPlayer, te ) );
|
||||
|
||||
|
|
|
@ -36,12 +36,12 @@ import appeng.core.sync.packets.PacketInventoryAction;
|
|||
import appeng.helpers.InventoryAction;
|
||||
|
||||
|
||||
public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
public class GuIContainerListenerTerm extends GuiMEMonitorable
|
||||
{
|
||||
|
||||
private GuiImgButton clearBtn;
|
||||
|
||||
public GuiCraftingTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
public GuIContainerListenerTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
|
||||
this.setReservedSpace( 73 );
|
||||
|
|
|
@ -104,10 +104,10 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
|||
{
|
||||
super.initGui();
|
||||
|
||||
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.crafting_table ), GuiText.CraftingPattern.getLocal(), this.itemRender );
|
||||
this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.CRAFTING_TABLE ), GuiText.CraftingPattern.getLocal(), this.itemRender );
|
||||
this.buttonList.add( this.tabCraftButton );
|
||||
|
||||
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.furnace ), GuiText.ProcessingPattern.getLocal(), this.itemRender );
|
||||
this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.FURNACE ), GuiText.ProcessingPattern.getLocal(), this.itemRender );
|
||||
this.buttonList.add( this.tabProcessButton );
|
||||
|
||||
this.substitutionsEnabledBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163, Settings.ACTIONS, ItemSubstitution.ENABLED );
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.ActionItems;
|
||||
|
@ -289,8 +289,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||
|
||||
if( displayName != null )
|
||||
{
|
||||
String name = StatCollector.translateToLocal( displayName );
|
||||
String value = StatCollector.translateToLocal( displayValue );
|
||||
String name = I18n.translateToLocal( displayName );
|
||||
String value = I18n.translateToLocal( displayValue );
|
||||
|
||||
if( name == null || name.isEmpty() )
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.lwjgl.opengl.GL12;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
@ -89,8 +89,8 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
|||
{
|
||||
if( this.displayName != null )
|
||||
{
|
||||
String name = StatCollector.translateToLocal( this.displayName );
|
||||
String value = StatCollector.translateToLocal( this.displayHint );
|
||||
String name = I18n.translateToLocal( this.displayName );
|
||||
String value = I18n.translateToLocal( this.displayHint );
|
||||
|
||||
if( name == null || name.isEmpty() )
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ package appeng.client.me;
|
|||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.ItemSorters;
|
||||
|
@ -46,10 +46,10 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
|||
|
||||
public String getName()
|
||||
{
|
||||
final String s = StatCollector.translateToLocal( this.unlocalizedName + ".name" );
|
||||
final String s = I18n.translateToLocal( this.unlocalizedName + ".name" );
|
||||
if( s.equals( this.unlocalizedName + ".name" ) )
|
||||
{
|
||||
return StatCollector.translateToLocal( this.unlocalizedName );
|
||||
return I18n.translateToLocal( this.unlocalizedName );
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
|
|
@ -24,12 +24,13 @@ import javax.annotation.Nonnull;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.ModelManager;
|
||||
import net.minecraft.client.renderer.color.ItemColors;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.model.ModelManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
@ -48,9 +49,9 @@ import appeng.util.ReadableNumberConverter;
|
|||
*/
|
||||
public class AppEngRenderItem extends RenderItem
|
||||
{
|
||||
public AppEngRenderItem( final TextureManager textureManager, final ModelManager modelManager )
|
||||
public AppEngRenderItem( final TextureManager textureManager, final ModelManager modelManager, final ItemColors itemColors )
|
||||
{
|
||||
super( textureManager, modelManager );
|
||||
super( textureManager, modelManager, itemColors );
|
||||
}
|
||||
|
||||
private static final ISlimReadableNumberConverter SLIM_CONVERTER = ReadableNumberConverter.INSTANCE;
|
||||
|
@ -81,7 +82,7 @@ public class AppEngRenderItem extends RenderItem
|
|||
GL11.glDisable( GL11.GL_ALPHA_TEST );
|
||||
GL11.glDisable( GL11.GL_BLEND );
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final WorldRenderer wr = tessellator.getWorldRenderer();
|
||||
final VertexBuffer wr = tessellator.getBuffer();
|
||||
final int l = 255 - k << 16 | k << 8;
|
||||
final int i1 = ( 255 - k ) / 4 << 16 | 16128;
|
||||
this.renderQuad( tessellator, xPos + 2, yPos + 13, 13, 2, 0 );
|
||||
|
@ -132,7 +133,7 @@ public class AppEngRenderItem extends RenderItem
|
|||
|
||||
private void renderQuad( final Tessellator par1Tessellator, final int par2, final int par3, final int par4, final int par5, final int par6 )
|
||||
{
|
||||
final WorldRenderer wr = par1Tessellator.getWorldRenderer();
|
||||
final VertexBuffer wr = par1Tessellator.getBuffer();
|
||||
|
||||
wr.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
|
||||
|
|
|
@ -14,18 +14,18 @@ import net.minecraft.client.renderer.block.model.BakedQuad;
|
|||
import net.minecraft.client.renderer.block.model.BlockFaceUV;
|
||||
import net.minecraft.client.renderer.block.model.BlockPartFace;
|
||||
import net.minecraft.client.renderer.block.model.FaceBakery;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelRotation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.client.model.IColoredBakedQuad;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
@ -35,17 +35,15 @@ import appeng.client.texture.MissingIcon;
|
|||
import appeng.items.AEBaseItem;
|
||||
import appeng.items.parts.ItemMultiPart;
|
||||
|
||||
|
||||
//TODO 1.9.4 - Just all
|
||||
public class BakingModelGenerator implements ModelGenerator
|
||||
{
|
||||
private static final class CachedModel implements IBakedModel
|
||||
{
|
||||
private final List<BakedQuad>[] faces = new List[6];
|
||||
private final List<BakedQuad> general;
|
||||
|
||||
public CachedModel()
|
||||
{
|
||||
this.general = new ArrayList<BakedQuad>();
|
||||
for( final EnumFacing f : EnumFacing.VALUES )
|
||||
{
|
||||
this.faces[f.ordinal()] = new ArrayList<BakedQuad>();
|
||||
|
@ -83,15 +81,15 @@ public class BakingModelGenerator implements ModelGenerator
|
|||
}
|
||||
|
||||
@Override
|
||||
public List getGeneralQuads()
|
||||
public List<BakedQuad> getQuads( IBlockState state, EnumFacing side, long rand )
|
||||
{
|
||||
return this.general;
|
||||
return this.faces[side.ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getFaceQuads( final EnumFacing p_177551_1_ )
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return this.faces[p_177551_1_.ordinal()];
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -364,7 +362,7 @@ public class BakingModelGenerator implements ModelGenerator
|
|||
|
||||
public boolean isAlphaPass()
|
||||
{
|
||||
return MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT;
|
||||
return MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
private float[] getFaceUvs( final EnumFacing face, final Vector3f to_16, final Vector3f from_16 )
|
||||
|
|
|
@ -21,6 +21,7 @@ package appeng.client.render;
|
|||
|
||||
import java.nio.FloatBuffer;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.lwjgl.BufferUtils;
|
||||
|
@ -28,15 +29,15 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -666,7 +667,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
|||
return ( 16.0 - uv ) / 16.0;
|
||||
}
|
||||
|
||||
public void renderTile( final B block, final T tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final B block, final T tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
|
||||
renderer.setUvRotateBottom( renderer.setUvRotateTop( renderer.setUvRotateEast( renderer.setUvRotateWest( renderer.setUvRotateNorth( renderer.setUvRotateSouth( 0 ) ) ) ) ) );
|
||||
|
@ -675,7 +676,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
|||
final AEPartLocation forward = AEPartLocation.SOUTH;
|
||||
this.applyTESRRotation( x, y, z, forward.getFacing(), up.getFacing() );
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
if( Minecraft.isAmbientOcclusionEnabled() )
|
||||
|
@ -753,7 +754,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
|||
GL11.glTranslatef( 0, -0.14F, 0 );
|
||||
|
||||
// RenderItem.renderInFrame = true;
|
||||
Minecraft.getMinecraft().getRenderManager().renderEntityWithPosYaw( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F );
|
||||
Minecraft.getMinecraft().getRenderManager().doRenderEntity( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F, true );
|
||||
// RenderItem.renderInFrame = false;
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
|
|
@ -20,14 +20,15 @@ package appeng.client.render;
|
|||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import appeng.api.parts.IFacadeContainer;
|
||||
|
@ -60,7 +60,7 @@ public class CableRenderHelper
|
|||
}
|
||||
else
|
||||
{
|
||||
BusRenderHelper.INSTANCE.setPass( MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT ? 1 : 0 );
|
||||
BusRenderHelper.INSTANCE.setPass( MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT ? 1 : 0 );
|
||||
}
|
||||
|
||||
if( renderer.getBlockAccess() == null )
|
||||
|
|
|
@ -3,7 +3,7 @@ package appeng.client.render;
|
|||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.client.renderer.GLAllocation;
|
|||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraftforge.client.IRenderHandler;
|
||||
|
||||
|
@ -77,7 +77,7 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
GL11.glDepthMask( false );
|
||||
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
final VertexBuffer VertexBuffer = tessellator.getBuffer();
|
||||
|
||||
for( int i = 0; i < 6; ++i )
|
||||
{
|
||||
|
@ -108,11 +108,11 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
GL11.glRotatef( -90.0F, 0.0F, 0.0F, 1.0F );
|
||||
}
|
||||
|
||||
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, -100.0D ).tex( 0.0D, 0.0D ).endVertex();
|
||||
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, 100.0D ).tex( 0.0D, 16.0D ).endVertex();
|
||||
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, 100.0D ).tex( 16.0D, 16.0D ).endVertex();
|
||||
worldrenderer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, -100.0D ).tex( 16.0D, 0.0D ).endVertex();
|
||||
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, -100.0D ).tex( 0.0D, 0.0D ).endVertex();
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( -100.0D, -100.0D, 100.0D ).tex( 0.0D, 16.0D ).endVertex();
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, 100.0D ).tex( 16.0D, 16.0D ).endVertex();
|
||||
VertexBuffer.color( 0f, 0f, 0f, 1f ).pos( 100.0D, -100.0D, -100.0D ).tex( 16.0D, 0.0D ).endVertex();
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
@ -145,8 +145,8 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
private void renderTwinkles()
|
||||
{
|
||||
final Tessellator tessellator = Tessellator.getInstance();
|
||||
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
final VertexBuffer VertexBuffer = tessellator.getBuffer();
|
||||
VertexBuffer.begin( GL11.GL_QUADS, DefaultVertexFormats.ITEM );
|
||||
|
||||
for( int i = 0; i < 50; ++i )
|
||||
{
|
||||
|
@ -186,7 +186,7 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
final double d23 = d17 * d12 - d20 * d13;
|
||||
final double d24 = d23 * d9 - d21 * d10;
|
||||
final double d25 = d21 * d9 + d23 * d10;
|
||||
worldrenderer.pos( x + d24, y + d22, z + d25 ).endVertex();
|
||||
VertexBuffer.pos( x + d24, y + d22, z + d25 ).endVertex();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
|||
GL11.glPushMatrix();
|
||||
|
||||
this.renderBlocksInstance.setBlockAccess( te.getWorld() );
|
||||
this.blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess.getWorldRenderer(), x, y, z, f, this.renderBlocksInstance );
|
||||
this.blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess.getBuffer(), x, y, z, f, this.renderBlocksInstance );
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.util.HashMap;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
|
|
@ -23,8 +23,8 @@ import java.util.EnumSet;
|
|||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
|
|
@ -26,10 +26,10 @@ import org.lwjgl.opengl.GL12;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -122,7 +122,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockCharger block, final TileCharger tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockCharger block, final TileCharger tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
final ItemStack sis = tile.getStackInSlot( 0 );
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ package appeng.client.render.blocks;
|
|||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
|
|
@ -23,9 +23,9 @@ import java.util.EnumSet;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
|
@ -104,7 +104,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
|||
final BusRenderHelper i = BusRenderHelper.INSTANCE;
|
||||
|
||||
renderer.setBlockAccess( w );
|
||||
i.setPass( MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT ? 1 : 0 );
|
||||
i.setPass( MinecraftForgeClient.getRenderLayer() == BlockRenderLayer.TRANSLUCENT ? 1 : 0 );
|
||||
i.setOrientation( EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
|
||||
|
||||
final float highX = this.isConnected( w, pos, EnumFacing.EAST ) ? 16 : 13.01f;
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockCraftingMonitor block, final TileCraftingMonitorTile tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockCraftingMonitor block, final TileCraftingMonitorTile tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
if( tile != null )
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
|
|||
}
|
||||
}
|
||||
|
||||
private void tesrRenderScreen( final WorldRenderer tess, final TileCraftingMonitorTile cmt, final IAEItemStack ais )
|
||||
private void tesrRenderScreen( final VertexBuffer tess, final TileCraftingMonitorTile cmt, final IAEItemStack ais )
|
||||
{
|
||||
final EnumFacing side = cmt.getForward();
|
||||
|
||||
|
|
|
@ -23,12 +23,12 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
@ -67,14 +67,14 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockCrank blk, final TileCrank tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderBlocks )
|
||||
public void renderTile( final BlockCrank blk, final TileCrank tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderBlocks )
|
||||
{
|
||||
if( tile.getUp() == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
if( Minecraft.isAmbientOcclusionEnabled() )
|
||||
|
|
|
@ -20,7 +20,7 @@ package appeng.client.render.blocks;
|
|||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
|
|
|
@ -28,12 +28,12 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.features.IInscriberRecipe;
|
||||
|
@ -149,7 +149,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockInscriber block, final TileInscriber tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockInscriber block, final TileInscriber tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
|
@ -160,7 +160,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
|||
GL11.glCullFace( GL11.GL_FRONT );
|
||||
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.renderEngine.bindTexture( TextureMap.locationBlocksTexture );
|
||||
mc.renderEngine.bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
|
||||
|
||||
// << 20 | light << 4;
|
||||
final int br = tile.getWorld().getCombinedLight( tile.getPos(), 0 );
|
||||
|
@ -263,7 +263,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
|||
}
|
||||
}
|
||||
|
||||
private void renderItem( ItemStack sis, final float o, final AEBaseBlock block, final AEBaseTile tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
private void renderItem( ItemStack sis, final float o, final AEBaseBlock block, final AEBaseTile tile, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
if( sis != null )
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
package appeng.client.render.blocks;
|
||||
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
|
|
|
@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
|
@ -64,7 +64,7 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
|
|||
|
||||
final IAESprite[] icoSet = { imb.getIcon( EnumFacing.UP, imb.getDefaultState() ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
|
||||
|
||||
final int brightness = imb.getMixedBrightnessForBlock( world, pos );
|
||||
final int brightness = imb.getLightValue( world.getBlockState( pos ), world, pos );
|
||||
|
||||
final EnumSet<EnumFacing> validSides = EnumSet.noneOf( EnumFacing.class );
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ package appeng.client.render.blocks;
|
|||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
|
|
|
@ -25,10 +25,10 @@ import org.lwjgl.opengl.GL12;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelChest;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
@ -84,7 +84,7 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockSkyChest block, final TileSkyChest skyChest, final WorldRenderer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockSkyChest block, final TileSkyChest skyChest, final VertexBuffer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
|
||||
{
|
||||
if( skyChest == null )
|
||||
{
|
||||
|
|
|
@ -23,11 +23,11 @@ import org.lwjgl.opengl.GL11;
|
|||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
@ -178,7 +178,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockSkyCompass block, final TileSkyCompass skyCompass, final WorldRenderer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockSkyCompass block, final TileSkyCompass skyCompass, final VertexBuffer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
|
||||
{
|
||||
if( skyCompass == null )
|
||||
{
|
||||
|
|
|
@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
|
|
@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
|
|
@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
|
|
@ -20,7 +20,7 @@ package appeng.client.render.blocks;
|
|||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
|
|
@ -25,8 +25,8 @@ import java.util.EnumSet;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
|
|
@ -22,7 +22,7 @@ package appeng.client.render.blocks;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
|
|
@ -20,7 +20,7 @@ package appeng.client.render.blocks;
|
|||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.util.EnumSet;
|
|||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
@ -68,7 +68,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
|||
|
||||
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.HOPPER.getDefaultState() )[0] );
|
||||
renderer.setRenderAllFaces( true );
|
||||
|
||||
final float top = 8.0f / 16.0f;
|
||||
|
@ -135,7 +135,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
|||
super.renderInWorld( block, world, pos, renderer );
|
||||
}
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
|
||||
block.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.HOPPER.getDefaultState() )[0] );
|
||||
|
||||
final float top = 8.0f / 16.0f;
|
||||
final float bottom = 7.0f / 16.0f;
|
||||
|
|
|
@ -20,8 +20,8 @@ package appeng.client.render.blocks;
|
|||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
|
|
|
@ -22,7 +22,7 @@ package appeng.client.render.blocks;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
@ -44,7 +44,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
|
|||
@Override
|
||||
public void renderInventory( final BlockTinyTNT block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() ) ) );
|
||||
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.TNT.getDefaultState() ) ) );
|
||||
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||
super.renderInventory( block, is, renderer, type, obj );
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
|
|||
@Override
|
||||
public boolean renderInWorld( final BlockTinyTNT imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
|
||||
{
|
||||
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() ) ) );
|
||||
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.TNT.getDefaultState() ) ) );
|
||||
renderer.setRenderAllFaces( true );
|
||||
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||
final boolean out = super.renderInWorld( imb, world, pos, renderer );
|
||||
|
|
|
@ -22,11 +22,11 @@ package appeng.client.render.blocks;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.parts.IFacadePart;
|
||||
|
@ -137,7 +137,7 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( final BlockCableBus block, final TileCableBus cableBus, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
public void renderTile( final BlockCableBus block, final TileCableBus cableBus, final VertexBuffer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
|
||||
{
|
||||
if( cableBus != null )
|
||||
{
|
||||
|
|
|
@ -22,8 +22,8 @@ package appeng.client.render.blocks;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -30,7 +30,7 @@ import appeng.core.CommonHelper;
|
|||
import appeng.entity.EntityFloatingItem;
|
||||
|
||||
|
||||
public class AssemblerFX extends EntityFX
|
||||
public class AssemblerFX extends Particle
|
||||
{
|
||||
|
||||
private final EntityFloatingItem fi;
|
||||
|
@ -47,6 +47,7 @@ public class AssemblerFX extends EntityFX
|
|||
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
|
||||
w.spawnEntityInWorld( this.fi );
|
||||
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
|
@ -62,7 +63,7 @@ public class AssemblerFX extends EntityFX
|
|||
{
|
||||
super.onUpdate();
|
||||
|
||||
if( this.isDead )
|
||||
if( this.isExpired )
|
||||
{
|
||||
this.fi.setDead();
|
||||
}
|
||||
|
@ -74,7 +75,7 @@ public class AssemblerFX extends EntityFX
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
{
|
||||
this.time += l;
|
||||
if( this.time > 4.0 )
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityReddustFX;
|
||||
import net.minecraft.client.particle.ParticleRedstone;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public class ChargedOreFX extends EntityReddustFX
|
||||
public class ChargedOreFX extends ParticleRedstone
|
||||
{
|
||||
|
||||
public ChargedOreFX( final World w, final double x, final double y, final double z, final float r, final float g, final float b )
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -34,7 +34,7 @@ import appeng.client.texture.ExtraBlockTextures;
|
|||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class CraftingFx extends EntityBreakingFX
|
||||
public class CraftingFx extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
|
@ -59,6 +59,7 @@ public class CraftingFx extends EntityBreakingFX
|
|||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
|
@ -69,7 +70,7 @@ public class CraftingFx extends EntityBreakingFX
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
|
||||
{
|
||||
if( partialTick < 0 || partialTick > 1 )
|
||||
{
|
||||
|
@ -119,4 +120,19 @@ public class CraftingFx extends EntityBreakingFX
|
|||
this.particleScale *= 0.51f;
|
||||
this.particleAlpha *= 0.51f;
|
||||
}
|
||||
|
||||
public void setMotionX( float motionX )
|
||||
{
|
||||
this.motionX = motionX;
|
||||
}
|
||||
|
||||
public void setMotionY( float motionY )
|
||||
{
|
||||
this.motionY = motionY;
|
||||
}
|
||||
|
||||
public void setMotionZ( float motionZ )
|
||||
{
|
||||
this.motionZ = motionZ;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -34,7 +34,7 @@ import appeng.client.texture.ExtraBlockTextures;
|
|||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class EnergyFx extends EntityBreakingFX
|
||||
public class EnergyFx extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
|
@ -58,6 +58,7 @@ public class EnergyFx extends EntityBreakingFX
|
|||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
|
@ -68,7 +69,7 @@ public class EnergyFx extends EntityBreakingFX
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
{
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
|
@ -109,4 +110,19 @@ public class EnergyFx extends EntityBreakingFX
|
|||
this.particleScale *= 0.89f;
|
||||
this.particleAlpha *= 0.89f;
|
||||
}
|
||||
|
||||
public void setMotionX( float motionX )
|
||||
{
|
||||
this.motionX = motionX;
|
||||
}
|
||||
|
||||
public void setMotionY( float motionY )
|
||||
{
|
||||
this.motionY = motionY;
|
||||
}
|
||||
|
||||
public void setMotionZ( float motionZ )
|
||||
{
|
||||
this.motionZ = motionZ;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public class LightningArcFX extends LightningFX
|
|||
public LightningArcFX( final World w, final double x, final double y, final double z, final double ex, final double ey, final double ez, final double r, final double g, final double b )
|
||||
{
|
||||
super( w, x, y, z, r, g, b, 6 );
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
|
||||
this.rx = ex - x;
|
||||
|
|
|
@ -22,15 +22,15 @@ package appeng.client.render.effects;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public class LightningFX extends EntityFX
|
||||
public class LightningFX extends Particle
|
||||
{
|
||||
|
||||
private static final Random RANDOM_GENERATOR = new Random();
|
||||
|
@ -55,6 +55,7 @@ public class LightningFX extends EntityFX
|
|||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.particleMaxAge = maxAge;
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
|
@ -84,7 +85,7 @@ public class LightningFX extends EntityFX
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
public void renderParticle( final VertexBuffer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
|
||||
{
|
||||
final float j = 1.0f;
|
||||
float red = this.particleRed * j * 0.9f;
|
||||
|
@ -210,7 +211,7 @@ public class LightningFX extends EntityFX
|
|||
this.hasData = false;
|
||||
}
|
||||
|
||||
private void draw( float red, float green, float blue, final WorldRenderer tess, final double[] a, final double[] b, final double f6, final double f8 )
|
||||
private void draw( float red, float green, float blue, final VertexBuffer tess, final double[] a, final double[] b, final double f6, final double f8 )
|
||||
{
|
||||
if( this.hasData )
|
||||
{
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityBreakingFX;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.particle.ParticleBreaking;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -30,7 +30,7 @@ import appeng.api.util.AEPartLocation;
|
|||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
|
||||
public class MatterCannonFX extends EntityBreakingFX
|
||||
public class MatterCannonFX extends ParticleBreaking
|
||||
{
|
||||
|
||||
private final TextureAtlasSprite particleTextureIndex;
|
||||
|
@ -48,6 +48,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
|||
this.motionY = 0.0f;
|
||||
this.motionZ = 0.0f;
|
||||
this.particleTextureIndex = ExtraBlockTextures.BlockMatterCannonParticle.getIcon().getAtlas();
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
|
@ -71,7 +72,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
public void renderParticle( final VertexBuffer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
|
||||
{
|
||||
final float f6 = this.particleTextureIndex.getMinU();
|
||||
final float f7 = this.particleTextureIndex.getMaxU();
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
package appeng.client.render.effects;
|
||||
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class VibrantFX extends EntityFX
|
||||
public class VibrantFX extends Particle
|
||||
{
|
||||
|
||||
public VibrantFX( final World par1World, final double x, final double y, final double z, final double par8, final double par10, final double par12 )
|
||||
|
@ -46,13 +46,14 @@ public class VibrantFX extends EntityFX
|
|||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
this.particleMaxAge = (int) ( 20.0D / ( Math.random() * 0.8D + 0.1D ) );
|
||||
//TODO 1.9.4 - noClip => ?
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness( final float par1 )
|
||||
public int getBrightnessForRender( final float par1 )
|
||||
{
|
||||
return 1.0f;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -69,7 +70,7 @@ public class VibrantFX extends EntityFX
|
|||
|
||||
if( this.particleMaxAge <= 0 || this.particleScale < 0.1 )
|
||||
{
|
||||
this.setDead();
|
||||
this.setExpired();
|
||||
}
|
||||
this.particleMaxAge--;
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ public enum CableBusTextures
|
|||
@SideOnly( Side.CLIENT )
|
||||
public static TextureAtlasSprite getMissing()
|
||||
{
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ) ).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
|
|
|
@ -158,7 +158,7 @@ public enum ExtraBlockTextures
|
|||
@SideOnly( Side.CLIENT )
|
||||
public static IAESprite getMissing()
|
||||
{
|
||||
return new BaseIcon( ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" ) );
|
||||
return new BaseIcon( ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ) ).getAtlasSprite( "missingno" ) );
|
||||
}
|
||||
|
||||
public String getName()
|
||||
|
|
|
@ -45,7 +45,7 @@ public class MissingIcon implements IAESprite
|
|||
@SideOnly( Side.CLIENT )
|
||||
public static TextureAtlasSprite getMissing()
|
||||
{
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
|
||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.LOCATION_BLOCKS_TEXTURE ) ).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,7 +33,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -438,13 +438,13 @@ public abstract class AEBaseContainer extends Container
|
|||
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
for( final Object crafter : this.crafters )
|
||||
for( final Object crafter : this.listeners )
|
||||
{
|
||||
final ICrafting icrafting = (ICrafting) crafter;
|
||||
final IContainerListener IContainerListener = (IContainerListener) crafter;
|
||||
|
||||
for( final SyncData sd : this.syncData.values() )
|
||||
{
|
||||
sd.tick( icrafting );
|
||||
sd.tick( IContainerListener );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ package appeng.container;
|
|||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.lang.reflect.Field;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.AELog;
|
||||
|
@ -54,7 +54,7 @@ public class SyncData
|
|||
return this.channel;
|
||||
}
|
||||
|
||||
public void tick( final ICrafting c )
|
||||
public void tick( final IContainerListener c )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ public class SyncData
|
|||
}
|
||||
}
|
||||
|
||||
private void send( final ICrafting o, final Object val ) throws IOException
|
||||
private void send( final IContainerListener o, final Object val ) throws IOException
|
||||
{
|
||||
if( val instanceof String )
|
||||
{
|
||||
|
|
|
@ -24,10 +24,10 @@ import java.util.Iterator;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.CopyMode;
|
||||
|
@ -151,9 +151,9 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
this.setValidContainer( false );
|
||||
}
|
||||
|
||||
for( final Object crafter : this.crafters )
|
||||
for( final Object crafter : this.listeners )
|
||||
{
|
||||
final ICrafting icrafting = (ICrafting) crafter;
|
||||
final IContainerListener IContainerListener = (IContainerListener) crafter;
|
||||
|
||||
if( this.prevStack != is )
|
||||
{
|
||||
|
@ -163,10 +163,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
if( s instanceof OptionalSlotRestrictedInput )
|
||||
{
|
||||
final OptionalSlotRestrictedInput sri = (OptionalSlotRestrictedInput) s;
|
||||
icrafting.sendSlotContents( this, sri.slotNumber, sri.getStack() );
|
||||
IContainerListener.sendSlotContents( this, sri.slotNumber, sri.getStack() );
|
||||
}
|
||||
}
|
||||
( (EntityPlayerMP) icrafting ).isChangingQuantityOnly = false;
|
||||
( (EntityPlayerMP) IContainerListener ).isChangingQuantityOnly = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ import com.google.common.collect.ImmutableSet;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
@ -259,7 +259,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
|||
}
|
||||
}
|
||||
|
||||
for( final Object g : this.crafters )
|
||||
for( final Object g : this.listeners )
|
||||
{
|
||||
if( g instanceof EntityPlayer )
|
||||
{
|
||||
|
@ -279,7 +279,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
|||
}
|
||||
catch( final Throwable e )
|
||||
{
|
||||
this.getPlayerInv().player.addChatMessage( new ChatComponentText( "Error: " + e.toString() ) );
|
||||
this.getPlayerInv().player.addChatMessage( new TextComponentString( "Error: " + e.toString() ) );
|
||||
AELog.debug( e );
|
||||
this.setValidContainer( false );
|
||||
this.result = null;
|
||||
|
@ -365,8 +365,9 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
|||
return new PlayerSource( this.getPlayerInv().player, (IActionHost) this.getTarget() );
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - removeCraftingFromCrafters => ?
|
||||
@Override
|
||||
public void removeCraftingFromCrafters( final ICrafting c )
|
||||
public void removeCraftingFromCrafters( final IContainerListener c )
|
||||
{
|
||||
super.removeCraftingFromCrafters( c );
|
||||
if( this.getJob() != null )
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.io.IOException;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.networking.IGrid;
|
||||
|
@ -111,7 +111,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
|||
this.getMonitor().removeListener( this );
|
||||
}
|
||||
|
||||
for( final Object g : this.crafters )
|
||||
for( final Object g : this.listeners )
|
||||
{
|
||||
if( g instanceof EntityPlayer )
|
||||
{
|
||||
|
@ -152,12 +152,13 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
|||
this.setEstimatedTime( -1 );
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - removeCraftingFromCrafters => ?
|
||||
@Override
|
||||
public void removeCraftingFromCrafters( final ICrafting c )
|
||||
public void removeCraftingFromCrafters( final IContainerListener c )
|
||||
{
|
||||
super.removeCraftingFromCrafters( c );
|
||||
|
||||
if( this.crafters.isEmpty() && this.getMonitor() != null )
|
||||
if( this.listeners.isEmpty() && this.getMonitor() != null )
|
||||
{
|
||||
this.getMonitor().removeListener( this );
|
||||
}
|
||||
|
@ -202,7 +203,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
|||
|
||||
this.list.resetStatus();
|
||||
|
||||
for( final Object g : this.crafters )
|
||||
for( final Object g : this.listeners )
|
||||
{
|
||||
if( g instanceof EntityPlayer )
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ import javax.annotation.Nonnull;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
|
@ -186,7 +186,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||
if( sideLocal != sideRemote )
|
||||
{
|
||||
this.clientCM.putSetting( set, sideLocal );
|
||||
for( final Object crafter : this.crafters )
|
||||
for( final Object crafter : this.listeners )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||
{
|
||||
this.items.resetStatus();
|
||||
|
||||
for( final Object c : this.crafters )
|
||||
for( final Object c : this.listeners )
|
||||
{
|
||||
if( c instanceof EntityPlayer )
|
||||
{
|
||||
|
@ -300,15 +300,16 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||
super.onUpdate( field, oldValue, newValue );
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - onCraftGuiOpened => ?
|
||||
@Override
|
||||
public void onCraftGuiOpened( final ICrafting c )
|
||||
public void onCraftGuiOpened( final IContainerListener c )
|
||||
{
|
||||
super.onCraftGuiOpened( c );
|
||||
|
||||
this.queueInventory( c );
|
||||
}
|
||||
|
||||
private void queueInventory( final ICrafting c )
|
||||
private void queueInventory( final IContainerListener c )
|
||||
{
|
||||
if( Platform.isServer() && c instanceof EntityPlayer && this.monitor != null )
|
||||
{
|
||||
|
@ -340,13 +341,13 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void removeCraftingFromCrafters( final ICrafting c )
|
||||
public void removeListener( final IContainerListener c )
|
||||
{
|
||||
super.removeCraftingFromCrafters( c );
|
||||
super.removeListener( c );
|
||||
|
||||
if( this.crafters.isEmpty() && this.monitor != null )
|
||||
if( this.listeners.isEmpty() && this.monitor != null )
|
||||
{
|
||||
this.monitor.removeListener( this );
|
||||
}
|
||||
|
@ -380,13 +381,9 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||
@Override
|
||||
public void onListUpdate()
|
||||
{
|
||||
for( final Object c : this.crafters )
|
||||
for( final IContainerListener c : this.listeners )
|
||||
{
|
||||
if( c instanceof ICrafting )
|
||||
{
|
||||
final ICrafting cr = (ICrafting) c;
|
||||
this.queueInventory( cr );
|
||||
}
|
||||
this.queueInventory( c );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
|||
}
|
||||
}
|
||||
|
||||
for( final Object c : this.crafters )
|
||||
for( final Object c : this.listeners )
|
||||
{
|
||||
if( c instanceof EntityPlayer )
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.List;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
@ -423,7 +423,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
|||
|
||||
if( failed != null )
|
||||
{
|
||||
p.dropPlayerItemWithRandomChoice( failed, false );
|
||||
p.dropItem( failed, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -481,19 +481,19 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
|||
{
|
||||
if( s == this.patternSlotOUT && Platform.isServer() )
|
||||
{
|
||||
for( final Object crafter : this.crafters )
|
||||
for( final Object crafter : this.listeners )
|
||||
{
|
||||
final ICrafting icrafting = (ICrafting) crafter;
|
||||
final IContainerListener IContainerListener = (IContainerListener) crafter;
|
||||
|
||||
for( final Object g : this.inventorySlots )
|
||||
{
|
||||
if( g instanceof OptionalSlotFake || g instanceof SlotFakeCraftingMatrix )
|
||||
{
|
||||
final Slot sri = (Slot) g;
|
||||
icrafting.sendSlotContents( this, sri.slotNumber, sri.getStack() );
|
||||
IContainerListener.sendSlotContents( this, sri.slotNumber, sri.getStack() );
|
||||
}
|
||||
}
|
||||
( (EntityPlayerMP) icrafting ).isChangingQuantityOnly = false;
|
||||
( (EntityPlayerMP) IContainerListener ).isChangingQuantityOnly = false;
|
||||
}
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue