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.

greenecojr

Members
  • Joined

  • Last visited

Everything posted by greenecojr

  1. Do you think keypress is what is making it crash because the rest of the points do not result in a server crash besides the setpackethandled also i do call setpackethandled at the end of the handle method
  2. I was following a tutorial and another forum post on here and I have been trying to get potion effects to activate with the press of a button and every time i try a single player world the game crashes Key,KeyBinding,Packet Classes public class key { private final int key; public key(int keyIn) { this.key = keyIn; } public static void encode(key msg, PacketBuffer buf) { buf.writeInt(msg.key); } public static key decode(PacketBuffer buf) { return new key(buf.readInt()); } public static void handle(key msg, Supplier<NetworkEvent.Context> ctx) { if(msg.key==0) { ctx.get().enqueueWork(() -> { ServerPlayerEntity sender = ctx.get().getSender(); sender.addPotionEffect(new EffectInstance(Effect.get(5),20)); }); } ctx.get().setPacketHandled(true); } } @Mod.EventBusSubscriber(modid = DungeonWars.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class keyBind { static KeyBinding[] keyBindings = new KeyBinding[]{new KeyBinding("key.strong", KeyConflictContext.UNIVERSAL, InputMappings.Type.KEYSYM, 33, "key.categories.strong")}; static Boolean keyPress = false; @SubscribeEvent public static void onTick(TickEvent.ClientTickEvent event) { if (keyPress && !keyBindings[0].isKeyDown()) { keyPress = false; } } @SubscribeEvent public static void onInput(InputEvent.KeyInputEvent event) { if (event.getKey() == keyBindings[0].getKey().getKeyCode() ) { // CrudeTechMod.log("pressed"); Packets.INSTANCE.sendToServer(new key(0)); keyPress = true; } } public static void registerKeyBindings() { for (int i = 0; i < keyBindings.length; i++) { ClientRegistry.registerKeyBinding(keyBindings[i]); } } public class Packets { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel( new ResourceLocation(DungeonWars.MOD_ID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static int i=0; } //(Main) private void setup(final FMLCommonSetupEvent event) { // some preinit code Packets.INSTANCE.registerMessage(Packets.i++, key.class, key::encode, key::decode, key::handle); } private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client keyBind.registerKeyBindings(); //ClientRegistry.registerKeyBinding(keybinding); } Log java.lang.RuntimeException: Why did the advancements not load yet?! at net.minecraftforge.common.AdvancementLoadFix.loadVisibility(AdvancementLoadFix.java:51) ~[?:?] {re:classloading} at net.minecraft.advancements.PlayerAdvancements.load(PlayerAdvancements.java:157) ~[?:?] {re:classloading} at net.minecraft.advancements.PlayerAdvancements.<init>(PlayerAdvancements.java:65) ~[?:?] {re:classloading} at net.minecraft.server.management.PlayerList.getPlayerAdvancements(PlayerList.java:806) ~[?:?] {re:classloading} at net.minecraft.entity.player.ServerPlayerEntity.<init>(ServerPlayerEntity.java:167) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.management.PlayerList.createPlayerForUser(PlayerList.java:395) ~[?:?] {re:classloading} at net.minecraft.network.login.ServerLoginNetHandler.tryAcceptPlayer(ServerLoginNetHandler.java:120) ~[?:?] {re:classloading} at net.minecraft.network.login.ServerLoginNetHandler.tick(ServerLoginNetHandler.java:64) ~[?:?] {re:classloading} at net.minecraft.network.NetworkManager.tick(NetworkManager.java:246) ~[?:?] {re:classloading} at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:152) ~[?:?] {re:classloading} at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:903) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:821) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:662) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace: at net.minecraftforge.common.AdvancementLoadFix.loadVisibility(AdvancementLoadFix.java:51) at net.minecraft.advancements.PlayerAdvancements.load(PlayerAdvancements.java:157) at net.minecraft.advancements.PlayerAdvancements.<init>(PlayerAdvancements.java:65) at net.minecraft.server.management.PlayerList.getPlayerAdvancements(PlayerList.java:806) at net.minecraft.entity.player.ServerPlayerEntity.<init>(ServerPlayerEntity.java:167) at net.minecraft.server.management.PlayerList.createPlayerForUser(PlayerList.java:395) at net.minecraft.network.login.ServerLoginNetHandler.tryAcceptPlayer(ServerLoginNetHandler.java:120) at net.minecraft.network.login.ServerLoginNetHandler.tick(ServerLoginNetHandler.java:64) at net.minecraft.network.NetworkManager.tick(NetworkManager.java:246) -- Ticking connection -- Details: Connection: net.minecraft.network.NetworkManager@2751f8c8 Stacktrace: at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:152) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:903) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:821) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:662) at java.lang.Thread.run(Thread.java:748) -- System Details -- Details: Minecraft Version: 1.15.2 Minecraft Version ID: 1.15.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_251, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 762228824 bytes (726 MB) / 2077753344 bytes (1981 MB) up to 3799515136 bytes (3623 MB) CPUs: 8 JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump ModLauncher: 5.1.0+69+master.79f13f7 ModLauncher launch target: fmluserdevclient ModLauncher naming: mcp ModLauncher services: /eventbus-2.2.0-service.jar eventbus PLUGINSERVICE /forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE /forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE /accesstransformers-2.1.1-shadowed.jar accesstransformer PLUGINSERVICE /forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE /forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE /forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE FML: 31.2 Forge: net.minecraftforge:31.2.0 FML Language Providers: [email protected] minecraft@1 Mod List: client-extra.jar Minecraft {[email protected] DONE} forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-recomp.jar Forge {[email protected] DONE} main Minecraft World War: Dungeon Wars {[email protected] DONE} Player Count: 0 / 8; [] Data Packs: vanilla, mod:forge (incompatible), mod:mwwdungeonwars Type: Integrated Server (map_client.txt)

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.