Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Forix

Members
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Forix's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks you i'm going to check this
  2. You know in 1.15 it was so much easier with the DimensionManager class
  3. i'm doing this mod for a modded minecraft server. I know that there is things which can support both mods and plugin like magma, but we want to use only mods without plugins.
  4. i'm actually creating a skyblock mod. the user have to type in the tchat a command to create his island. Each player have is own island, and the thing what i want to do is that each island is in his own dimension
  5. Ok so, it's possible to dynamically register new dimensions by creating new json dimension file while the server is running?
  6. Hi, There is a way to create multiple worlds from a dimension? Like when a player connect to server, i have to create a new world from my custom dimension. What is common within these worlds is the dimension which is the same. I actually have my custom dimension with the new json system
  7. Hello, with the new version, dimension registration system has completely changed. Can someone explain me how to register new dimension?
  8. I tried your advice and it's worked thanks !
  9. Hi, I'm creating am trying to send a packet to the dedicated server but i get this error: [18:45:59] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception java.lang.NoSuchMethodError: 'java.lang.String net.minecraft.network.PacketBuffer.readString()' at fr.modcraftmc.skyblock.network.PacketAddMember.<init>(PacketAddMember.java:17) ~[main/:?] {re:classloading} at net.minecraftforge.fml.network.simple.IndexedMessageCodec.lambda$tryDecode$0(IndexedMessageCodec.java:120) ~[forge-1.15.2-31.2.36_mapped_snapshot_20200802-1.15.1-recomp.jar:?] {re:classloading} at java.util.Optional.map(Optional.java:265) ~[?:?] {} at net.minecraftforge.fml.network.simple.IndexedMessageCodec.tryDecode(IndexedMessageCodec.java:120) ~[forge-1.15.2-31.2.36_mapped_snapshot_20200802-1.15.1-recomp.jar:?] {re:classloading} at net.minecraftforge.fml.network.simple.IndexedMessageCodec.consume(IndexedMessageCodec.java:162) ~[forge-1.15.2-31.2.36_mapped_snapshot_20200802-1.15.1-recomp.jar:?] {re:classloading} at net.minecraftforge.fml.network.simple.SimpleChannel.networkEventListener(SimpleChannel.java:80) ~[forge-1.15.2-31.2.36_mapped_snapshot_20200802-1.15.1-recomp.jar:?] {re:classloading} at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) ~[eventbus-2.2.0-service.jar:?] {} at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) ~[eventbus-2.2.0-service.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-2.2.0-service.jar:?] {} at net.minecraftforge.fml.network.NetworkInstance.dispatch(NetworkInstance.java:84) ~[?:?] {re:classloading} at net.minecraftforge.fml.network.NetworkHooks.lambda$onCustomPayload$1(NetworkHooks.java:78) ~[?:?] {re:classloading} at java.util.Optional.map(Optional.java:265) ~[?:?] {} at net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(NetworkHooks.java:78) ~[?:?] {re:classloading} at net.minecraft.network.play.ServerPlayNetHandler.processCustomPayload(ServerPlayNetHandler.java:1366) ~[?:?] {re:classloading} at net.minecraft.network.play.client.CCustomPayloadPacket.processPacket(CCustomPayloadPacket.java:51) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.network.play.client.CCustomPayloadPacket.processPacket(CCustomPayloadPacket.java:12) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[?:?] {re:classloading} at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) ~[?:?] {re:classloading} at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) ~[?:?] {re:classloading} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:759) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:141) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.driveOneInternal(MinecraftServer.java:742) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:736) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.ThreadTaskExecutor.driveUntil(ThreadTaskExecutor.java:123) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:722) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:666) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at java.lang.Thread.run(Thread.java:834) [?:?] {} There is my code: PacketHandler class: public class PacketHandler { private static final String PROTOCOL_VERSION = "1"; public static SimpleChannel INSTANCE; private static int Id = 0; private static int nextId(){ return Id++; } public static void registerMessageS(){ INSTANCE = NetworkRegistry.newSimpleChannel( new ResourceLocation(SkyBlock.MOD_ID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); INSTANCE.registerMessage(nextId(), PacketOpenGUI.class, PacketOpenGUI::toBytes, PacketOpenGUI::new, PacketOpenGUI::handle); INSTANCE.registerMessage(nextId(), PacketOpenSettingsGUI.class, PacketOpenSettingsGUI::toBytes, PacketOpenSettingsGUI::new, PacketOpenSettingsGUI::handle); INSTANCE.registerMessage(nextId(), PacketRequestSettings.class, PacketRequestSettings::toBytes, PacketRequestSettings::new, PacketRequestSettings::handle); INSTANCE.registerMessage(nextId(), PacketAddMember.class, PacketAddMember::toBytes, PacketAddMember::new, PacketAddMember::handle); INSTANCE.registerMessage(nextId(), PacketRemoveMember.class, PacketRemoveMember::toBytes, PacketRemoveMember::new, PacketRemoveMember::handle); } } PacketAddMember class: public class PacketAddMember { String owner; String newMember; public PacketAddMember(PacketBuffer buf){ owner = buf.readString(); newMember = buf.readString(); } public void toBytes(PacketBuffer buf){ buf.writeString(owner); buf.writeString(newMember); } public PacketAddMember(String owner, String newMember){ this.owner = owner; this.newMember = newMember; } public void handle(Supplier<NetworkEvent.Context> ctx){ ctx.get().enqueueWork(() -> { Islands.addMember(owner, newMember); }); ctx.get().setPacketHandled(true); } } Bit of code of where i send the packet to the server: private void addMember(Button button){ System.out.println("playerList.getSelected().toString() = " + playerList.getSelected().toString()); PacketHandler.INSTANCE.sendToServer(new PacketAddMember(Minecraft.getInstance().player.getDisplayName().getString().toLowerCase(), playerList.getSelected().toString())); String newMember = playerList.getSelected().toString().toLowerCase(); memberList.set(memberList.indexOf(newMember+"=false"), newMember+"=true"); children.remove(playerList); playerList = new PlayerList(Minecraft.getInstance(), 300, 110, 10, 100, 15); children.add(playerList); addMember.active = false; removeMember.active = false; } The error occurs when i press the button which have for listener this method above. Thank you for your help
  10. My question is in the post title. Thanks for your help
  11. because i am reading schematic file who is written by worldedit. In the worldedit schematic format there is an nbt called "Palette" which contains all blocks used
  12. I know i can do that but i wanted to read registries names who were written on a file
  13. Thank you so much ! For other guys who watch this thread I used this function precisly: ForgeRegistries.BLOCKS.getValue(new ResourceLocation("minecraft:coal_block"))
  14. Hi guys, since yesterday i can't find how can I get a Block instance or an Id from a registry name (for example "minecraft:coal_block") I'm using forge 1.15.2-31.2.9 Thanks for helping me
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.