
Turnrp
Members-
Posts
57 -
Joined
-
Last visited
Everything posted by Turnrp
-
I jsut wanna know why its broken
-
I did do that
-
Im gonna head to bed just right things you can help me with in here gn ill talk tommorow
-
and yes i added the classes
-
gave me a bunch of errors
-
there is PlayerInteractEvent.RightClickItem
-
I did @Overide OnItemRightClick and nothing shows up
-
So i do the event inside the item class?
-
1.16.4
-
Btw its pretty recent to
-
Watch this its how I started out coding
-
@SubscribeEvent public void OnRightClick(PlayerInteractEvent.RightClickItem RightClick) { LivingEntity player = RightClick.getEntityLiving(); if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) { player.setHealth(0); } }
-
New Code: if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) { player.setHealth(0); } P.S Still doesn't work
-
Btw i just added braces to it and it still did nothing
-
Im trying to detect when a player clicks with my item if (player.getHeldItemMainhand().getItem() == RegistryHandler.BACKPACK.get()) player.setHealth(0); }
-
Here im just gonna go look for some videos i guess thanks for your help!
-
3 HOURS?!
-
public class RenderHat { @SubscribeEvent public void OnPlayerRendered(RenderPlayerEvent PlayerRendered) extends LayerRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>> { } } ANd then it says "Unexpected Token"
-
when i do it to the event it says you cant
-
I cant add the LayerRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>> to the event
-
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
-
k ill start testing
-
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
-
Ok
-
public SnowManRenderer(EntityRendererManager renderManagerIn) { super(renderManagerIn, new SnowManModel<>(), 0.5F); this.addLayer(new SnowmanHeadLayer(this)); } Found this