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.

warjort

Members
  • Joined

  • Last visited

Everything posted by warjort

  1. I do so see you trying to use optifine on the server which is pointless. All it will do is potentially break things there. ๐Ÿ™‚
  2. Look at DyeItem.interactLivingEntity() or one of the other vanilla items for the correct pattern. In particular pay attention to the use of isClientSide/sidedSuccess(). I think your code only modifies the capability on the client?
  3. Look at what ForgeMod does for its attributes.
  4. https://forge.gemwire.uk/wiki/Making_Entities
  5. I don't see how the relevant code for your question even compiles? @Override public InteractionResult useOn(UseOnContext pContext) { System.out.println("TEST"); // level is not defined here return InteractionResult.sidedSuccess(level.isClientSide()); } Please show the real code, preferably by uploading it to github so we can try it for ourselves, but at least see all the relevant context.
  6. Have a look at DynamicTexture/NativeImage for creating dynamic textures. You can see how to register the result (give it a ResourceLocation) with the TextureManager in for example PackSelectionScreen.loadPackIcon() Once that is done, you can blit() it onto the screen like any other texture. Look at for example BookViewScreen.render() for the some blit() code, which also renders some text - font.draw(). From your description, it sounds like the code for minecraft Map items would be more relevant, e.g. MapRenderer? But that is more complex since it handles rendering the map in the player's hand. How to show screens is a question that has been asked a million times in these forums. So you can use search for all the alternatives. But it is basically Minecraft.getInstance().setScreen() from your chosen interaction method.
  7. Looks like a known issue? https://github.com/stepsword/potionidpacketfixer/issues/1
  8. The stacktrace is Caused by: java.lang.IndexOutOfBoundsException: readerIndex(7) + length(4) exceeds writerIndex(7): PooledUnsafeDirectByteBuf(ridx: 7, widx: 7, cap: 7) at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442) ~[netty-all-4.1.68.Final.jar%2327!/:4.1.68.Final] at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:809) ~[netty-all-4.1.68.Final.jar%2327!/:4.1.68.Final] at net.minecraft.network.FriendlyByteBuf.readInt(FriendlyByteBuf.java:949) ~[client-1.18.2-20220404.173914-srg.jar%23218!/:?] at net.minecraft.network.protocol.game.ClientboundUpdateMobEffectPacket.handler$zpa000$readTail(ClientboundUpdateMobEffectPacket.java:533) ~[client-1.18.2-20220404.173914-srg.jar%23218!/:?] at net.minecraft.network.protocol.game.ClientboundUpdateMobEffectPacket.<init>(ClientboundUpdateMobEffectPacket.java:51) ~[client-1.18.2-20220404.173914-srg.jar%23218!/:?] at net.minecraft.network.ConnectionProtocol$PacketSet.m_178327_(ConnectionProtocol.java:419) ~[client-1.18.2-20220404.173914-srg.jar%23218!/:?] at net.minecraft.network.ConnectionProtocol.m_178321_(ConnectionProtocol.java:471) ~[client-1.18.2-20220404.173914-srg.jar%23218!/:?] at net.minecraft.network.PacketDecoder.decode(PacketDecoder.java:32) ~[client-1.18.2-20220404.173914-srg.jar%23218!/:?] at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507) ~[netty-all-4.1.68.Final.jar%2327!/:4.1.68.Final] at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446) ~[netty-all-4.1.68.Final.jar%2327!/:4.1.68.Final] Which shows it is a problem with MobEffects. There is a mixin in that stacktrace modifying the packet handling which appears to be from the potionidpacketfixer mod
  9. It is both since we don't know from that error message which side the error occurs. For the client it depends which launcher you are using. For the vanilla launcher: Launcher -> Installations -> Edit the Forge Profile you are using -> More Options -> Add the Argument to the JVM Arguments For curseforge there is an "Additional Arguments" in the minecraft settings. For the server you put it in the user_jvm_args.txt
  10. One of your mods has broken network code. There is nothing in the log or the error message you show that suggests which one. Check you have the latest versions of your mods. You can try adding the following system property to your java/jvm parameters to see if it gives more information in a full stacktrace for that DecoderException -Dforge.logging.mojang.level=debug Otherwise you will have to experiment with removing mods or search your mod's issues pages for known issues.
  11. warjort replied to Jostend's topic in Mods
    https://forge.gemwire.uk/wiki/Biome_Modifiers or https://forums.minecraftforge.net/topic/115928-1182-error-trying-to-register-a-custom-feature-based-on-kelpfeature-solved/#comment-512366
  12. https://forums.minecraftforge.net/topic/117131-health-bar-removing/#comment-516182
  13. remove the entity culling and legendary tooltips mods from the server, they are broken client side only mods.
  14. Issue with placebo trying to modify the anvil block. But you are using minecraft 1.19.2 and placebo doesn't have a 1.19 release: https://www.curseforge.com/minecraft/mc-mods/placebo/files
  15. Not my area of expertise, but the error means you are pushing matrices onto the PoseStack and then not pop()ing them. I can see your applyTransform() looks like you copied it from 1.18.2's IForgeBakedModel/ForgeHooksClient.handlePerspective() But if you look at the 1.19.2 version of this code, IForgeBakedModel.applyTransform() that you override, it calls ItemTransform.apply() that applies the transform without a push().
  16. Yes I noticed that and changed my response. It's still impossible to keep track of and answer a thread that is a random collection of unrelated questions. Being in the same mod does not make them the same topic.
  17. Start new threads for new questions and don't mix topics. This thread is already way too long.
  18. It looks like you get this error when the game tries to load an entity from disk but the game can't find the EntityType. In this case the id for the EntityType in the saved data isn't even present. It should be giving an error message like: Skipping Entity with id modid:entity So we don't even know which mod is causing the problem. I can think of 2 ways to find the problem mod. 1) Use something like NBTExplorer to look at the chunk data for that area and see if you can identify the entities are not getting saved properly and if they have any clue to which mod they belong to. 2) Experiment with removing mods until you find the problem one. Backup the world first. But You should be able to do this experiment in a single player copy of your world.
  19. Please don't post text as images and post the full debug.log But, your error screen above tells you which byg config files are broken. e.g. config/byg/trades.json5 If you can't figure out how to fix it, contact the mod author.
  20. Download the correct version of optifine for the version of forge you are using.
  21. This is not a teaching forum. It is a support forum. Use the minecraft source code to find examples close to what you want to do. When you have specific problems/questions you can come back to this forum. But we are not going to write your mod for you.
  22. We don't have any psychic powers. If you don't show the details of what you have actually done we can't help you.
  23. This is how I got your requirements to work: @Mod.EventBusSubscriber(modid = ExampleMod.MODID) public class Events { @SubscribeEvent public static void startFires(LeftClickBlock event) { var itemStack = event.getItemStack(); if (itemStack.is(ExampleMod.MY_SWORD.get())) { var minecraft = Minecraft.getInstance(); BlockHitResult blockhitresult = (BlockHitResult) minecraft.hitResult; minecraft.gameMode.useItemOn(minecraft.player, minecraft.level, event.getHand(), blockhitresult); event.setCanceled(true); } } } Then I just copied the flint and steel useOn() code into my sword item. I still think this is kind of an abuse of that event though.

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.