Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.splurpy.paranoiamod.entity.client.box;
- import com.mojang.blaze3d.vertex.PoseStack;
- import com.mojang.blaze3d.vertex.VertexConsumer;
- import com.mojang.math.Matrix4f;
- import com.mojang.math.Quaternion;
- import com.mojang.math.Vector3f;
- import net.minecraft.client.renderer.MultiBufferSource;
- import net.minecraft.client.renderer.RenderType;
- import net.minecraft.client.renderer.entity.EntityRendererProvider;
- import net.minecraft.resources.ResourceLocation;
- import net.splurpy.paranoiamod.ParanoiaMod;
- import net.splurpy.paranoiamod.entity.custom.BoxEntity;
- import org.jetbrains.annotations.Nullable;
- import software.bernie.geckolib3.renderers.geo.GeoEntityRenderer;
- import java.util.Vector;
- public class BoxRenderer extends GeoEntityRenderer<BoxEntity> {
- public BoxRenderer(EntityRendererProvider.Context renderManager) {
- super(renderManager, new BoxModel());
- this.shadowRadius = 0.6f;
- }
- @Override
- public ResourceLocation getTextureLocation(BoxEntity animatable) {
- return new ResourceLocation(ParanoiaMod.MOD_ID, "textures/entity/box.png");
- }
- @Override
- public RenderType getRenderType(BoxEntity animatable, float partialTick, PoseStack poseStack,
- @Nullable MultiBufferSource bufferSource,
- @Nullable VertexConsumer buffer, int packedLight, ResourceLocation texture) {
- return super.getRenderType(animatable, partialTick, poseStack, bufferSource, buffer, packedLight, texture);
- }
- @Override
- public void render(BoxEntity animatable, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
- /*
- YP = YAW
- XP = PITCH
- */
- // Quaternion quat;
- if (animatable.level.isClientSide) {
- System.out.println("[DEBUG] Climbing: " + animatable.getEntityData().get(BoxEntity.SYNC_DATA));
- }
- // poseStack.mulPose(quat);
- // System.out.println("[DEBUG] Render call");
- super.render(animatable, entityYaw, partialTick, poseStack, bufferSource, packedLight);
- }
- }
Add Comment
Please, Sign In to add comment