|
3 | 3 | import net.minecraft.commands.CommandSourceStack; |
4 | 4 | import net.minecraft.resources.ResourceLocation; |
5 | 5 | import net.minecraft.server.level.ServerPlayer; |
| 6 | +import net.minecraft.world.entity.EntityType; |
| 7 | +import net.minecraft.world.entity.MobCategory; |
6 | 8 | import net.minecraftforge.fml.ModList; |
7 | 9 | import net.minecraftforge.fml.loading.FMLPaths; |
8 | 10 | import net.minecraftforge.registries.RegistryManager; |
| 11 | +import org.samo_lego.taterzens.npc.TaterzenNPC; |
9 | 12 | import org.samo_lego.taterzens.platform.Platform; |
| 13 | +import org.samo_lego.taterzens.util.TextUtil; |
10 | 14 |
|
11 | 15 | import java.nio.file.Path; |
12 | | -import java.util.Collections; |
13 | 16 |
|
14 | | -import static org.samo_lego.taterzens.commands.NpcCommand.npcNode; |
15 | | -import static org.samo_lego.taterzens.gui.EditorGUI.createCommandGui; |
| 17 | +import static org.samo_lego.taterzens.Taterzens.NPC_ID; |
| 18 | +import static org.samo_lego.taterzens.Taterzens.TATERZEN_TYPE; |
| 19 | +import static org.samo_lego.taterzens.forge.TaterzensForge.ENTITIES; |
16 | 20 |
|
17 | 21 | public class ForgePlatform extends Platform { |
18 | 22 |
|
@@ -41,12 +45,16 @@ public boolean checkPermission(CommandSourceStack source, String permissionNode, |
41 | 45 |
|
42 | 46 | @Override |
43 | 47 | public void registerTaterzenType() { |
44 | | - //TATERZEN_TYPE = TATERZEN.get(); |
| 48 | + TATERZEN_TYPE = ENTITIES.register(NPC_ID.getPath(), () -> EntityType.Builder |
| 49 | + .<TaterzenNPC>of(TaterzenNPC::new, MobCategory.MISC) |
| 50 | + .sized(0.6F, 1.8F) |
| 51 | + .build(NPC_ID.getPath())); |
45 | 52 | } |
46 | 53 |
|
47 | 54 | @Override |
48 | 55 | public void openEditorGui(ServerPlayer player) { |
49 | | - var editorGUI = createCommandGui(player, null, npcNode, Collections.singletonList("npc"), false); |
50 | | - editorGUI.open(); |
| 56 | + player.sendSystemMessage(TextUtil.translate("taterzens.gui.forge")); |
| 57 | + /*var editorGUI = createCommandGui(player, null, npcNode, Collections.singletonList("npc"), false); |
| 58 | + editorGUI.open();*/ |
51 | 59 | } |
52 | 60 | } |
0 commit comments