warjort
Members-
Posts
5420 -
Joined
-
Last visited
-
Days Won
175
Everything posted by warjort
-
Minecraft Crashes so Weirdly when I made a Minecraft Mod
warjort replied to Aaron Schneider's topic in Modder Support
Mixin questions are not answered here. You might be able to get an answer on the #non-api-modding Channel of the forge discord. But you will need to post more information than that stacktrace to get an answer. -
https://johann.loefflmann.net/en/software/jarfix/index.html
-
Not something I know anything about. But I guess you want to use ForgeMod.ATTACK_RANGE (attack distance) instead of REACH_DISTANCE (block interactions)?
-
Gradle build error: Unsupported class file major version 63
warjort replied to arungupta's topic in Support & Bug Reports
Use java 17 -
You can't do it like that. Other registrations are not registered yet when the items get registered (blocks and items get registered first). https://forge.gemwire.uk/wiki/Registration You need to defer your default attributes construction until after the attributes are registered. e.g. using com.google.common.base.Suppliers to memoise it something like this (untested) code: private Supplier<Multimap<Attribute, AttributeModifier>> toolAttributes = Suppliers.memoize(this::createDefaultAttributes); private Multimap<Attribute, AttributeModifier> createDefaultAttributes() { ImmutableMultimap.Builder<Attribute, AttributeModifier> builder = ImmutableMultimap.builder(); builder.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Weapon modifier", this.attackDamage, AttributeModifier.Operation.ADDITION)); builder.put(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_UUID, "Weapon modifier", speed, AttributeModifier.Operation.ADDITION)); builder.put(ForgeMod.REACH_DISTANCE.get(), new AttributeModifier(ATTACK_REACH_MODIFIER, "Weapon modifier", reach, AttributeModifier.Operation.ADDITION)); return builder.build(); } then use this.toolAttributes.get() which will create it the first time you use it.
-
You don't have an answerable question. All you say is something about your code doesn't work. The code you do show references other code you don't show and lacks context, so we can't even reverse engineer (guess) what your problem is. For a question about capabilities, you don't even show yours. One way to get people not to ignore your question is to put your code on github where they can run it for themselves (and see all the relevant code). But if you don't clearly define what the problem is, nobody can help you. "Please find the bug somewhere in this random code I wrote", is question that won't attract many answers.
-
[1.18.2] Game crashes on 0% while trying to create a world
warjort replied to radicalrigbone's topic in Mods
Now you have an issue with what I would guess is the immersive fx mod? Probably conflicting with optifine? -
See for example BlockItem.canFitInsideConstainerItem() or ShulkerBoxBlockEntity.canPlaceItemThroughFace() for how this recursion is stopped for shulker boxes. There are a number of different "hidden" limits on saved/networked data. The most notable is java's DataOutput.writeUTF() limit of 65535 for a String (really half that since String characters can be 2 bytes). You probably won't run into any of these of limits unless you are not being sensible.
-
[Solved]Cannot get config value before config is loaded.
warjort replied to Li jinhong's topic in Modder Support
Configs are not available during mod initialisation. You access configs during Common/ClientSetup and later. https://forge.gemwire.uk/wiki/Stages_of_Modloading -
[1.18.2] Game crashes on 0% while trying to create a world
warjort replied to radicalrigbone's topic in Mods
Download the correct version of optifine for the version of forge you are using. -
Create and register your own subclass of ShapedRecipe/Serializer and override the Recipe.matches() to not do the mirrored check. Example from a different thread that overrides the assemble() instead of matches() https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/f171406e5ab59ac33e43c19a76109b584cfefe4c/src/main/java/choonster/testmod3/world/item/crafting/recipe/ShapedArmourUpgradeRecipe.java
-
https://forge.gemwire.uk/wiki/Capabilities/Attaching
-
[1.18.2] Adding Recipe Type To Crafting Table
warjort replied to MultiCoder's topic in Modder Support
Your Recipe needs to extends CraftingRecipe look at RecipeType.CRAFTING used by CraftingMenu. -
This is a crash in the java virtual machine, you need to report it on the link suggested: http:// https://bugreport.java.com/bugreport/crash.jsp
-
Increase arrow entity speed and bow draw speed.
warjort replied to Darkorg69's topic in Modder Support
I think your problem is caused by the ClientBoundSetEntityMotionPacket which clamps the maximum delta at +/- 3.9d Obviously, the same clamp doesn't happen to the real data on the server so there is an inconsistency. -
Not my area of expertise, but it looks like the NetherPortal code is "spread out". First you have NetherPortalBlock.entityInside() that sets the isInsidePortal flag for the entity. Then you have LocalPlayer.handleNetherPortalClient() that controls the timer. The timer is then used in GameRenderer.render() for renderConfusionOverlay(), GameRenderer.renderLevel() and (Forge)Gui.renderPortalOverlay() I'll leave it you to decide how much of this you can reuse. The latter is what you should be overriding for your overlay, see for example: https://forums.minecraftforge.net/topic/115993-how-to-remove-the-sight-cross-in-the-center-of-the-screen/#comment-512655 except you want VanillaGuiOverlay.PORTAL and to actually draw something, not just cancel the event.
-
Increase arrow entity speed and bow draw speed.
warjort replied to Darkorg69's topic in Modder Support
Try setting arrow.hasImpulse = true after you change the velocity. If you look at ServerEntity.sendChanges() that should cause it to send an update packet instead of waiting 20 ticks (the arrow's updateInterval). -
1.19.2 Server crashing due to Exception in server tick loop (FORGE)
warjort replied to Valorio's topic in Modder Support
Looks like an issue with the apoli mod, contact the mod author. -
Enough. You need to spend more than 5 minutes researching this. Instead of expecting us to write your mod for you. e.g. look at how the 2x2 crafting grid works in InventoryMenu
-
You need to use the RecipeManager serverLevel.getServer().getRecipeManager() to find the Crafting(Shapeless)Recipe for the logs you have (assuming there is one). That is the only thing that associates logs with planks.
-
(Re)read what I wrote above about recipes.