Jump to content

someRandomKid

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by someRandomKid

  1. public class MegaTNTRenderer extends EntityRenderer<MegaTNTEntity> { @Override public void render(MegaTNTEntity entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) { matrixStackIn.push(); matrixStackIn.translate(0.0D, 0.5D, 0.0D); if ((float)entityIn.getFuse() - partialTicks + 1.0F < 10.0F) { float f = 1.0F - ((float)entityIn.getFuse() - partialTicks + 1.0F) / 10.0F; f = MathHelper.clamp(f, 0.0F, 1.0F); f = f * f; f = f * f; float f1 = 1.0F + f * 0.3F; matrixStackIn.scale(f1, f1, f1); } matrixStackIn.rotate(Vector3f.YP.rotationDegrees(-90.0F)); matrixStackIn.translate(-0.5D, -0.5D, 0.5D); matrixStackIn.rotate(Vector3f.YP.rotationDegrees(90.0F)); TNTMinecartRenderer.renderTntFlash(RegistryHandler.MEGA_TNT.get().getDefaultState(), matrixStackIn, bufferIn, packedLightIn, entityIn.getFuse() / 5 % 2 == 0); matrixStackIn.pop(); super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } public MegaTNTRenderer(EntityRendererManager renderManager) { super(renderManager); this.shadowSize = 0.5F; } @Override public ResourceLocation getEntityTexture(MegaTNTEntity entity) { return PlayerContainer.LOCATION_BLOCKS_TEXTURE; } } Tell me if you need more code.
  2. yes, I already have. Basically I get no errors in the output log, but the entity is invisible.
  3. I have already tried that, I just get an invisible entity. Do I have to stitch my texture into the atlas?
  4. the file is saved in some other directory. it's saved in downloads if you are in chrome.
  5. RECENTS is not a directory.
  6. just a disclaimer I have never done this on macOS before. what the cd command does is that it changes the directory you are in. (basically you click on a folder in file explorer) then you type cd PATH_TO_DIRECTORY the PATH_TO_DIRECTORY is the path to the directory where your jar file is. then the command you were typing earlier.
  7. what is the name of your forge installer file? you also have to be in the same directory as the file by using the cd command. example (on linux): cd ~\Downloads
  8. You forgot to put -jar before the file name this time. just copy this command: java -jar forge-1.15.2-31.2.0-installer.jar
  9. I have already made a custom TNT entity and a custom TNT block using the vanilla classes. But, How do I render the custom TNT?
  10. works with those overrides, but since I am not in 1.16, my item sinks in lava, how do I fix this?
  11. I want the item to not burn if it is dropped in fire or lava. (sorry for responding late)
  12. How would I make an item that doesn't burn in 1.15.2?
  13. here is code to override for those who are wondering. @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) { Entity entity = playerIn.getRidingEntity(); if(entity instanceof Car){ Car car = (Car)entity; car.Refuel(); car.heal(1); playerIn.inventory.mainInventory.get(playerIn.inventory.currentItem).shrink(1); } return ActionResult.resultPass(playerIn.getHeldItem(handIn)); }
  14. Works now thanks!
  15. Wait, how would I put this logic in my item?
  16. So, I have to send an empty packet to server?
  17. [1.15.2] I am going to have a tough time describing this, so here is a video. https://youtu.be/XEwj8rv0jdo If you saw the video, you saw the after the car go damaged and then healed by my custom item, the car takes way more damage then it should when it hits the cactus. I am sure that it is because I am not updating the entity health on server side, so how am I supposed to update the entity's health (on server side)? and here is my code (which heals the car) @SubscribeEvent public void keyInputEvent(InputEvent.KeyInputEvent event) { Minecraft minecraft = Minecraft.getInstance(); PlayerEntity player = minecraft.player; if(player == null) return; LivingEntity car = (LivingEntity)player.getRidingEntity(); if (car != null) { if (car.getName().getString().equals("Car")) { if (event.getKey() == GLFW.GLFW_KEY_R && event.getAction() == GLFW.GLFW_PRESS) { if(player.getHeldItemMainhand().getItem() == RegistryHandler.GAS_CAN.get()){ ((Car)car).Refule(); car.heal(1); player.getHeldItemMainhand().shrink(1); } } if(event.getKey() == GLFW.GLFW_KEY_R && event.getAction() == GLFW.GLFW_PRESS){ if(player.getHeldItemMainhand().getItem() == RegistryHandler.REPAIR_KIT.get() && car.getHealth() != car.getMaxHealth()){ car.heal(6); player.inventory.mainInventory.get(player.inventory.currentItem).shrink(1); } } } } }
  18. wow worked instantly (for 1.15.2)
  19. Try creating an @SubsribeEvent for LivingAttackEvent. (I personally have not been able to get this working) You would also have to set .DefaultMaxDamage() in the builder properties.
×
×
  • Create New...

Important Information

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