Jump to content

Modifier System


BURN447

Recommended Posts

So I'm making a modifier system, where I will be able to apply modifiers to tools. I'm trying to decide whether to do it using the enchantment system or modifying internal values. I've got a basic start with modifying base values, but because it is handled on a case by case basis, I can't get it all quite working using itemstacks vs Items. If anyone has any advice or idea on direction, I'd love to hear them.

Link to comment
Share on other sites

You must use ItemStacks. Items are singletons, there is only one protypical stick and all stacks of sticks refer to it for functionality.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

26 minutes ago, BURN447 said:

I was gathering that much, but I'm not sure how to edit the efficiency of a tool or such through the itemstack

 

4 hours ago, BURN447 said:

I'm making a modifier system

 

Your probably going to want to use Capabilities, they are well documented. Here's the rundown https://gist.github.com/williewillus/c8dc2a1e7963b57ef436c699f25a710d

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

2 hours ago, BURN447 said:

I was gathering that much, but I'm not sure how to edit the efficiency of a tool or such through the itemstack

You'll have to override the methods in your Item class, such as getDestroySpeed. These methods get passed the ItemStack. Look at ItemTool and friends.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • The game crashed whilst unexpected error Error: java.lang.NullPointerException: Unexpected error ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   TransformLoader (DynamicSurroundings-1.12.2-3.6.1.0.jar)   Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)   XaeroWorldMapPlugin (XaerosWorldMap_1.29.2_Forge_1.12.jar)   OpenModsCorePlugin (OpenModsLib-1.12.2-0.12.2.jar)   LoadingPlugin (ResourceLoader-MC1.12.1-1.5.3.jar)   CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)   XaeroMinimapPlugin (Xaeros_Minimap_23.2.0_Forge_1.12.jar) Contact their authors BEFORE contacting forge // I feel sad now :( Time: 3/25/23 2:27 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error     at xaero.map.core.XaeroWorldMapCore.onMinecraftRunTick(XaeroWorldMapCore.java:192)     at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1073)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)     at net.minecraft.client.main.Main.main(SourceFile:123)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Windows 10 (amd64) version 10.0     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 464818384 bytes (443 MB) / 1073741824 bytes (1024 MB) up to 8589934592 bytes (8192 MB)     JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2859 43 mods loaded, 43 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                 | Version                  | Source                                        | Signature                                |     |:----- |:------------------ |:------------------------ |:--------------------------------------------- |:---------------------------------------- |     | L     | minecraft          | 1.12.2                   | minecraft.jar                                 | None                                     |     | L     | mcp                | 9.42                     | minecraft.jar                                 | None                                     |     | L     | FML                | 8.0.99.99                | forge-1.12.2-14.23.5.2859.jar                 | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | L     | forge              | 14.23.5.2859             | forge-1.12.2-14.23.5.2859.jar                 | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | L     | xaerominimap_core  | 1.12.2-1.0               | minecraft.jar                                 | None                                     |     | L     | xaeroworldmap_core | 1.12.2-1.0               | minecraft.jar                                 | None                                     |     | L     | openmodscore       | 0.12.2                   | minecraft.jar                                 | None                                     |     | L     | ambientenvironment | 1.0.1                    | AmbientEnvironment-1.0.2.jar                  | None                                     |     | L     | appleskin          | 1.0.14                   | AppleSkin-mc1.12-1.0.14.jar                   | None                                     |     | L     | biomesoplenty      | 7.0.1.2445               | BiomesOPlenty-1.12.2-7.0.1.2445-universal.jar | None                                     |     | L     | chameleon          | 1.12-4.1.3               | Chameleon-1.12-4.1.3.jar                      | None                                     |     | L     | clumps             | 3.1.2                    | Clumps-3.1.2.jar                              | None                                     |     | L     | collective         | 3.0                      | collective-1.12.2-3.0.jar                     | None                                     |     | L     | ctm                | MC1.12.2-1.0.2.31        | CTM-MC1.12.2-1.0.2.31.jar                     | None                                     |     | L     | customspawner      | 3.11.4                   | CustomMobSpawner-3.11.5.jar                   | None                                     |     | L     | mocreatures        | 12.0.5                   | DrZharks MoCreatures Mod-12.0.5.jar           | None                                     |     | L     | dsurround          | 3.6.1.0                  | DynamicSurroundings-1.12.2-3.6.1.0.jar        | None                                     |     | L     | fastleafdecay      | v14                      | FastLeafDecay-v14.jar                         | None                                     |     | L     | fastbench          | 1.7.4                    | FastWorkbench-1.12.2-1.7.4.jar                | None                                     |     | L     | fossil             | 8.0.5                    | fossilsarcheology-8.0.6.jar                   | None                                     |     | L     | cfm                | 6.3.0                    | furniture-6.3.2-1.12.2.jar                    | None                                     |     | L     | hats               | 7.1.1                    | Hats-1.12.2-7.1.1.jar                         | None                                     |     | L     | waila              | 1.8.26                   | Hwyla-1.8.26-B41_1.12.2.jar                   | None                                     |     | L     | ichunutil          | 7.2.2                    | iChunUtil-1.12.2-7.2.2.jar                    | None                                     |     | L     | inventorypets      | 2.0.15                   | inventorypets-1.12-2.0.15.jar                 | None                                     |     | L     | inventorytweaks    | 1.63+release.109.220f184 | InventoryTweaks-1.63.jar                      | None                                     |     | L     | jei                | 4.16.1.1001              | jei_1.12.2-4.16.1.1001.jar                    | None                                     |     | L     | mantle             | 1.12-1.3.3.55            | Mantle-1.12-1.3.3.55.jar                      | None                                     |     | L     | mca                | 6.1.0                    | MCA-1.12.2-6.1.0-universal.jar                | None                                     |     | L     | openblocks         | 1.8.1                    | OpenBlocks-1.12.2-1.8.1.jar                   | None                                     |     | L     | openmods           | 0.12.2                   | OpenModsLib-1.12.2-0.12.2.jar                 | None                                     |     | L     | harvestcraft       | 1.12.2zb                 | Pam's+HarvestCraft+1.12.2zg.jar               | None                                     |     | L     | simplerecipes      | 1.12.2c                  | Pam's+Simple+Recipes+1.12.2c.jar              | None                                     |     | L     | reskin             | 1.2.0                    | reskin-1.2.0.jar                              | None                                     |     | L     | resourceloader     | 1.5.3                    | ResourceLoader-MC1.12.1-1.5.3.jar             | None                                     |     | L     | simpleminingdrills | 1.4.0                    | simpleminingdrills+1.12.2.jar                 | None                                     |     | L     | tconstruct         | 1.12.2-2.13.0.183        | TConstruct-1.12.2-2.13.0.183.jar              | None                                     |     | L     | tinkersjei         | 1.2                      | tinkersjei-1.2.jar                            | None                                     |     | L     | travelersbackpack  | 1.0.35                   | TravelersBackpack-1.12.2-1.0.35.jar           | None                                     |     | L     | twilightforest     | 3.11.1021                | twilightforest-1.12.2-3.11.1021-universal.jar | None                                     |     | L     | xaerominimap       | 23.2.0                   | Xaeros_Minimap_23.2.0_Forge_1.12.jar          | None                                     |     | L     | xaeroworldmap      | 1.29.2                   | XaerosWorldMap_1.29.2_Forge_1.12.jar          | None                                     |     | L     | llibrary           | 1.7.20                   | llibrary-1.7.20-1.12.2.jar                    | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher TransformLoader (DynamicSurroundings-1.12.2-3.6.1.0.jar)    Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)   invtweaks.forge.asm.ContainerTransformer XaeroWorldMapPlugin (XaerosWorldMap_1.29.2_Forge_1.12.jar)   xaero.map.core.transformer.ChunkTransformer   xaero.map.core.transformer.NetHandlerPlayClientTransformer   xaero.map.core.transformer.EntityPlayerTransformer   xaero.map.core.transformer.AbstractClientPlayerTransformer   xaero.map.core.transformer.WorldClientTransformer   xaero.map.core.transformer.PlayerListTransformer   xaero.map.core.transformer.SaveFormatTransformer   xaero.map.core.transformer.BiomeColorHelperTransformer   xaero.map.core.transformer.MinecraftTransformer OpenModsCorePlugin (OpenModsLib-1.12.2-0.12.2.jar)   openmods.core.OpenModsClassTransformer LoadingPlugin (ResourceLoader-MC1.12.1-1.5.3.jar)   lumien.resourceloader.asm.ClassTransformer CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)   team.chisel.ctm.client.asm.CTMTransformer XaeroMinimapPlugin (Xaeros_Minimap_23.2.0_Forge_1.12.jar)   xaero.common.core.transformer.ChunkTransformer   xaero.common.core.transformer.NetHandlerPlayClientTransformer   xaero.common.core.transformer.EntityPlayerTransformer   xaero.common.core.transformer.AbstractClientPlayerTransformer   xaero.common.core.transformer.WorldClientTransformer   xaero.common.core.transformer.EntityPlayerSPTransformer   xaero.common.core.transformer.PlayerListTransformer   xaero.common.core.transformer.SaveFormatTransformer   xaero.common.core.transformer.GuiIngameForgeTransformer   xaero.common.core.transformer.GuiBossOverlayTransformer   xaero.common.core.transformer.ModelRendererTransformer     GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.6.0 Compatibility Profile Context 23.3.2.230315' Renderer: 'Radeon RX 560 Series'     Launched Version: 1.12.2-forge-14.23.5.2859     LWJGL: 2.9.4     OpenGL: Radeon RX 560 Series GL version 4.6.0 Compatibility Profile Context 23.3.2.230315, ATI Technologies Inc.     GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'fml,forge'     Type: Client (map_client.txt)     Resource Packs:      Current Language: English (US)     Profiler Position: N/A (disabled)     CPU: 12x Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz Idk what to do pls help
    • Hi I’m running same mod on a server and realized they are spawning in chests which I don’t want, if I were to edit this data pack to disable them spawning in chests how would I do that? Explain to me like I’m 8
    • every time i use play forge in the launcher it says game crashed unexpected issuse and when i use curseforge it also doesn't work
    • I've attempted to use Jarfix as well. I tried running a previous version (18.2) of Minecraft and added a few random popular mods and the crashing is persistent among the servers. 
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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