The Great Renamening of 2020

This commit is contained in:
Sebastian Hartte
2020-06-22 12:14:54 +02:00
parent abe3334488
commit b4471b1abb
441 changed files with 3395 additions and 3468 deletions
@@ -30,7 +30,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import appeng.client.render.cablebus.FacadeBuilder;
import appeng.items.parts.ItemFacade;
import appeng.items.parts.FacadeItem;
/**
* This baked model class is used as a dispatcher to redirect the renderer to
@@ -52,11 +52,11 @@ public class FacadeDispatcherBakedModel extends DelegateBakedModel {
@Override
public IBakedModel getModelWithOverrides(IBakedModel originalModel, ItemStack stack, World world,
LivingEntity entity) {
if (!(stack.getItem() instanceof ItemFacade)) {
if (!(stack.getItem() instanceof FacadeItem)) {
return originalModel;
}
ItemFacade itemFacade = (ItemFacade) stack.getItem();
FacadeItem itemFacade = (FacadeItem) stack.getItem();
ItemStack textureItem = itemFacade.getTextureItem(stack);
@@ -51,7 +51,7 @@ import net.minecraftforge.client.model.data.IModelData;
import appeng.api.AEApi;
import appeng.api.util.AEAxisAlignedBB;
import appeng.parts.misc.PartCableAnchor;
import appeng.parts.misc.CableAnchorPart;
import appeng.thirdparty.codechicken.lib.model.CachedFormat;
import appeng.thirdparty.codechicken.lib.model.Quad;
import appeng.thirdparty.codechicken.lib.model.pipeline.BakedPipeline;
@@ -123,7 +123,7 @@ public class FacadeBuilder {
FacadeRenderState facadeRenderState = entry.getValue();
boolean renderStilt = !sidesWithParts.contains(side);
if (layer == RenderType.getCutout() && renderStilt) {
for (ResourceLocation part : PartCableAnchor.FACADE_MODELS.getModels()) {
for (ResourceLocation part : CableAnchorPart.FACADE_MODELS.getModels()) {
IBakedModel partModel = modelLookup.apply(part);
QuadRotator rotator = new QuadRotator();
quads.addAll(rotator.rotateQuads(gatherQuads(partModel, null, rand, EmptyModelData.INSTANCE), side,
@@ -29,21 +29,21 @@ import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.render.TesrRenderHelper;
import appeng.tile.crafting.TileCraftingMonitorTile;
import appeng.tile.crafting.CraftingMonitorTileEntity;
/**
* Renders the item currently being crafted
*/
@OnlyIn(Dist.CLIENT)
public class CraftingMonitorTESR extends TileEntityRenderer<TileCraftingMonitorTile> {
public class CraftingMonitorTESR extends TileEntityRenderer<CraftingMonitorTileEntity> {
public CraftingMonitorTESR(TileEntityRendererDispatcher rendererDispatcherIn) {
super(rendererDispatcherIn);
}
@Override
public void render(TileCraftingMonitorTile te, float partialTicks, MatrixStack matrixStack,
IRenderTypeBuffer buffers, int combinedLight, int combinedOverlay) {
public void render(CraftingMonitorTileEntity te, float partialTicks, MatrixStack matrixStack,
IRenderTypeBuffer buffers, int combinedLight, int combinedOverlay) {
Direction facing = te.getForward();
@@ -17,7 +17,7 @@ import net.minecraft.world.World;
import net.minecraftforge.client.model.PerspectiveMapWrapper;
import appeng.client.render.DelegateBakedModel;
import appeng.items.misc.ItemEncodedPattern;
import appeng.items.misc.EncodedPatternItem;
/**
* This model is used to substitute the crafting result's item model for our
@@ -116,7 +116,7 @@ public class EncodedPatternBakedModel extends DelegateBakedModel {
@Nullable LivingEntity entity) {
boolean shiftHeld = Screen.hasShiftDown();
if (shiftHeld) {
ItemEncodedPattern iep = (ItemEncodedPattern) stack.getItem();
EncodedPatternItem iep = (EncodedPatternItem) stack.getItem();
ItemStack output = iep.getOutput(stack);
if (!output.isEmpty()) {
IBakedModel realModel = Minecraft.getInstance().getItemRenderer().getItemModelMesher()
@@ -24,7 +24,7 @@ import net.minecraft.util.Direction;
import net.minecraftforge.client.model.data.IModelData;
import appeng.api.util.AEColor;
import appeng.block.crafting.BlockCraftingMonitor;
import appeng.block.crafting.CraftingMonitorBlock;
import appeng.client.render.cablebus.CubeBuilder;
import appeng.client.render.model.AEModelData;
import appeng.tile.crafting.CraftingMonitorModelData;
@@ -76,7 +76,7 @@ public class MonitorBakedModel extends CraftingCubeBakedModel {
// Now add the three layered light textures
AEColor color = getColor(modelData);
boolean powered = state.get(BlockCraftingMonitor.POWERED);
boolean powered = state.get(CraftingMonitorBlock.POWERED);
builder.setRenderFullBright(powered);
@@ -52,7 +52,7 @@ import net.minecraftforge.client.model.data.ModelDataMap;
import net.minecraftforge.client.model.data.ModelProperty;
import net.minecraftforge.client.model.pipeline.BakedQuadBuilder;
import appeng.decorative.solid.BlockQuartzGlass;
import appeng.decorative.solid.QuartzGlassBlock;
import appeng.decorative.solid.GlassState;
class GlassBakedModel implements IDynamicBakedModel {
@@ -322,7 +322,7 @@ class GlassBakedModel implements IDynamicBakedModel {
}
private static boolean isGlassBlock(IBlockReader world, BlockPos pos, Direction facing) {
return world.getBlockState(pos.offset(facing)).getBlock() instanceof BlockQuartzGlass;
return world.getBlockState(pos.offset(facing)).getBlock() instanceof QuartzGlassBlock;
}
}
@@ -36,7 +36,7 @@ import net.minecraftforge.client.model.data.IDynamicBakedModel;
import net.minecraftforge.client.model.data.IModelData;
import appeng.client.render.cablebus.CubeBuilder;
import appeng.tile.spatial.TileSpatialPylon;
import appeng.tile.spatial.SpatialPylonTileEntity;
/**
* The baked model that will be used for rendering the spatial pylon.
@@ -59,16 +59,16 @@ class SpatialPylonBakedModel implements IDynamicBakedModel {
if (flags != 0) {
Direction ori = null;
int displayAxis = flags & TileSpatialPylon.DISPLAY_Z;
if (displayAxis == TileSpatialPylon.DISPLAY_X) {
int displayAxis = flags & SpatialPylonTileEntity.DISPLAY_Z;
if (displayAxis == SpatialPylonTileEntity.DISPLAY_X) {
ori = Direction.EAST;
if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MAX) {
if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MAX) {
builder.setUvRotation(Direction.SOUTH, 1);
builder.setUvRotation(Direction.NORTH, 1);
builder.setUvRotation(Direction.UP, 2);
builder.setUvRotation(Direction.DOWN, 2);
} else if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MIN) {
} else if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MIN) {
builder.setUvRotation(Direction.SOUTH, 2);
builder.setUvRotation(Direction.NORTH, 2);
builder.setUvRotation(Direction.UP, 1);
@@ -81,9 +81,9 @@ class SpatialPylonBakedModel implements IDynamicBakedModel {
}
}
else if (displayAxis == TileSpatialPylon.DISPLAY_Y) {
else if (displayAxis == SpatialPylonTileEntity.DISPLAY_Y) {
ori = Direction.UP;
if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MAX) {
if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MAX) {
builder.setUvRotation(Direction.NORTH, 3);
builder.setUvRotation(Direction.SOUTH, 3);
builder.setUvRotation(Direction.EAST, 3);
@@ -91,12 +91,12 @@ class SpatialPylonBakedModel implements IDynamicBakedModel {
}
}
else if (displayAxis == TileSpatialPylon.DISPLAY_Z) {
else if (displayAxis == SpatialPylonTileEntity.DISPLAY_Z) {
ori = Direction.NORTH;
if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MAX) {
if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MAX) {
builder.setUvRotation(Direction.EAST, 2);
builder.setUvRotation(Direction.WEST, 1);
} else if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MIN) {
} else if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MIN) {
builder.setUvRotation(Direction.EAST, 1);
builder.setUvRotation(Direction.WEST, 2);
builder.setUvRotation(Direction.UP, 3);
@@ -115,7 +115,7 @@ class SpatialPylonBakedModel implements IDynamicBakedModel {
this.textures.get(getTextureTypeFromSideOutside(flags, ori, Direction.WEST)));
builder.addCube(0, 0, 0, 16, 16, 16);
if ((flags & TileSpatialPylon.DISPLAY_POWERED_ENABLED) == TileSpatialPylon.DISPLAY_POWERED_ENABLED) {
if ((flags & SpatialPylonTileEntity.DISPLAY_POWERED_ENABLED) == SpatialPylonTileEntity.DISPLAY_POWERED_ENABLED) {
builder.setRenderFullBright(true);
}
@@ -138,7 +138,7 @@ class SpatialPylonBakedModel implements IDynamicBakedModel {
}
private int getFlags(IModelData modelData) {
Integer flags = modelData.getData(TileSpatialPylon.STATE);
Integer flags = modelData.getData(SpatialPylonTileEntity.STATE);
return flags != null ? flags : 0;
}
@@ -147,11 +147,11 @@ class SpatialPylonBakedModel implements IDynamicBakedModel {
return SpatialPylonTextureType.BASE;
}
if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_MIDDLE) {
if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_MIDDLE) {
return SpatialPylonTextureType.BASE_SPANNED;
} else if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MIN) {
} else if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MIN) {
return SpatialPylonTextureType.BASE_END;
} else if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MAX) {
} else if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MAX) {
return SpatialPylonTextureType.BASE_END;
}
@@ -159,17 +159,17 @@ class SpatialPylonBakedModel implements IDynamicBakedModel {
}
private static SpatialPylonTextureType getTextureTypeFromSideInside(int flags, Direction ori, Direction dir) {
final boolean good = (flags & TileSpatialPylon.DISPLAY_ENABLED) == TileSpatialPylon.DISPLAY_ENABLED;
final boolean good = (flags & SpatialPylonTileEntity.DISPLAY_ENABLED) == SpatialPylonTileEntity.DISPLAY_ENABLED;
if (ori == dir || ori.getOpposite() == dir) {
return good ? SpatialPylonTextureType.DIM : SpatialPylonTextureType.RED;
}
if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_MIDDLE) {
if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_MIDDLE) {
return good ? SpatialPylonTextureType.DIM_SPANNED : SpatialPylonTextureType.RED_SPANNED;
} else if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MIN) {
} else if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MIN) {
return good ? SpatialPylonTextureType.DIM_END : SpatialPylonTextureType.RED_END;
} else if ((flags & TileSpatialPylon.DISPLAY_MIDDLE) == TileSpatialPylon.DISPLAY_END_MAX) {
} else if ((flags & SpatialPylonTileEntity.DISPLAY_MIDDLE) == SpatialPylonTileEntity.DISPLAY_END_MAX) {
return good ? SpatialPylonTextureType.DIM_END : SpatialPylonTextureType.RED_END;
}
@@ -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) {