Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Гугл переводчик извините ...

In general, I decided to work on NBT tags. Using the NbttagCompound class but ran into an incomprehensible problem. If I get the ItemStack via Minecraft.getMinecraft (). Player.getHeldItemMainHand () and use the item.setTagCompound (/ * something * /) method and then immediately throw the item, then the changes will not be applied, and if via PlayerInteractEvent.RightClickItem event
and get ItemStack item = event.getItemStack () then after operations with nbt and item drop, it will be applied. Why is that? I noticed that in the first case, if you install nbt and immediately open the inventory, then nbt will be applied, since the item will move up and then down. In the second case, the object will immediately move back and forth. How to do this with a method?

 

Версия Forge 1.12.2

 

Если вдруг есть русские:

Вообщем я решил поработать над тегами NBT. Используя класс NbttagCompound, но столкнулся с непонятной проблемой. Если я получу ItemStack через Minecraft.getMinecraft (). Player.getHeldItemMainHand () и после использую метод item.setTagCompound (/ * что то * /) и после сразу выкину предмет, то изменения не применяется, а если через PlayerInteractEvent.RightClickItem event
и получить ItemStack item = event.getItemStack () то после операций с nbt и дропа предмета, он применится. Почему так? Заметил, что в первом случае, если установить nbt и сразу открыть инвентарь, то nbt применится, так как предмет сдвинется вверх, а потом вниз. Во втором случае, предмет сразу туда-сюда передвинется. Как такое сделать методом?

Edited by Amperka_pro

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.