Jump to content

poopoodice

Members
  • Posts

    1160
  • Joined

  • Days Won

    7

Everything posted by poopoodice

  1. You need a renderer for your entity
  2. TileEntityRendererby Mjcty or Modifying IBakedModel by TGG I feel like the second one is more suitable for you since you are only moving the cubes and changing their colour.
  3. I assume what you mean by model is Item model. Use ItemRenderer.getItemModelWithOverrides() To get the baked model, or just use ItemRenderer.renderItemIntoGUI() to render the itemstack into the gui (which eventually use the method above, depend what are you trying to do)
  4. I believe package is just another name of a folder in Eclipse. Just use Directory in Intellij.
  5. You can do it with tileentity renderer.
  6. There's only one instance per Item. To store informations on ItemStacks you can use either Nbt tags or Capabilities.
  7. @CapabilityInject https://mcforge.readthedocs.io/en/latest/datastorage/capabilities/#using-an-existing-capability
  8. Override onItemRightClick in your item class, and set player.abilities.allowFlying to true (may not be the correct/best way, just an example) For the left click one, there are a couple ways of doing it, but I'll introduce the one I'm using (You can find lots of posts by searching "left click"). Listen to MouseInputEvent Use event.getAction() and event.getButton() to check the action is under the correct condition, and use packets to spawn entities on the server. world.addEntity(a new instance of BatEntity) You can find lots of information using the searching bar on the top of this site.
  9. ForgeRegistries.ENTITIES
  10. Try add your mod id to the name, something like MODID + ":blue_stone"
  11. Do you mind posting the updated code?
  12. https://minecraft.gamepedia.com/Loot_table But I have no idea about how to make it only drop one of them
  13. check EffectInstance() the constructor you are using is passing 0 as its duration. Also potion effects should not be applied on client
  14. It does not allow you to override the method because it is different from its parent method. it should be onArmorTick(ItemStack stack, World world, PlayerEntity player) not onArmorTick(World world, PlayerEntity player, ItemStack itemStack) not sure if it's changed in 1.15.2+ tho, but you can always find it in Item class. Btw you have an extra curly braces here @Override public void onArmorTick(World world, PlayerEntity player, ItemStack itemStack){ if(player.getItemStackFromSlot(EquipmentSlotType.HEAD).getItem() == RegistryHandler.AQUAMARINE_HELMET.get() && player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == RegistryHandler.AQUAMARINE_CHESTPLATE.get() && player.getItemStackFromSlot(EquipmentSlotType.LEGS).getItem() == RegistryHandler.AQUAMARINE_LEGGINGS.get() && player.getItemStackFromSlot(EquipmentSlotType.FEET).getItem() == RegistryHandler.AQUAMARINE_BOOTS.get() ) { <--------------------- //player.addPotionEffect(new EffectInstance(Effects.SPEED)); }
  15. You have two "rolls" which one is for the normal drops, and another roll for the silk touch, and they are not related. Means doesn't matter if the roll on the top succeed or not, it will always go for another roll for the normal drops at the bottom.
  16. I remember seeing similar question in previous posts, and iirc it's mac's problem that it reads some files that isn't supposed to be read
  17. you can use player.getHorizontalFacing() to get the player's facing, and player.getPosition() to get the blockpos of the player, and BlockPos.offset(dir) to get the translated position
  18. It works totally fine in my dev environment. There must be something messed up with yours, you may want to recreate all folders...etc.
  19. I don't think you can (beside gists), but you can always remove the link here or make the repo private afterwards. I can't guarantee that I can fix your problem tho.
  20. Good to know. Your structure and json files looks fine, is it possible for you to upload a repo?
  21. I'm not sure if this is the setting of your IDE but ASSETS should not be capitalized.
  22. https://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html
  23. return true in hasEffect()
  24. Oh yeah, they are actually a part of layers. Or is it possible instead of getting the position of the player when render, sync the position of custom entity with the owner on server then just render it normally?
×
×
  • Create New...

Important Information

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