Jump to content

Salatosik

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Salatosik's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello! I need to launch the minecraft client as it is easily done on Intelij idea. I wrote a command for gradlew to create a launch configuration but nothing happened, although VS Code itself built the mod on its own
  2. Thanks, I'll try
  3. Hello! I need to issue a random item, the first thing that came to my mind was to create an array with ItemStack, I didn’t like the idea because I think that there is a method for issuing a player that accepts an item ID
  4. Thanks you for your support!
  5. Sorry, posted the question in English. I often use a translator because I don't know well. Apparently it happened a bug and I copied and pasted the text out of fright. I will not deviate from the topic, if you can help please help I will be grateful
  6. SORRY! Upd: Hi there! I have an event that defines a method that always works when a player kills any mob. My question: how can I make it possible to compare the alleged appearance of mobs? The example is hostile, harmless. Just in case, I’ll write that I use 1.16.1 and switched recently, approximately after I received a warning from the moderator XD
  7. Гей! У мене є подія, в якій визначено метод, який завжди працює, коли гравець вбиває будь-якого моба. Моє запитання: як мені зробити можливим порівняти нібито зовнішність мобів? Приклад ворожий, нешкідливий. Just in case, I’ll write that I use 1.16.1 and switched recently, approximately after I received a warning from the moderator XD
  8. @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) { for(int i = 0; i < entityPlayer.inventory.mainInventory.length; i++) { if(entityPlayer.inventory.mainInventory[i].getItem().equals(this)) { entityPlayer.inventory.setInventorySlotContents(i, null); // removing the first available bag of resources entityPlayer.inventory.setInventorySlotContents(i, new ItemStack(RandomItems.giveItemForPlayer(RandomItems.LEGENDARY_ITEMS))); break; } } return super.onItemRightClick(itemStack, world, entityPlayer); } A huge disadvantage is that if the player actually keeps the bag at the end of the inventory (by index) and if on the way to the end of the inventory the loop encounters the same bag, it will replace the name of the first hit
  9. Hello! I created a method that fires when the player right clicks on an item. My problem is that I need to find out in which slot the player is holding this item.
×
×
  • Create New...

Important Information

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