Skip to content

Commit

Permalink
fix: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed Dec 31, 2024
1 parent 3a69122 commit a5e08ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import net.neoforged.api.distmarker.OnlyIn;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
import net.neoforged.neoforge.common.Tags;
import net.neoforged.neoforge.common.data.DataMapProvider;
import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent;
import net.neoforged.neoforge.registries.DeferredBlock;
import net.neoforged.neoforge.registries.DeferredHolder;
Expand All @@ -73,11 +72,10 @@
import net.zepalesque.redux.item.ReduxItems;
import net.zepalesque.redux.tile.ReduxTiles;
import net.zepalesque.zenith.api.blockset.AbstractWoodSet;
import net.zepalesque.zenith.api.blockset.BlockSet;
import net.zepalesque.zenith.block.ZenithCeilingHangingSignBlock;
import net.zepalesque.zenith.block.ZenithSignBlock;
import net.zepalesque.zenith.block.ZenithWallHangingSignBlock;
import net.zepalesque.zenith.block.ZenithWallSignBlock;
import net.zepalesque.zenith.block.tile.ZenithCeilingHangingSignBlock;
import net.zepalesque.zenith.block.tile.ZenithSignBlock;
import net.zepalesque.zenith.block.tile.ZenithWallHangingSignBlock;
import net.zepalesque.zenith.block.tile.ZenithWallSignBlock;
import net.zepalesque.zenith.client.render.entity.ZenithBoatRenderer;
import net.zepalesque.zenith.entity.misc.ZenithBoat;
import net.zepalesque.zenith.entity.misc.ZenithChestBoat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static void renderPost(RenderLevelStageEvent event) {

float f2 = deltaTracker.getGameTimeDeltaPartialTick(!tickratemanager.isEntityFrozen(entity));
renderEntity(entity, x, y, z, f2, posestack, multibuffersource, dispatch);
// TODO: Get rid of this horrid workaround
// TODO: Get rid of this horrid workaround (it's really not that bad but it'd be nice to know WHY the last rendered whirlwind doesn't actually render)
if (Minecraft.useShaderTransparency() && !iterator.hasNext()) {
renderEntity(entity, x, y, z, f2, posestack, multibuffersource, dispatch);
}
Expand Down Expand Up @@ -114,11 +114,10 @@ private static <E extends Entity> void render(
double d0 = z + vec3.z();
poseStack.pushPose();
poseStack.translate(d2, d3, d0);
boolean b = post.actuallyRender(entity, rotationYaw, partialTicks, poseStack, buffer, dispatcher.getPackedLightCoords(entity, partialTicks));
poseStack.popPose();
if (!b) {
if (!post.actuallyRender(entity, rotationYaw, partialTicks, poseStack, buffer, dispatcher.getPackedLightCoords(entity, partialTicks))) {
Redux.LOGGER.debug("Did not render entity: {}", entity);
}
poseStack.popPose();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface IPostRenderer<T extends Entity> {

void internalRender(@NotNull T entity, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource buffer, int packedLight);

// TODO: Investigate, will this cause issues?
// TODO: Funny java generics magic to make this unnecessary if possible
@SuppressWarnings("unchecked")
default boolean actuallyRender(Entity entity, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource buffer, int packedLight) {
try {
Expand Down

0 comments on commit a5e08ec

Please sign in to comment.