Guest User

Untitled

a guest
Apr 21st, 2023
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.15 KB | Gaming | 0 0
  1. package net.splurpy.paranoiamod.entity.client.box;
  2.  
  3. import com.mojang.blaze3d.vertex.PoseStack;
  4. import com.mojang.blaze3d.vertex.VertexConsumer;
  5. import com.mojang.math.Matrix4f;
  6. import com.mojang.math.Quaternion;
  7. import com.mojang.math.Vector3f;
  8. import net.minecraft.client.renderer.MultiBufferSource;
  9. import net.minecraft.client.renderer.RenderType;
  10. import net.minecraft.client.renderer.entity.EntityRendererProvider;
  11. import net.minecraft.resources.ResourceLocation;
  12. import net.splurpy.paranoiamod.ParanoiaMod;
  13. import net.splurpy.paranoiamod.entity.custom.BoxEntity;
  14. import org.jetbrains.annotations.Nullable;
  15. import software.bernie.geckolib3.renderers.geo.GeoEntityRenderer;
  16.  
  17. import java.util.Vector;
  18.  
  19. public class BoxRenderer extends GeoEntityRenderer<BoxEntity> {
  20.  
  21.     public BoxRenderer(EntityRendererProvider.Context renderManager) {
  22.         super(renderManager, new BoxModel());
  23.         this.shadowRadius = 0.6f;
  24.     }
  25.  
  26.     @Override
  27.     public ResourceLocation getTextureLocation(BoxEntity animatable) {
  28.         return new ResourceLocation(ParanoiaMod.MOD_ID, "textures/entity/box.png");
  29.     }
  30.  
  31.     @Override
  32.     public RenderType getRenderType(BoxEntity animatable, float partialTick, PoseStack poseStack,
  33.                                     @Nullable MultiBufferSource bufferSource,
  34.                                     @Nullable VertexConsumer buffer, int packedLight, ResourceLocation texture) {
  35.  
  36.         return super.getRenderType(animatable, partialTick, poseStack, bufferSource, buffer, packedLight, texture);
  37.     }
  38.  
  39.     @Override
  40.     public void render(BoxEntity animatable, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) {
  41.  
  42.         /*
  43.         YP = YAW
  44.         XP = PITCH
  45.          */
  46.         // Quaternion quat;
  47.  
  48.         if (animatable.level.isClientSide) {
  49.             System.out.println("[DEBUG] Climbing: " + animatable.getEntityData().get(BoxEntity.SYNC_DATA));
  50.         }
  51.         // poseStack.mulPose(quat);
  52.         // System.out.println("[DEBUG] Render call");
  53.         super.render(animatable, entityYaw, partialTick, poseStack, bufferSource, packedLight);
  54.     }
  55. }
  56.  
Add Comment
Please, Sign In to add comment