The Great Renamening of 2020
This commit is contained in:
@@ -30,27 +30,26 @@ import net.minecraft.client.renderer.Quaternion;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.client.render.FacingToRotation;
|
||||
import appeng.tile.grindstone.TileCrank;
|
||||
import appeng.tile.grindstone.CrankTileEntity;
|
||||
|
||||
/**
|
||||
* This FastTESR only handles the animated model of the turning crank. When the
|
||||
* crank is at rest, it is rendered using a normal model.
|
||||
*/
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class CrankTESR extends TileEntityRenderer<TileCrank> {
|
||||
public class CrankTESR extends TileEntityRenderer<CrankTileEntity> {
|
||||
|
||||
public CrankTESR(TileEntityRendererDispatcher rendererDispatcherIn) {
|
||||
super(rendererDispatcherIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileCrank te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers, int combinedLightIn,
|
||||
int combinedOverlayIn) {
|
||||
public void render(CrankTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers, int combinedLightIn,
|
||||
int combinedOverlayIn) {
|
||||
|
||||
// Apply GL transformations relative to the center of the block: 1) TE rotation
|
||||
// and 2) crank rotation
|
||||
|
||||
@@ -18,13 +18,13 @@ import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
|
||||
import appeng.block.storage.DriveSlotState;
|
||||
import appeng.client.render.FacingToRotation;
|
||||
import appeng.tile.storage.TileDrive;
|
||||
import appeng.tile.storage.DriveTileEntity;
|
||||
|
||||
/**
|
||||
* Renders the drive cell status indicators.
|
||||
*/
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class DriveLedTileEntityRenderer extends TileEntityRenderer<TileDrive> {
|
||||
public class DriveLedTileEntityRenderer extends TileEntityRenderer<DriveTileEntity> {
|
||||
|
||||
private static final EnumMap<DriveSlotState, Vector3f> STATE_COLORS;
|
||||
|
||||
@@ -68,8 +68,8 @@ public class DriveLedTileEntityRenderer extends TileEntityRenderer<TileDrive> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileDrive drive, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers,
|
||||
int combinedLightIn, int combinedOverlayIn) {
|
||||
public void render(DriveTileEntity drive, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers,
|
||||
int combinedLightIn, int combinedOverlayIn) {
|
||||
|
||||
if (drive.getCellCount() != 10) {
|
||||
throw new IllegalStateException("Expected drive to have 10 slots");
|
||||
@@ -119,7 +119,7 @@ public class DriveLedTileEntityRenderer extends TileEntityRenderer<TileDrive> {
|
||||
|
||||
}
|
||||
|
||||
private Vector3f getColorForSlot(TileDrive drive, int slot, float partialTicks) {
|
||||
private Vector3f getColorForSlot(DriveTileEntity drive, int slot, float partialTicks) {
|
||||
DriveSlotState state = DriveSlotState.fromCellStatus(drive.getCellStatus(slot));
|
||||
if (state == DriveSlotState.EMPTY) {
|
||||
return null;
|
||||
|
||||
@@ -25,13 +25,13 @@ import appeng.api.features.InscriberProcessType;
|
||||
import appeng.client.render.FacingToRotation;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.recipes.handlers.InscriberRecipe;
|
||||
import appeng.tile.misc.TileInscriber;
|
||||
import appeng.tile.misc.InscriberTileEntity;
|
||||
|
||||
/**
|
||||
* Renders the dynamic parts of an inscriber (the presses, the animation and the
|
||||
* item being smashed)
|
||||
*/
|
||||
public final class InscriberTESR extends TileEntityRenderer<TileInscriber> {
|
||||
public final class InscriberTESR extends TileEntityRenderer<InscriberTileEntity> {
|
||||
|
||||
private static final float ITEM_RENDER_SCALE = 1.0f / 1.2f;
|
||||
|
||||
@@ -43,8 +43,8 @@ public final class InscriberTESR extends TileEntityRenderer<TileInscriber> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileInscriber tile, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers,
|
||||
int combinedLight, int combinedOverlay) {
|
||||
public void render(InscriberTileEntity tile, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers,
|
||||
int combinedLight, int combinedOverlay) {
|
||||
|
||||
// render inscriber
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.client.render.FacingToRotation;
|
||||
import appeng.client.render.renderable.Renderable;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ModularTESR<T extends AEBaseTile> extends TileEntityRenderer<T> {
|
||||
public class ModularTESR<T extends AEBaseTileEntity> extends TileEntityRenderer<T> {
|
||||
|
||||
private final List<Renderable<? super T>> renderables;
|
||||
|
||||
|
||||
@@ -35,14 +35,14 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
|
||||
import appeng.block.storage.BlockSkyChest;
|
||||
import appeng.block.storage.BlockSkyChest.SkyChestType;
|
||||
import appeng.block.storage.SkyChestBlock;
|
||||
import appeng.block.storage.SkyChestBlock.SkyChestType;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.tile.storage.TileSkyChest;
|
||||
import appeng.tile.storage.SkyChestTileEntity;
|
||||
|
||||
// This is mostly a copy&paste job of the vanilla chest TESR
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class SkyChestTESR extends TileEntityRenderer<TileSkyChest> {
|
||||
public class SkyChestTESR extends TileEntityRenderer<SkyChestTileEntity> {
|
||||
|
||||
public static final Material TEXTURE_STONE = new Material(Atlases.CHEST_ATLAS,
|
||||
new ResourceLocation(AppEng.MOD_ID, "models/skychest"));
|
||||
@@ -68,8 +68,8 @@ public class SkyChestTESR extends TileEntityRenderer<TileSkyChest> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileSkyChest tileEntityIn, float partialTicks, MatrixStack matrixStackIn,
|
||||
IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
|
||||
public void render(SkyChestTileEntity tileEntityIn, float partialTicks, MatrixStack matrixStackIn,
|
||||
IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
|
||||
matrixStackIn.push();
|
||||
float f = tileEntityIn.getForward().getHorizontalAngle();
|
||||
matrixStackIn.translate(0.5D, 0.5D, 0.5D);
|
||||
@@ -97,13 +97,13 @@ public class SkyChestTESR extends TileEntityRenderer<TileSkyChest> {
|
||||
chestBottom.render(matrixStackIn, bufferIn, combinedLightIn, combinedOverlayIn);
|
||||
}
|
||||
|
||||
protected Material getMaterial(TileSkyChest tileEntity) {
|
||||
protected Material getMaterial(SkyChestTileEntity tileEntity) {
|
||||
SkyChestType type = SkyChestType.BLOCK;
|
||||
if (tileEntity.getWorld() != null) {
|
||||
Block blockType = tileEntity.getBlockState().getBlock();
|
||||
|
||||
if (blockType instanceof BlockSkyChest) {
|
||||
type = ((BlockSkyChest) blockType).type;
|
||||
if (blockType instanceof SkyChestBlock) {
|
||||
type = ((SkyChestBlock) blockType).type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ import net.minecraftforge.client.model.data.ModelDataMap;
|
||||
|
||||
import appeng.client.render.FacingToRotation;
|
||||
import appeng.client.render.model.SkyCompassBakedModel;
|
||||
import appeng.tile.misc.TileSkyCompass;
|
||||
import appeng.tile.misc.SkyCompassTileEntity;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class SkyCompassTESR extends TileEntityRenderer<TileSkyCompass> {
|
||||
public class SkyCompassTESR extends TileEntityRenderer<SkyCompassTileEntity> {
|
||||
|
||||
private static BlockRendererDispatcher blockRenderer;
|
||||
|
||||
@@ -48,8 +48,8 @@ public class SkyCompassTESR extends TileEntityRenderer<TileSkyCompass> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileSkyCompass te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers,
|
||||
int combinedLightIn, int combinedOverlayIn) {
|
||||
public void render(SkyCompassTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers,
|
||||
int combinedLightIn, int combinedOverlayIn) {
|
||||
|
||||
if (blockRenderer == null) {
|
||||
blockRenderer = Minecraft.getInstance().getBlockRendererDispatcher();
|
||||
@@ -86,7 +86,7 @@ public class SkyCompassTESR extends TileEntityRenderer<TileSkyCompass> {
|
||||
|
||||
}
|
||||
|
||||
private static float getRotation(TileSkyCompass skyCompass) {
|
||||
private static float getRotation(SkyCompassTileEntity skyCompass) {
|
||||
float rotation;
|
||||
|
||||
if (skyCompass.getForward() == Direction.UP || skyCompass.getForward() == Direction.DOWN) {
|
||||
|
||||
Reference in New Issue
Block a user