Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Natank25

Members
  • Joined

  • Last visited

  1. Does anyone have an idea ? Or is it just a useless feature that no one knows ?
  2. Hi, As the title says, i need help with the function getShapeForEachState. I want to create a sliding door and to do that, i created a block with a custom integer property named frame. I then wanted to use this function to get the shape for every frame and direction but I don't know how to use the function. I also tried to use BlockEntity to do a smooth animation but 2 blocks entities animation seems hard to synchronise. Can anyone help me with this or help me create a proper block entity ?
  3. The code of vanilla commands ?
  4. And how do I "connect" .executes() to builder.then() ?
  5. True, i modified it from Commands.argument("player", EntityArgument.player()) to Commands.argument("null", null) to remove the argument and it didn't worked (Do you have any ideas on how to do it ?). I tried to launch minecraft again, and it work, thank you for your help
  6. Because i don't know how to do git repo, i send the Command class SwitchDimCommand: package io.github.Natank25.customdim.commom.command.impl; import com.mojang.brigadier.Command; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import io.github.Natank25.customdim.commom.command.BaseCommand; import io.github.Natank25.customdim.core.init.DimensionInit; import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.command.arguments.EntityArgument; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.world.World; public class SwitchDimCommand extends BaseCommand { public SwitchDimCommand(String name, int permissionLevel, boolean enabled) { super(name, permissionLevel, enabled); } @Override public LiteralArgumentBuilder<CommandSource> setExecution() { return builder.then(Commands.argument("null", null) .executes(source -> execute(source.getSource(), EntityArgument.getPlayer(source, "player")))); } private int execute(CommandSource source, ServerPlayerEntity player) { if (source.getLevel() == source.getServer().getLevel(World.OVERWORLD)) { player.teleportTo(source.getServer().getLevel(DimensionInit.EMPTY_DIM),0,4,0,0,0); } else if (source.getLevel() == source.getServer().getLevel(DimensionInit.EMPTY_DIM)) { player.teleportTo(source.getServer().getLevel(World.OVERWORLD),-268,76,276,0,0); } return Command.SINGLE_SUCCESS; } } BaseCommand: package io.github.Natank25.customdim.commom.command; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; public class BaseCommand { protected LiteralArgumentBuilder<CommandSource> builder; boolean enabled; public BaseCommand(String name, int permissionLevel, boolean enabled) { this.builder = Commands.literal(name).requires(source -> source.hasPermission(permissionLevel)); this.enabled = enabled; } public LiteralArgumentBuilder<CommandSource> getBuilder() { return builder; } public boolean isEnabled() { return enabled; } public LiteralArgumentBuilder<CommandSource> setExecution() { return null; } }
  7. The whole code or just the command class ?
  8. Natank25 changed their profile photo
  9. Minecraft crashes each time I load into a world already created or not. Does anyone has an idea on how to fix this ? This is my crash log :

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.