Skip 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

Posts posted by warjort

  1. ·

    Edited by warjort

    If you want help with your code, put a reproducable example of your problem on github.

    Not random and incomplete code snippets out of context in this forum.

    We need to see how the code fits together and maybe try it for ourselves if the problem is not obvious

     

    I am not very familiar with inventoryTick and what rules apply to it. It is mostly used by Mojang to do animation related stuff on the client,

    But one place they do use it on the server is to update MapItem information. This does not modify the actual item, instead it updates information stored elsewhere.

     

    It would not suprise to learn that modifying an ItemStack while the game is iterating over the inventory causes it to become very confused.

    The tags on an ItemStack form part of its "identity".

    But I don't know that for sure.

  2. ·

    Edited by warjort

    It is very tiresome posting this on every thread in this forum:

     

    If you want help with your code, put a reproducable example of your problem on github.

    Not random and incomplete code snippets out of context in this forum.

    We need to see how the code fits together and maybe try it for ourselves if the problem is not obvious.

     

    I don't actually know because I never tried it, but I bet using EntityType.spawn() for an experience orb sets the experience value to 0?

    You should create the ORB yourself and then call serverLevel.addFreshEntity().

    See for example Animal.finalizeSpawnChildFromBreeding()

     

    For you other question, maybe?

    if pTarget instanceof Monster

    or maybe you want to get check if the mob is targetting the player using Entity.getTarget ?

     

     

  3. Quote

    Put a reproducable example of your problem on github.

    That means put the build of a project on github that demonstrates the issue.

    Not random and incomplete code snippets out of context.

    We need to see how the code fits together and maybe try it for ourselves if the problem is not obvious.

     

    Anyway, If that really is all your code, you are missing the EntityAttributeCreationEvent for your mob.

    https://forge.gemwire.uk/wiki/Making_Entities#Entity_Attributes

    You seem to have a static method for this called setAttributes() in your code - but I guess nothing calls it?

  4. ·

    Edited by warjort

    You cannot access config during registration.

    https://forge.gemwire.uk/wiki/Stages_of_Modloading

    https://forge.gemwire.uk/wiki/Configs

    Quote

    NOTE: Forge will only update the values of your config fields in code after the registry events are finished. Therefore, you should only attempt to grab the config values after the registry events are completed. (FMLCommonSetupEvent and later are safe)

     

    As I said on your hijack of the other thread, this question has been asked and answered many times before.

    You can use search instead of posting repeat questions.

     

    In your case, that config needs to be a server config so that client and server agree on what the durability is. Otherwise you will get inconsistencies.

     

    Basicially the value won't be known until the player joins the server, either loading a world in single player world or joining a remote server.

    That also means different single player worlds can set different values (like how game rules work).

     

    In your registration of the item you should set it some default value so the game knows the item has durablity.

    It does not matter what value you set as long as it not zero which would mean the item has no durability.

    That value won't actually be used because you have overridden the method to get the value from somewhere else.

  5. ·

    Edited by warjort

    Those are the old forge names from minecraft/forge 1.16 and before.

    You want mojang official names for those classes which Forge switched to by default in 1.17

    PlayerEntity -> ServerPlayer

    World -> Level

     

    If you are going to use tutorials you need to make sure they are for the version you are developing with.

    Mojang tend to have lots in "churn" in their codebase.

     

    I believe there used to be a bot on Forge's discord that let you look up the changed name to help people migrate from 1.16 to 1.17

    If it still exists (I don't use discord so don't know) it is probably out of date by now but might still have some use?

     

  6. There is no error in that log.

    But I can see you are using optifine as well.

    You can't use optifine/rubidium/embedium together.

    You have to choose one major graphics overhaul mod.

     

    If you are just dumping large numbers of random mods in your mods folder don't do that.

    Add mods individually or in small groups and test them so you know which mods cause problems.

  7. Please don't dump code snippets in the forum.

    Post complete reproducable examples to github so we can see everything in context.

    e.g. you don;t show your item code that triggers all this

     

    You shouldn't need to do any custom networking for this unless your processing is none standard.

    That item "use" method should get called on both the client and server.

     

    From the server you can use ServerLevel.sendParticles()

    See for example PotionItem.useOn() which calls sendParticles when isClientSide is false - there are many other examples in the vanilla code

     

    https://forge.gemwire.uk/wiki/Particles#Spawning_Particles

     

    To answer exact question:

    Players are Entitys. Minecraft serializes them over the network using their entityId.

    But the player is often implicit in the connection. Its only when another player is referenced that these ids get sent.

  8. ·

    Edited by warjort

    I know little about BlockBench, but I suspect what you have done is create a model for an optifine only feature?

    e.g. your model files look very similar to these: https://github.com/moonbutters/ConeyHatPack/tree/main/assets/minecraft/optifine/cit

     

    If you don't want to make your item into a helmet which will use the rendering for the builtin armor model

    and you still want to use those models,

    then you will have to render the hat yourself using an EntityRenderer layer.

     

    See for example vanilla's CustomHeadLayer that renders skulls when players wear them.

    You use this event to register new layers.

    https://github.com/MinecraftForge/MinecraftForge/blob/817e20821d04225e2b39e2ce64be9b70c8ddfa27/src/main/java/net/minecraftforge/client/event/EntityRenderersEvent.java#L121

    NOTE: For players you add layers to each skin's EntityRenderer because there are different renderers for each skin type.

     

    You can also search github to see how other mods do custom hats:

    https://github.com/search?q=minecraft hat&type=repositories

    Maybe somebody has already written some code to render those models without using optifine?

  9. Quote

    --version fabric-loader-0.14.24-1.20.1

    You are using fabric. These are the Forge support forums.

     

    Your crash is in the java virtual machine, so you can report it to them:

    Quote

    # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffae038ea52, pid=8548, tid=12576 # # JRE version: OpenJDK Runtime Environment Microsoft-8035246 (17.0.8+7) (build 17.0.8+7-LTS) # Java VM: OpenJDK 64-Bit Server VM Microsoft-8035246 (17.0.8+7-LTS, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64) # Problematic frame: # V [jvm.dll+0x1bea52] # # No core dump will be written. Minidumps are not enabled by default on client versions of Windows # #

    If you would like to submit a bug report, please visit: # https://aka.ms/minecraftjavacrashes

    Or try a different java implementation.

     

    Although this is likely caused by memory corruption, e.g. by a buggy graphics driver. See the FAQ at the top of the forum for how to fix that.

  10. That error is usually caused by a mod having either broken network code or custom recipe serializers.

    It can also be caused by using mods for the wrong version of minecraft or different versions between client and server.

     

    Usually the only way to find the problem mod is to expermient with removing mods until the problem goes away.

    Backup your world before removing mods.

  11. ·

    Edited by warjort

    That's not the debug.log - Read the faq on how to find it.

     

    I would guess you are missing the epicfight mod required by the yamatomoveset from the error message?

    Quote

    Caused by: java.lang.ClassNotFoundException: yesman.epicfight.gameasset.Models at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:141) ~[securejarhandler-1.0.8.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at nameless.yamatomoveset.main.YamatoMoveset.<init>(YamatoMoveset.java:33) ~[yamatomoveset-18.0.6.jar%2387!/:18.0.6]

    https://www.curseforge.com/minecraft/mc-mods/epic-fight-yamato-moveset/relations/dependencies

     

    If that's not the case, you should check you have the latest versions of those mods then contact the mod authors.

     

    Note: 1.18.2 is no longer supported in these forums.

    https://forums.minecraftforge.net/topic/91712-supported-version-directory/

Important Information

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

Account

Navigation

Search

Search

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.