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.

Weissmoon

Members
  • Joined

  • Last visited

Everything posted by Weissmoon

  1. I have discovered that even after updating forge versions past 1.12.2-14.23.5.2758 apache libraries are still failing to load.
  2. here is a link to the newest version https://drive.google.com/open?id=1ibtpyOBOdEFkZCx1twAZFPp-94SFi2MS
  3. I have added META-INF/libraries/commons-math3-3.2.jar.meta containing: Maven-Artifact: org.apache.commons:commons-math3:3.2 The result is the same.
  4. I have a jar available on curseforge https://minecraft.curseforge.com/projects/opis-unofficial/files/2696813
  5. I cannot, there is an error with the upload.
  6. The jars are in META-INF/libraries/ and the version of forge I have is 1.12.2-14.23.5.2768.
  7. I updated forge version to 1.12.2-14.23.5.2768. I still have the same error.
  8. Has this happened to anyone before?
  9. You need to register it in the event bus. MinecraftForge.EVENT_BUS.register(new EventHandler());
  10. You can create a list to return in a GuiConfig class. public class ModGuiConfig extends GuiConfig{ public static List<IConfigElement> getConfigElements(){ List<IConfigElement> list = new ArrayList<>(); list.add(new ConfigElement(ConfigurationHandler.configuration.getCategory(ConfigurationHandler.CATEGORY_ENTITY))); list.add(new ConfigElement(ConfigurationHandler.configuration.getCategory(ConfigurationHandler.CATEGORY_TILES))); list.add(new ConfigElement(ConfigurationHandler.configuration.getCategory(ConfigurationHandler.CATEGORY_WORLD))); list.add(new ConfigElement(ConfigurationHandler.configuration.getCategory(ConfigurationHandler.CATEGORY_CHEATS))); return list; } public class ConfigurationHandler{ public static Configuration configuration; public static String CATEGORY_TILES = "tiles"; public static String CATEGORY_ENTITY = "entity"; public static String CATEGORY_WORLD = "world"; public static String CATEGORY_CHEATS = "other"; }
  11. I am trying to add libraries to the minecraft runtime using the Jar-in-jar method. The jar files are added into the "META-INF/libraries/" folder in the compile jar. The jars extract to "run/mods/1.12.2". The latest.log contains these lines: I have tried adding the {entry}.meta in src/main/resources/(diesieben07), META-INF/libraries/(Forge Documentation), and not including the file. All methods result the same. Here is the current build.gradle file
  12. From my Mod file: @EventHandler public void postInit(FMLPostInitializationEvent event){ ClientNetworkHandler.init(); Lists.changedConfig(); } Amended ClientNetworkHandler: public static void init () { INSTANCE.registerMessage(PlayerPermisionPacket.Handler.class, PlayerPermisionPacket.class, 0, Side.CLIENT); } Did not change: The packet is sent when a player joins the world [05:43:13] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Player641 joined the game [05:43:13] [Server thread/ERROR] [FML]: FMLIndexedMessageCodec exception caught io.netty.handler.codec.EncoderException: java.lang.RuntimeException: Undefined discriminator for message type PlayerPermisionPacket in channel weissalbedo at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:106) ~[MessageToMessageEncoder.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[MessageToMessageCodec.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[AbstractChannel.class:4.1.9.Final] at net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper.sendTo(SimpleNetworkWrapper.java:250) [SimpleNetworkWrapper.class:?] at weissmoon.albedo.PlayerConnectedClient.onPlayerJoinWorldEvent(PlayerConnectedClient.java:30) [PlayerConnectedClient.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_25_PlayerConnectedClient_onPlayerJoinWorldEvent_PlayerLoggedInEvent.invoke(.dynamic) [?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerLoggedIn(FMLCommonHandler.java:574) [FMLCommonHandler.class:?] at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:228) [PlayerList.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:259) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:72) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:208) [NetworkDispatcher$1.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:197) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] Caused by: java.lang.RuntimeException: Undefined discriminator for message type PlayerPermisionPacket in channel weissalbedo at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.encode(FMLIndexedMessageToMessageCodec.java:72) ~[FMLIndexedMessageToMessageCodec.class:?] at io.netty.handler.codec.MessageToMessageCodec$1.encode(MessageToMessageCodec.java:67) ~[MessageToMessageCodec$1.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:88) ~[MessageToMessageEncoder.class:4.1.9.Final] ... 25 more
  13. package weissmoon.albedo.network; import io.netty.buffer.ByteBuf; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import weissmoon.albedo.ClientProxy; import weissmoon.albedo.PermissionHandler; /** * Created by Weissmoon on 2/14/18. */ public class PlayerPermisionPacket implements IMessage { public boolean items; public boolean players; public boolean world; protected static int os; @Override public void fromBytes(ByteBuf buf) { players = buf.readBoolean(); items = buf.readBoolean(); world = buf.readBoolean(); } @Override public void toBytes(ByteBuf buf) { buf.writeBoolean(players); buf.writeBoolean(items); buf.writeBoolean(world); } public static class Handler implements IMessageHandler<PlayerPermisionPacket, IMessage> { @Override public IMessage onMessage(PlayerPermisionPacket message, MessageContext ctx) { PermissionHandler.handleServerPermisionPacket(message); return null; } } public int getOS(){ return os; } }
  14. I changed the fields. Split IMessageHandler and IMessage. ClientProxy.handleServerPermisionPacket(message); This method is only present on the client mod. But I still get the exception.
  15. I have always used a discriminator of 0 for my first packet in other mods and the packet always worked. Here is the packet and the server side PlayerConnect. package weissmoon.albedo.server.events; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; import weissmoon.albedo.server.ConfigurationHandlerServer; import weissmoon.albedo.server.network.NetworkHandler; import weissmoon.albedo.server.network.PlayerPermisionPacket; /** * Created by Weissmoon on 1/15/18. */ public class PlayerConnected { protected static PlayerPermisionPacket packet = new PlayerPermisionPacket(); @SubscribeEvent public void onPlayerJoinWorldEvent(PlayerEvent.PlayerLoggedInEvent event){ EntityPlayerMP player = (EntityPlayerMP) event.player; if(player.connection.getNetworkManager().isLocalChannel()) return; Boolean hasForge = player.connection.getNetworkManager().channel().attr(NetworkRegistry.FML_MARKER).get(); if(hasForge){ setupPackage(); NetworkHandler.INSTANCE.sendTo(packet, player); } } protected static void setupPackage(){ packet.players = ConfigurationHandlerServer.playerHeldServer; packet.items = ConfigurationHandlerServer.itemEntityServer; packet.world = ConfigurationHandlerServer.worldLightServer; } } package weissmoon.albedo.network; import io.netty.buffer.ByteBuf; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import weissmoon.albedo.ClientProxy; /** * Created by Weissmoon on 2/14/18. */ public class PlayerPermisionPacket implements IMessage, IMessageHandler<PlayerPermisionPacket, IMessage> { public static boolean items; public static boolean players; public static boolean world; @Override public void fromBytes(ByteBuf buf) { players = buf.readBoolean(); items = buf.readBoolean(); world = buf.readBoolean(); } @Override public void toBytes(ByteBuf buf) { buf.writeBoolean(players); buf.writeBoolean(items); buf.writeBoolean(world); } @Override public IMessage onMessage(PlayerPermisionPacket message, MessageContext ctx) { ClientProxy.handleServerPermisionPacket(this); return null; } }
  16. I have a client and a server mod, because I have a dependency for a client side only mod. I register the same packets on both sides using the same channel.
  17. Forge version 14.23.3.2672 changed something in network packet encoding, using my mod causes this non-fatal exception: [19:24:47] [Server thread/ERROR] [FML]: FMLIndexedMessageCodec exception caught io.netty.handler.codec.EncoderException: java.lang.RuntimeException: Undefined discriminator for message type PlayerPermisionPacket in channel weissalbedo I am not sure why this happens. This worked in previous versions. The packet was sent and processed successfully on the client. This is my ClientNetworkHandler class: package weissmoon.albedo.network; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.minecraftforge.fml.relauncher.Side; import weissmoon.albedo.Reference; /** * Created by Weissmoon on 2/14/18. */ public class ClientNetworkHandler { public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MOD_ID); public static void init () { INSTANCE.registerMessage(PlayerPermisionPacket.class, PlayerPermisionPacket.class, 0, Side.CLIENT); } } This is when my packet is sent: package weissmoon.albedo; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; import weissmoon.albedo.network.ClientNetworkHandler; import weissmoon.albedo.server.events.PlayerConnected; import java.util.ArrayList; import java.util.List; /** * Created by Weissmoon on 2/18/18. */ public class PlayerConnectedClient extends PlayerConnected { private static boolean[] pso = new boolean[4]; private static List<EntityPlayerMP> forgePlayers = new ArrayList<EntityPlayerMP>(1); @Override @SubscribeEvent public void onPlayerJoinWorldEvent(PlayerEvent.PlayerLoggedInEvent event) { EntityPlayerMP player = (EntityPlayerMP) event.player; Boolean hasForge = player.connection.getNetworkManager().channel().attr(NetworkRegistry.FML_MARKER).get(); if (hasForge) { PlayerConnected.setupPackage(); forgePlayers.add(player); ClientNetworkHandler.INSTANCE.sendTo(PlayerConnected.packet, player); } }
  18. Long story short I feel very incompetent. I have not modded Minecraft since 1.7, so coming back to a new rendering system was a little overwhelming. I had an item in 1.7 that was a simple .obj model then rendered with a custom colour from my item class and a transparent texture. I was wondering if there was someone that could guide me to be able to do this again. I have looked around quite a bit but have not been able to find anything on how to do this properly.

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.