Search the Community
Showing results for tags 'commands'.
-
I have a command structured like this: /rank list /rank upgrades /rank nextLevel I want to allow the server to send the command /rank list because it doesn't interact with players, meanwhile upgrades and nextLevel are targetting a player. In my current condition I'm checking if the command context's source's player is not null, but do exist a way to map those argouments for players only so they don't even show up in autocompletations? PS (forgot to add the code) @SubscribeEvent public void onRegisterCommands(RegisterCommandsEvent event) { // builds command tree structure. LiteralArgumentBuilder<CommandSourceStack> root = Commands.literal("rank"); root.then(Commands.literal("list") .executes(this::onListRanks)); root.then(Commands.literal("upgrades") .executes(this::onDisplayPlayerUpgrades)); root.then(Commands.literal("nextLevel") .executes(this::onIncreaseCurrentPlayerLevel)); event.getDispatcher().register(root); }
-
1.21.4 [Solved][Forge 1.21.4] Registry Object not present
Maxime66410 posted a topic in Modder Support
Hello, this is the first time I've created a mod for Minecraft and my mod is for an entity that plays in your world. I've survived several tutorials and documentation, but I still can't do what I want to do. Can you tell me why I'm getting this error? Everything looks good. no ? Forge for 1.21.4 changelist : https://gist.github.com/ChampionAsh5357/d895a7b1a34341e19c80870720f9880f Repos Github for my mod : https://github.com/Maxime66410/TheFakePlayer Last Log : https://gist.github.com/Maxime66410/246f983f2d791469ae87a77825527da9 Caused by: java.lang.NullPointerException: Registry Object not present: thefakeplayer:fake_player_entity at TRANSFORMER/[email protected]/net.minecraftforge.registries.RegistryObject.get(RegistryObject.java:193) ~[forge-1.21.4-54.1.3_mapped_official_1.21.4-recomp.jar%231!/:?] at TRANSFORMER/[email protected]/org.furranystudio.thefakeplayer.Events.ClientModEvents.entityAttributes(ClientModEvents.java:27) ~[main/:?] at TRANSFORMER/[email protected]/org.furranystudio.thefakeplayer.Events.__ClientModEvents_entityAttributes_EntityAttributeCreationEvent.invoke(.dynamic) ~[main/:?] at SECURE-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:46) ~[eventbus-6.2.27.jar:?] at SECURE-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-6.2.27.jar:?] at SECURE-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:288) ~[eventbus-6.2.27.jar:?] at LAYER PLUGIN/[email protected]/net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:184) ~[javafmllanguage-1.21.4-54.1.3.jar:54.1.3] SOLUTION : ModEntities.ENTITIES.register(modEventBus); -> public Thefakeplayer(FMLJavaModLoadingContext context) https://docs.minecraftforge.net/en/1.21.x/concepts/registries/ https://github.com/MinecraftForge/MinecraftForge/blob/1.21.x/src/main/java/net/minecraftforge/registries/DeferredRegister.java-
- broken mod
- commands
-
(and 1 more)
Tagged with:
-
Hello! I recently approached modding and Java programming in general. But I'm very used to programming in Minecraft "code", so .json files and commands. In fact, for example, with Terrabalnder it was quite simple and intuitive to convert biome, surface rules and positioning files to run whit forge. Instead what I'm having difficulty with is switching Minecraft things I used to do whit commands to java format. Things like execute a condition or position checks on a specific type of entity, even simple things like "if block ~ ~-1 ~ dirt" or "run particle...". There aren't many tutorials, so I would like to know if there are any tools, documentation or a list of procedures, methods and classes, or useful IntelliJ tooltips. Let me know leterally how from zero I can get the location of methods and informations I need to use. Thanks
-
https://gist.github.com/it-is-allie/29645c4fb5c7131ad30181769a37d12f There is my latest crash report. I've spent probably 5 hours messing with modpacks and have gotten it almost complete but it then randomly crashes before loading all the mods? I'm not even sure. if anyone could help it would be greatly appreciated.
-
My mod requires a DiscordRPC and Alphine and net.minecraft on a 10.0.2 Modding Gradle setup as 4.9, I do not have any of these? and I wen't to the forums to know a little about Gradle Implementations and Compiling Software.
-
Topic for making tags
-
- 1.10.2
- 1.11.2
-
(and 81 more)
Tagged with:
- 1.10.2
- 1.11.2
- 1.12.2
- 1.13.2
- 1.14.4
- 1.15.2
- 1.16.5
- 1.17.1
- 1.18.2
- 1.19.0
- 1.19.1
- 1.19.2
- 1.19.3
- 1.19.4
- 1.2.5
- 1.20.0
- 1.3.2
- 1.4.7
- 1.5.2
- 1.6.4
- 1.7.10
- 1.8.9
- 1.9.4
- armour
- bad jvm args
- biomes
- blocks
- broken mod
- bug
- capabilities
- client
- client-only mods on server
- codecs
- commands
- dimensions
- effects
- enchantments
- entities
- events
- feature request
- fluids
- food
- gradle
- groovy
- guis
- ide
- installer
- items
- java
- kotlin
- launcher
- libraries
- loot
- metadata
- missing jar association
- missing java
- missing mods
- mixin
- needs more info
- networking
- news
- optifine
- ores
- out of memory
- outdated drivers
- particles
- performance
- porting
- potions
- recipes
- registries
- rendering
- scala
- server
- solved
- sounds
- textures
- tools
- tutorial
- weapons
- worldgen
- wrong java version
- wrong mod version