Clean up last bits of upside down rendering

This commit is contained in:
techno-sam 2023-05-08 20:20:23 -07:00
parent 662da6bab1
commit 435b4c1c16
5 changed files with 5 additions and 5 deletions

View file

@ -89,7 +89,7 @@ public class AllBogeyStyles {
}
public BogeyStyleBuilder size(BogeySizes.BogeySize size, Supplier<? extends BogeyRenderer> renderer,
BlockEntry<? extends AbstractBogeyBlock> blockEntry) {
BlockEntry<? extends AbstractBogeyBlock<?>> blockEntry) {
this.size(size, renderer, blockEntry.getId());
return this;
}

View file

@ -145,7 +145,7 @@ public abstract class AbstractBogeyBlock<T extends AbstractBogeyTileEntity> exte
}
@OnlyIn(Dist.CLIENT)
public void render(@Nullable BlockState state, boolean upsideDown, float wheelAngle, PoseStack ms, float partialTicks,
public void render(@Nullable BlockState state, float wheelAngle, PoseStack ms, float partialTicks,
MultiBufferSource buffers, int light, int overlay, BogeyStyle style, CompoundTag bogeyData) {
if (style == null)
style = getDefaultStyle();

View file

@ -20,7 +20,7 @@ public class BogeyTileEntityRenderer<T extends BlockEntity> extends SafeTileEnti
if (te instanceof AbstractBogeyTileEntity sbte) {
float angle = sbte.getVirtualAngle(partialTicks);
if (blockState.getBlock() instanceof AbstractBogeyBlock<?> bogey)
bogey.render(blockState, bogey.isUpsideDown(blockState), angle, ms, partialTicks, buffer, light, overlay, sbte.getStyle(), sbte.getBogeyData());
bogey.render(blockState, angle, ms, partialTicks, buffer, light, overlay, sbte.getStyle(), sbte.getBogeyData());
}
}

View file

@ -67,7 +67,7 @@ public class CarriageContraptionEntityRenderer extends ContraptionEntityRenderer
int light = getBogeyLightCoords(entity, bogey, partialTicks);
bogey.type.render(null, bogey.isUpsideDown(), bogey.wheelAngle.getValue(partialTicks), ms, partialTicks, buffers, light,
bogey.type.render(null, bogey.wheelAngle.getValue(partialTicks), ms, partialTicks, buffers, light,
overlay, bogey.getStyle(), bogey.bogeyData);
ms.popPose();

View file

@ -104,7 +104,7 @@ public abstract class AbstractBogeyTileEntity extends CachedRenderBBTileEntity {
public void animate(float distanceMoved) {
BlockState blockState = getBlockState();
if (!(blockState.getBlock() instanceof AbstractBogeyBlock type))
if (!(blockState.getBlock() instanceof AbstractBogeyBlock<?> type))
return;
double angleDiff = 360 * distanceMoved / (Math.PI * 2 * type.getWheelRadius());
double newWheelAngle = (virtualAnimation.getValue() - angleDiff) % 360;