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

    Mixins (the version of the item that is actually used in that code) are not supported in this forum.

    If you want support/help you need to be using the forge and vanilla api.

     

    On the java file you link, that doesn't work because your UUIDs are broken. Here's a simple java program to generate valid ones:

    package whatever;
    
    import java.util.UUID;
    
    public class UUIDGen {
      public static final void main(String[] args) {
        System.out.println(UUID.randomUUID());
      }
    }

    When I change your item to use valid UUIDs, and make the callback somewhat more standard, it works for me.

    static UUID BeyonderItemEntity = UUID.fromString("4bdfbc79-9e09-4111-8012-199025111273");
    static UUID BeyonderItemBlock = UUID.fromString("487c4613-122f-44de-ae1e-70efb1e031d8");
    
    -- snip --
    
        public InteractionResult interactLivingEntity(ItemStack pStack, Player pPlayer, LivingEntity pInteractionTarget, InteractionHand pUsedHand) {
            if (!pPlayer.level().isClientSide && pUsedHand == InteractionHand.MAIN_HAND) {
                pPlayer.sendSystemMessage(Component.literal("Interacted with " + pInteractionTarget.getClass().getSimpleName()));
            }
            return InteractionResult.sidedSuccess(pPlayer.level().isClientSide);
        }

    Including being able to break blocks at extended range.

     

     

  2. ·

    Edited by warjort

    Quote

    -Dlog4j.configurationFile=/Users/********/Documents/curseforge/minecraft/Install/assets/log_configs/client-1.12.xml net.fabricmc.loader.impl.launch.knot.KnotClient

    You are using fabric, these are the Forge support forums.

     

    The actual error is in the java vritual machine. A SIGBUS bus error which probably means some kind of memory corruption?

    You should report it to them using the link in that crash:

    Quote

    # A fatal error has been detected by the Java Runtime Environment:

    -- snip --

    # If you would like to submit a bug report, please visit:

    # https://aka.ms/minecraftjavacrashes

    or try a different java implementation, e.g. https://adoptium.net/en-GB/temurin/releases/?os=mac&version=17

  3. Quote

    org.spongepowered.asm.mixin.injection.throwables.InjectionError: LVT in net/minecraft/client/renderer/texture/AtlasTexture::func_229220_a_(Lnet/minecraft/resources/IResourceManager;Ljava/util/stream/Stream;Lnet/minecraft/profiler/IProfiler;I)Lnet/minecraft/client/renderer/texture/AtlasTexture$SheetData; has incompatible changes at opcode 163 in callback watut.mixins.json:client.TextureAtlasPrepareToStitch->@Inject::prepareToStitch(Lnet/minecraft/resources/IResourceManager;Ljava/util/stream/Stream;Lnet/minecraft/profiler/IProfiler;ILorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;Ljava/util/Set;)V.

    Issue with the watut mod.

    Quote

    |watut-forge-1.16.5-1.0.14.jar |What Are They Up To |watut

    Check you have latest version then contact the mod author.

     

    NOTE: 1.1.6.5 is no longer supported in this forum:

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

  4. For completeness (in case somebody does use search in future and finds this thread):

    If you can't get jarInJar to work, you can always try shading, e.g.

    https://imperceptiblethoughts.com/shadow/introduction/

    this is the old method people used before jarInJar and is still commonly used.

     

    Or you can fork that jython project to add a META-INF/mods.toml to it which will turn the jar into a mod.

    https://docs.minecraftforge.net/en/latest/gettingstarted/modfiles/

    e.g. this is how this mod adds javascript support to minecraft by forking mozilla's rhino

    https://github.com/KubeJS-Mods/Rhino

  5. If you want help you need to post more than snippets out of context.

    Put something on github so we can see the whole thing.

     

    But I guess you didn't actually read the documentation.

    Quote

    Jar-In-Jar is a completely optional system. To enable it, you need to call `jarJar.enable()`

    https://github.com/Creators-of-Create/Create/blob/a41053b8966edf7bd9732223b18f783fdb52521d/build.gradle#L25

     

    There maybe other you things you need to do depending upon what jar you include and its dependencies. Again read the docs.

     

    Also

    Quote

    implementation fg.deobf('org.python:jython-standalone:2.7.3')

    this says forge should deofuscate that jar. But since it is not a minecraft mod (unlike the examples from create) there is no need to do that.

    This is the main wiki guide for dependencies, but you should also read the main gradle docs.

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

     

    All these issues have been discussed many many times before in this forum.

    Please try to use the search function instead of posting repeat questions.

  6. Quote

    java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
        at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?] {}
        at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?] {}
        at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?] {}
        at java.util.Objects.checkIndex(Objects.java:361) ~[?:?] {}
        at java.util.ArrayList.get(ArrayList.java:427) ~[?:?] {}
        at com.pixelmonmod.pixelmon.client.models.smd.SmdAnimation.precalculateAnimation(SmdAnimation.java:221) ~[Pixelmon-1.20.2-9.2.6-universal.jar%23168!/:9.2.6-pipe22672] {re:classloading}

    Issue with pixelmon's animation code.

    Check you have the latest version then contact the mod author.

  7. 8 hours ago, Rfailes Dev said:

    I have searched for a solution, but I could not find anything that works for me.

    what im doing wrong?(Mb I imported this wrong?)

    But you didn't search this forum. Because this question has been asked many times before.

     

    Adding a gradle dependency will make the jar available at compilet time but it won't load the jar into forge.

    Forge will only load jars that are mods.

    You need to turn that jar into a mod.

    Or include that jar within your mod. Either using https://forge.gemwire.uk/wiki/Jar-in-Jar or as mentioned on that link use one of the gradle plugins that does shading/creates "uber jars".

     

    e.g. this is the create mod using jarInJar

    https://github.com/Creators-of-Create/Create/blob/a41053b8966edf7bd9732223b18f783fdb52521d/build.gradle#L168

  8. I gave you a link to other mods doing it above.

    And as I said before, there are many other discussions about it in this forum.

     

    Also, you spent less than 20 minutes from my previous answer trying to understand what you need to do.

    This is a support forum, it does not exist for you to proxy the work of writing your mod to us.

     

    Feel free to come back and ask questions after you have tried to write some code and get stuck.

    But you need to post more than a 5 line code snippet out of context (like you did above) if you want help.

    You need to put a reproducable example of your problem on github.

  9. ·

    Edited by warjort

    Why are you setting the base value?

    That will just lead to incompatiblities with other mods that (incorrectly) do the same thing.

    Or you will write over any change a modpack developer (or server owner) wants to make globally for all players.

     

    You should add a +2.5 modifier, then you will always get the correct effect regardless of what other mods do.

  10. ·

    Edited by warjort

    See also:

    https://github.com/MinecraftForge/MinecraftForge/blob/817e20821d04225e2b39e2ce64be9b70c8ddfa27/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java#L125

    But I don't think you need it for this usecase?

    You do have the

    Quote

    Note that handling things differently on the client vs server may cause desynchronizations!

     

  11. Your question is unanswerable.

    If you want help with your code, you need to put something on github that reproduces the problem.

    We need to see everything in context and maybe run it for ourselves if the issue is not obvious.

     

    Guess (I shouldnt have to guess):

    Since this sounds like a ghost block getting created on the client and it sounds like it works properly on the server?

    You are not returning the correct InteractionResult from the client side Item.useOn(), so the game goes onto the next step

    which is to "simulate" the placing of the block for a BlockItem giving the player instant feedback.

    Since the server side does have the correct code, the change to the block entitiy's inventory causes a chunk update to be sent to the client which won't have that placed block

    and so the ghost block then disappears.

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.