ko_kr:tutorial:blocks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ko_kr:tutorial:blocks [2021/04/07 05:14] – [Creating a Block] themovieayt | ko_kr:tutorial:blocks [2023/08/14 16:13] (current) – namutree0345 | ||
---|---|---|---|
Line 2: | Line 2: | ||
블록을 추가하는 방법은 [[tutorial: | 블록을 추가하는 방법은 [[tutorial: | ||
- | ===== 블록 만들기 ===== | + | ===== 블록 |
- | Start by creating an instance of '' | + | '' |
- | + | ||
- | 블록 인스턴스를 먼저 만듭니다. | + | |
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
public class ExampleMod implements ModInitializer { | public class ExampleMod implements ModInitializer { | ||
- | /* Declare and initialize our custom block instance. | + | /* 우리의 커스텀 블록 인스턴스를 선언하고 초기화합니다. |
- | We set our block material to `METAL`, which requires a pickaxe to efficiently break. | + | 우리는 블록 재질을 곡괭이로 효율적으로 부술 수 있는 |
+ | |||
+ | | ||
- | `strength` sets both the hardness and the resistance of a block to the same value. | + | 경도는 블록이 부수는 데 걸리는 시간을 결정하며, 저항은 블록이 폭발에 얼마나 강한지를 결정합니다. |
- | | + | 돌의 경도는 |
- | Stone has a hardness of 1.5f and a resistance of 6.0f, while Obsidian has a hardness of 50.0f and a resistance of 1200.0f. | + | |
- | You can find the stats of all vanilla blocks in the class `Blocks`, where you can also reference other blocks. | + | 당신은 모든 바닐라 블록을 |
*/ | */ | ||
public static final Block EXAMPLE_BLOCK = new Block(FabricBlockSettings.of(Material.METAL).strength(4.0f)); | public static final Block EXAMPLE_BLOCK = new Block(FabricBlockSettings.of(Material.METAL).strength(4.0f)); | ||
Line 28: | Line 27: | ||
</ | </ | ||
- | ==== Registering your Block ==== | + | ==== 블록 등록하기 |
- | Blocks should be registered under the '' | + | 블록은 |
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
Line 44: | Line 43: | ||
</ | </ | ||
- | Your custom block will //not// be accessible as an item yet, but it can be seen in-game by using the command | + | 당신의 커스텀 블록은 아이템으로 아직 접근할 수 없을 것입니다. 하지만 게임 내에서는 |
- | ==== Registering an Item for your Block ==== | + | ==== 블록 아이템 등록하기 |
- | In most cases, you want to be able to place your block using an item. To do this, you need to register a corresponding BlockItem in the item registry. You can do this by registering an instance of BlockItem under Registry.ITEM. | + | 대부분의 경우에는 당신은 아이템을 통해 당신의 블록을 설치하게 하고 싶을 것 입니다. 이 것을 위해 당신은 |
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
Line 63: | Line 62: | ||
</ | </ | ||
- | ===== Giving your Block Visuals | + | ===== 블록에게 시각적 요소 부여하기 |
- | + | ||
- | At this point, your new block will appear as a purple and black checkerboard pattern in-game. This is Minecraft' | + | |
- | * A blockstate file | + | |
- | * A block model file | + | |
- | * A texture | + | |
- | * An item model file (if the block has an item associated with it). | + | |
- | The files should be located here: | + | 현재까지는 당신의 블록은 게임 내에서 보라색과 검은색의 체크 무늬로 표시될 것입니다. 마인크래프트는 블록의 에셋을 로딩하는 중 문제가 발생했을 때 이렇게 표시합니다. 이 문제의 전체 내용은 클라이언트를 실행할 때 출력되는 로그에서 확인할 수 있습니다. |
+ | 당신은 블록에게 시각적 요소를 부여하기 위해 다음의 파일이 필요합니다 | ||
+ | * 블록 상태 파일 | ||
+ | * 블록 모델 파일 | ||
+ | * 텍스쳐 | ||
+ | * 만약 블록 아이템이 있을 경우, 아이템 모델 파일 | ||
- | Blockstate: src/ | + | 해당 파일들은 다음 위치에 위치되어야 합니다: |
- | Block Model: src/ | + | |
- | Item Model: src/ | + | |
- | Block Texture: src/ | + | |
- | The blockstate file determines which model a block should use depending on its blockstate. Our block doesn' | + | 블록 상태: src/ |
+ | 블록 모델: src/ | ||
+ | 아이템 모델: src/ | ||
+ | 텍스쳐: src/ | ||
+ | |||
+ | 블록 상태 파일은 블록의 블록 상태(blockstate)에 따라 어떤 블록 모델을 사용할지 결정합니다. 우리의 블록은 상태라고 할 게 딱히 없으니 우리는 블록 상태 파일을 다음과 같이 작성할 수 있을 것입니다. | ||
+ | ''""'' | ||
<code JavaScript src/ | <code JavaScript src/ | ||
Line 88: | Line 89: | ||
</ | </ | ||
- | The block model file defines the shape and texture of your block. Our model will have '' | + | 블록 모델 파일은 당신의 블록의 모양과 텍스쳐를 결정합니다. 우리의 모델은 모든 면에 같은 텍스쳐를 적용하는 |
<code JavaScript src/ | <code JavaScript src/ | ||
Line 99: | Line 100: | ||
</ | </ | ||
- | In most cases, you will want the block to look the same in item form. You can make an item model that has the block model file as a parent, which makes it appear exactly like the block: | + | 대부분의 경우에는 블록 아이템을 블록과 똑같이 보이길 원할 것입니다. 그렇다면 당신은 블록 모델을 부모로 삼는 아이템 모델을 다음과 같이 작성하면 됩니다. |
<code JavaScript src/ | <code JavaScript src/ | ||
Line 107: | Line 108: | ||
</ | </ | ||
- | Load up Minecraft and your block should have visuals! | + | 이제 마인크래프트를 켜고 블록의 시각적인 요소를 확인해보세요! |
- | ===== Configuring Block Drops ===== | + | ===== 블록 드랍 설정하기 |
- | To make your block drop items when broken, you will need a //loot table//. The following file will cause your block to drop its respective item form when broken: | + | 블록이 부숴졌을 때 아이템이 떨어지게 하고 싶으면, //루트 테이블//이 필요로 합니다. 당신의 블록이 부숴졌을 때 아이템을 떨어트리는 루트 테이블을 다음과 같이 작성할 수 있습니다. |
<code JavaScript src/ | <code JavaScript src/ | ||
Line 135: | Line 136: | ||
</ | </ | ||
- | ===== Creating a Custom Block Class ===== | + | ===== 커스텀 블록 클래스 만들기 |
The above approach works well for simple items but falls short when you want a block with //unique// mechanics. We'll create a // | The above approach works well for simple items but falls short when you want a block with //unique// mechanics. We'll create a // |
ko_kr/tutorial/blocks.1617772471.txt.gz · Last modified: 2021/04/07 05:14 by themovieayt