Class Flattener
java.lang.Object
com.mrbysco.flatterentities.Flattener
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>> static booleanstatic final List<net.minecraft.world.entity.EntityType<?>> static final Map<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>, List<net.minecraft.world.entity.EntityType<?>>> static boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends net.minecraft.world.entity.LivingEntity>
floatgetYawRotation(T entityIn, float partialTicks, boolean shouldSit) Calculates the yaw rotation angle for an entity's rendering, considering its body and head rotations.static voidprepareFlatRendering(float rotation, double x, double z, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.entity.state.EntityRenderState renderState) Prepares the rendering of an entity in a flat style based on certain conditions.
-
Field Details
-
renderingEnabled
public static boolean renderingEnabled -
entityBlacklist
-
entityDimensionWhitelist
-
dimensionBlacklist
public static final List<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>> dimensionBlacklist -
dimensionListIsWhitelist
public static boolean dimensionListIsWhitelist
-
-
Constructor Details
-
Flattener
public Flattener()
-
-
Method Details
-
prepareFlatRendering
public static void prepareFlatRendering(float rotation, double x, double z, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.entity.state.EntityRenderState renderState) Prepares the rendering of an entity in a flat style based on certain conditions. This method adjusts the pose stack to achieve the desired flat rendering effect for the entity.- Parameters:
rotation- The yaw rotation angle of the entity, in degrees. This angle is often the result of linearly interpolating between the entity's previous and current yaw rotations using Mth.rotLerp(partialTicks, renderState.yRotO, renderState.getYRot()).x- The X-coordinate of the entity's position.z- The Z-coordinate of the entity's position.poseStack- The PoseStack used for rendering transformations.renderState- The entity to be rendered.
-
getYawRotation
public static <T extends net.minecraft.world.entity.LivingEntity> float getYawRotation(T entityIn, float partialTicks, boolean shouldSit) Calculates the yaw rotation angle for an entity's rendering, considering its body and head rotations.- Type Parameters:
T- A subtype of LivingEntity.- Parameters:
entityIn- The living entity for which to calculate the rotation angle.partialTicks- The partial tick value used for smooth rotation interpolation.shouldSit- A boolean indicating whether the entity is sitting.- Returns:
- The calculated yaw rotation angle for the entity's rendering.
-