User Tools

Site Tools


ru:tutorial:items

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
ru:tutorial:items [2021/08/11 17:41] – created vlad_coolru:tutorial:items [2021/09/06 17:33] vlad_cool
Line 16: Line 16:
 } }
 </code> </code>
-You'll use the vanilla registry system for registering new contentThe basic syntax is ''Registry#register(Registry Type, Identifier, Content)''Registry types are stored as static fields in the ''Registry'' classand the identifier is what labels your contentContent is an instance of whatever you're addingThis can be called anywhere as long as it occurs during initialization.+Вы будете использовать классическую систему регистрации нового контентаВот базовый синтаксис ''Registry#register(Registry Type, Identifier, Content)''Типы регистрации хранятся как статические типы в классе ''Registry'', и идентификатор обозначает ваш контентКонтент - это экземпляр всего, что вы добавляетеОн может быть вызван в любой момент во время инициализации.
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
 public class ExampleMod implements ModInitializer { public class ExampleMod implements ModInitializer {
Line 29: Line 29:
 } }
 </code> </code>
-Иеперь Ваш предмет добавлен в Minecraft. Нажмите задачу Gradle ''runClient'', чтобы увидеть его в действии+Теперь Ваш предмет добавлен в Minecraft. Нажмите задачу Gradle ''runClient'', чтобы увидеть его в действии
  
 {{:tutorial:2019-02-17_16.50.44.png?400|}} {{:tutorial:2019-02-17_16.50.44.png?400|}}
Line 56: Line 56:
 } }
 </code> </code>
-The parent of your item changes how it's rendered in the hand and comes in useful for things like block items in the inventory. "item/handheld" is used for tools that are held from the bottom left of the texture. textures/layer0 is the location of your image file.+Parent указывает, как предмет должен отображаться в руке, это полезно для таких вещей, как предметы блоков в инвентаре. "item/handheld" используется для инструментов, которые держатся за нижний левый угол текстуры. textures/layer0 это расположение файла с картинкой.
  
-Final textured result:+Конечный текстурированный результат:
  
 {{:tutorial:item_texture.png?400|}} {{:tutorial:item_texture.png?400|}}
ru/tutorial/items.txt · Last modified: 2022/02/27 09:43 by 127.0.0.1