
MyRedAlien43
Members-
Content Count
37 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout MyRedAlien43
-
Rank
Tree Puncher
-
MyRedAlien43 started following [1.15.2] Command doesn't exist after inputting arguments, [1.15.2] Custom Point of Interest For Villigers, [1.15.2] Creating crafting GUIs and and 1 other
-
[1.15.2] Custom Point of Interest For Villigers
MyRedAlien43 replied to IMleader's topic in Modder Support
Also want to know this -
[1.15.2] Command doesn't exist after inputting arguments
MyRedAlien43 replied to MyRedAlien43's topic in Modder Support
Okay, I added 2 more breakpoints, and the only one that triggered was the "executes" line. I will now edit the post to mark where I put the breakpoints -
[1.15.2] Command doesn't exist after inputting arguments
MyRedAlien43 replied to MyRedAlien43's topic in Modder Support
Yes I did press debug mode... Let me just use another breakpoint somewhere.. -
[1.15.2] Command doesn't exist after inputting arguments
MyRedAlien43 replied to MyRedAlien43's topic in Modder Support
bump -
I am irrelevant then
-
An IScreenFactory basically requires a reference to the screen class constructor (e.g. ScreenClass::new), and you can look in ContainerType to see how you make one
-
Its registerFactory
-
You need to link the container and the screen (aka Gui) Using a method in ScreenManager using a method that i cant remember
-
NetworkHooks.openGui
-
I'm pretty sure you need to register the class itself, not an instance of it.... Correct me if I'm wrong
-
So I want to create a command to teleport between dimensions, for testing, but when I try to run it, the game says "Unknown Command" "...dimension_name_here <--[HERE]" And I also tried using breakpoints but they didn't trigger whatsoever?? Command Class: public class TeleportDimensionCommand { public static void register(CommandDispatcher<CommandSource> dispatcher) { LiteralArgumentBuilder<CommandSource> builder = Commands.literal("teleport_dimension").requires(source -> source.hasPermissionLevel(2)); builder.then(Commands.argument("dimension", DimensionArgument.getDimension())); builder.executes(TeleportDimensionCommand::teleport); //Only breakpoint which triggered LiteralCommandNode<CommandSource> teleport_dimension = dispatcher.register(builder); dispatcher.register(Commands.literal("tp_dim").requires(source -> source.hasPermissionLevel(2)).redirect(teleport_dimension)); } private static int teleport(CommandContext<CommandSource> context) { ServerPlayerEntity player; try { player = context.getSource().asPlayer(); //Put a breakpoint here.. player.sendMessage(new StringTextComponent("Attempting teleport...")); //When I didn't put any arguments, this popped up in chat } catch (CommandSyntaxException e) { Main.getLogger().error(Markers.ERROR, "Could not get player from source"); e.printStackTrace(); return 0; //Also tried a breakpoint here } if(player.changeDimension(DimensionArgument.getDimensionArgument(context, "dimension")) == null) { Main.getLogger().error(Markers.ERROR, "Could not teleport player"); //Put a breakpoint here player.sendMessage(new StringTextComponent("Could not teleport")); } else { player.sendMessage(new StringTextComponent("Teleported!")); //Put a breakpoint here } return 1; } } In my main class: package sdt.undergroundadditions; //Imports here... @Mod("undergroundadditions") public class Main { public Main() { //Some more code here.. IEventBus forge = MinecraftForge.EVENT_BUS; //Adding listeners here... forge.addListener(this::serverStarting); } //Some more methods in between here private void serverStarting(FMLServerStartingEvent event) { TeleportDimensionCommand.register(event.getCommandDispatcher()); logger.info(Markers.SERVER_STARTING, "Initialized server starting events"); } } And, there's no error in the logs too. What's wrong?
-
like this? { "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "functions": [ { "function": "minecraft:set_count", "count": 4 }, { "function": "minecraft:explosion_decay" } ], "name": "undergroundadditions:dirt_chunk" }, { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:random_chance", "chance": 0.125 } ], "name": "undergroundadditions:grass_seeds" } ] } ] }