mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-11-26 10:08:53 -05:00
Cleanup + don't defer render if in fabulous
This commit is contained in:
1 parent
cb9cd76a15
commit
6ea5a1f7ce
3 files changed
+10
-12
No files matched your search
+1
-1
@@ -537,7 +537,7 @@ abstract class PoseableEntityModel<T : Entity>(
|
||||
red * r,
|
||||
green * g,
|
||||
blue * b,
|
||||
alpha * (context.request(RenderContext.ENTITY)?.let { _ -> 0.15F } ?: a)
|
||||
alpha * (context.request(RenderContext.ENTITY)?.let { _ -> 0.4F } ?: a)
|
||||
)
|
||||
|
||||
val provider = bufferProvider
|
||||
|
||||
+8
-10
@@ -76,18 +76,16 @@ class PokemonRenderer(
|
||||
buffer: VertexConsumerProvider,
|
||||
packedLight: Int
|
||||
) {
|
||||
if(entity.hasPassengers()) {
|
||||
val yaw = entityYaw
|
||||
val ticks = partialTicks
|
||||
val buf = buffer
|
||||
val light = packedLight
|
||||
DelayedPokemonRenders.append {matrix ->
|
||||
if(entity.hasPassengers() && !MinecraftClient.isFabulousGraphicsOrBetter()) {
|
||||
DelayedPokemonRenders.append { matrix ->
|
||||
matrix.push()
|
||||
val prevX = entity.prevX + (entity.x - entity.prevX) * ticks
|
||||
val prevY = entity.prevY + (entity.y - entity.prevY) * ticks
|
||||
val prevZ = entity.prevZ + (entity.z - entity.prevZ) * ticks
|
||||
|
||||
val prevX = entity.prevX + (entity.x - entity.prevX) * partialTicks
|
||||
val prevY = entity.prevY + (entity.y - entity.prevY) * partialTicks
|
||||
val prevZ = entity.prevZ + (entity.z - entity.prevZ) * partialTicks
|
||||
|
||||
matrix.translate(prevX, prevY, prevZ)
|
||||
this.renderInternal(entity, yaw, ticks, matrix, buf, light)
|
||||
this.renderInternal(entity, entityYaw, partialTicks, matrix, buffer, packedLight)
|
||||
matrix.pop()
|
||||
}
|
||||
return
|
||||
|
||||
@@ -101,7 +101,7 @@ class CobblemonFabricClient: ClientModInitializer, CobblemonClientImplementation
|
||||
ItemTooltipCallback.EVENT.register { stack, context, lines -> PlatformEvents.CLIENT_ITEM_TOOLTIP.post(ItemTooltipEvent(stack, context, lines)) }
|
||||
WorldRenderEvents.AFTER_TRANSLUCENT.register { ctx ->
|
||||
ctx.matrixStack().push()
|
||||
val cameraPos = ctx.camera().getPos()
|
||||
val cameraPos = ctx.camera().pos
|
||||
ctx.matrixStack().translate(-cameraPos.x, -cameraPos.y, -cameraPos.z)
|
||||
DelayedPokemonRenders.render(ctx.matrixStack())
|
||||
ctx.matrixStack().pop()
|
||||
|
||||
Reference in new issue
Block a user