mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-25 14:36:29 +01:00
Clean up last bits of upside down rendering
This commit is contained in:
parent
662da6bab1
commit
435b4c1c16
5 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue