Moved F2R, added TESRs, fixed culling
-Externalized FacingToRotation. -BlockLightDetector now uses tile based rotations. -Added TESR methods and TESRs for chests. Can't get it to work in inventory. -Fixed rotation bugs involving culling and lighting. Now rotating culled faces and normals too. Closes #21. Relates to #9, #10 and #20.
This commit is contained in:
@@ -28,17 +28,23 @@ import javax.annotation.Nullable;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
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;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.client.render.tesr.SkyChestTESR;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
@@ -69,6 +75,25 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType( IBlockState state )
|
||||
{
|
||||
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public TileEntitySpecialRenderer<TileSkyChest> getTESR()
|
||||
{
|
||||
return new SkyChestTESR();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasItemTESR()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user