Jump to content

Turnrp

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by Turnrp

  1. I jsut wanna know why its broken
  2. Im gonna head to bed just right things you can help me with in here gn ill talk tommorow
  3. and yes i added the classes
  4. gave me a bunch of errors
  5. there is PlayerInteractEvent.RightClickItem
  6. I did @Overide OnItemRightClick and nothing shows up
  7. So i do the event inside the item class?
  8. Btw its pretty recent to
  9. Watch this its how I started out coding
  10. @SubscribeEvent public void OnRightClick(PlayerInteractEvent.RightClickItem RightClick) { LivingEntity player = RightClick.getEntityLiving(); if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) { player.setHealth(0); } }
  11. New Code: if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) { player.setHealth(0); } P.S Still doesn't work
  12. Btw i just added braces to it and it still did nothing
  13. Im trying to detect when a player clicks with my item if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) player.setHealth(0); }
  14. Here im just gonna go look for some videos i guess thanks for your help!
  15. public class RenderHat { @SubscribeEvent public void OnPlayerRendered(RenderPlayerEvent PlayerRendered) extends LayerRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>> { } } ANd then it says "Unexpected Token"
  16. when i do it to the event it says you cant
  17. I cant add the LayerRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>> to the event
  18. Idk if it will work. Im having a lot of troubles do you know anything to add a layer to the head and put a hat on it
  19. k ill start testing
  20. Found it public void render(MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn, SnowGolemEntity entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) { if (!entitylivingbaseIn.isInvisible() && entitylivingbaseIn.isPumpkinEquipped()) { matrixStackIn.push(); this.getEntityModel().func_205070_a().translateRotate(matrixStackIn); float f = 0.625F; matrixStackIn.translate(0.0D, -0.34375D, 0.0D); matrixStackIn.rotate(Vector3f.YP.rotationDegrees(180.0F)); matrixStackIn.scale(0.625F, -0.625F, -0.625F); ItemStack itemstack = new ItemStack(Blocks.CARVED_PUMPKIN); Minecraft.getInstance().getItemRenderer().renderItem(entitylivingbaseIn, itemstack, ItemCameraTransforms.TransformType.HEAD, false, matrixStackIn, bufferIn, entitylivingbaseIn.world, packedLightIn, LivingRenderer.getPackedOverlay(entitylivingbaseIn, 0.0F)); matrixStackIn.pop(); } } } and im guessing i change Blacks.CarvedPumpkin
  21. public SnowManRenderer(EntityRendererManager renderManagerIn) { super(renderManagerIn, new SnowManModel<>(), 0.5F); this.addLayer(new SnowmanHeadLayer(this)); } Found this
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.