Jump to content

[1.20] Looking for an example of trees without data generation


Myxtro

Recommended Posts

I want to add trees to my mod but all the examples I've seen so far include data generation, and not json files. The json files for the blocks are not the issue here. Unless trees require certain json files as a structure, I'm certain I've got this part covered. The thing I'm looking for is probably a deferred register or any other way to register something as a tree so it will grow from a sapling. Here is what I currently have:

	public static final DeferredRegister<ConfiguredFeature<?, ?>> TREES =
                DeferredRegister.create(Registries.CONFIGURED_FEATURE, ExtinctionCraft.MOD_ID);

        // How do I register the tree?

        public static final ResourceKey<ConfiguredFeature<?, ?>> SEQUOIA_KEY = registerKey("sequoia");

        public static void bootstrap(BootstapContext<ConfiguredFeature<?, ?>> context) {
            register(SEQUOIA_KEY, Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder(
                    BlockStateProvider.simple(ModBlocks.SEQUOIA_LOG.get()),
                    new StraightTrunkPlacer(5, 4, 3),
                    BlockStateProvider.simple(ModBlocks.SEQUOIA_LEAVES.get()),
                    new PineFoliagePlacer(ConstantInt.of(3), ConstantInt.of(2), ConstantInt.of(3)),
                    new TwoLayersFeatureSize(1, 0, 2)).build());
        }

        public static ResourceKey<ConfiguredFeature<?, ?>> registerKey(String name) {
            return ResourceKey.create(Registries.CONFIGURED_FEATURE, new ResourceLocation(ExtinctionCraft.MOD_ID, name));
        }

        private static <FC extends FeatureConfiguration, F extends Feature<FC>> void register(BootstapContext<ConfiguredFeature<?, ?>> context,
                ResourceKey<ConfiguredFeature<?, ?>> key, F feature, FC configuration) {
            context.register(key, new ConfiguredFeature<>(feature, configuration));
        }

I also have this Grower class:

public class SequoiaGrower extends AbstractTreeGrower {
    @Nullable
    @Override
    protected ResourceKey<ConfiguredFeature<?, ?>> getConfiguredFeature(RandomSource pRandom, boolean pHasFlowers) {
        return ModConfiguredFeatures.SEQUOIA_KEY;
    }
}

And the registry of the blocks that make up the tree (excluding wood blocks that I have registered but that don't make up part of a tree):

        public static final RegistryObject<Block> SEQUOIA_LOG = registerBlock("sequoia_log",
                () -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LOG).strength(3)));
        public static final RegistryObject<Block> SEQUOIA_LEAVES = registerBlock("sequoia_leaves",
                () -> new ModLeavesBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LEAVES)));
        public static final RegistryObject<Block> SEQUOIA_SAPLING = registerBlock("sequoia_sapling",
                () -> new SaplingBlock(new SequoiaGrower(), BlockBehaviour.Properties.copy(Blocks.OAK_SAPLING)));

 

How do I move on from here? Examples of your code are welcome too.

Link to comment
Share on other sites

https://gist.github.com/InvictusSlayer/a8acb91b89d844d95f607327896abbd6

Here's an example from my mod where I added Aspen trees. You can replace the values with the foliage, leaves, logs, trunk and any numbers you may want to change. Make sure your file is in "resources/data/modid/worldgen/configured_feature" and name it the same as your key ("sequoia.json").

The DeferredRegister and bootstrap() methods you added are redundant but other than that you're all good - the DeferredRegister is how you would store an object but that isn't necessary here since the game calls the tree instance from the data (in your case `SEQUOIA_KEY`); and bootstrap is the method that your data generator would call hence unneeded here.

Essentially Minecraft does not register features like trees (along with others) the same way it does with blocks and items.

I would highly recommend using datagen as that bootstrap method would just make the "sequoia.json" file for you. Besides that nice job and keep at it :)

  • Like 1
Link to comment
Share on other sites

@InvictusSlayer I can't thank you enough! This was just what I needed. Thanks for the proper explaination as well, you are the best.

Now that my trees can finally grow, I'm stuck with only one issue. The leaves don't have correct colors. I made them grey like the default tree textures and was hoping I could find a few to make them colored, but I haven't found something yet. Do you happen to have an example of that as well?

  • Like 1
Link to comment
Share on other sites

Ah that'll be to do with the block model .json file for your leaves. I haven't implemented the tinting leaves personally but I think you'll need to change the "parent" from:

"parent": "minecraft:block/cube_all"

to:

"parent": "minecraft:block/leaves"

I intend to try the tint system in the near future so I'll amend this at some point if I'm wrong. Otherwise I'd just recommend colouring the leaf textures manually. Good luck!!

Link to comment
Share on other sites

@InvictusSlayer Thanks! Sadly that didn't solve it. 

I went looking through the vanilla code and found the BlockColors class which seems to set the colors of the leaves. I still have to figure out how to replicate this in a mod though but I thought you might want to know in case you want to look for yourself. If I happen to figure it out I'll reply to this thread.

  • Like 1
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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

    • Add crash-reports with sites like https://paste.ee/   Remove the mod Augmented Interactions (auginter-1.1.0-1.12.x.jar)
    • It departs in 10 minutes ---- Minecraft Crash Report ---- WARNING: coremods are present:   LoadingPlugin (Bloodmoon_MC1.12.2_1.5.3.jar)   EntityCullingPlugin (entityculling-1.12.2-6.4.3.jar)   Inventory Tweaks Coremod (inventorytweaks-1.64dev.151.jar)   SurgeLoadingPlugin (surge-1.12.2-2.0.77.jar)   Do not report to Forge! (If you haven't disabled the FoamFix coremod, try disabling it in the config! Note that this bit of text will still appear.) (foamfix-0.10.15-1.12.2 (1).jar)   CorePlugin (SmoothFont-mc1.12.2-2.1.4.jar)   XaeroWorldMapPlugin (XaerosWorldMap_1.37.7_Forge_1.12.jar)   CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)   SSLoadingPlugin (sereneseasons-1.12.2-1.2.18-universal.jar)   Born in a Barn (borninabarn1.8-1.12-1.2.jar)   RenderLibPlugin (renderlib-1.12.2-1.3.4.jar) Contact their authors BEFORE contacting forge // I let you down. Sorry Time: 3/5/24 8:58 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error     at com.pau101.auginter.client.interaction.InteractionHandler.rightClickMouse(InteractionHandler.java:91)     at com.pau101.auginter.client.ClientProxy$1.func_151468_f(ClientProxy.java:52)     at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2252)     at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2020)     at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1808)     at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1098)     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(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28)     at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)     at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)     at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace:     at com.pau101.auginter.client.interaction.InteractionHandler.rightClickMouse(InteractionHandler.java:91)     at com.pau101.auginter.client.ClientProxy$1.func_151468_f(ClientProxy.java:52)     at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2252)     at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:2020) -- Affected level -- Details:     Level name: MpServer     All players: 1 total; [EntityPlayerSP['Its_Nismo'/1679, l='MpServer', x=265.43, y=61.65, z=261.49]]     Chunk stats: MultiplayerChunkCache: 287, 287     Level seed: 0     Level generator: ID 00 - default, ver 1. Features enabled: false     Level generator options:      Level spawn location: World: (128,64,248), Chunk: (at 0,4,8 in 8,15; contains blocks 128,0,240 to 143,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)     Level time: 13350 game time, 13350 day time     Level dimension: 0     Level storage version: 0x00000 - Unknown?     Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)     Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false     Forced entities: 62 total; [EntityZombie['Зомби'/28822, l='MpServer', x=259.50, y=26.00, z=289.50], EntityChicken['Курица'/157, l='MpServer', x=207.50, y=73.00, z=188.50], EntityChicken['Курица'/158, l='MpServer', x=207.50, y=73.00, z=188.50], EntityChicken['Курица'/159, l='MpServer', x=207.90, y=74.04, z=192.50], EntityChicken['Курица'/160, l='MpServer', x=209.50, y=68.00, z=193.50], EntityChicken['Курица'/179, l='MpServer', x=252.50, y=68.00, z=208.50], EntityChicken['Курица'/180, l='MpServer', x=254.50, y=67.00, z=208.50], EntityChicken['Курица'/181, l='MpServer', x=253.50, y=68.00, z=206.27], EntityChicken['Курица'/6391, l='MpServer', x=313.20, y=72.00, z=286.45], EntityChicken['Курица'/6392, l='MpServer', x=310.14, y=72.00, z=287.18], EntityChicken['Курица'/6393, l='MpServer', x=305.09, y=73.00, z=284.27], EntityChicken['Курица'/6394, l='MpServer', x=303.39, y=73.00, z=284.20], EntityChicken['Курица'/6401, l='MpServer', x=291.51, y=68.00, z=235.04], EntitySkeleton['Скелет'/6412, l='MpServer', x=247.45, y=63.00, z=276.77], EntityPig['Свинья'/6469, l='MpServer', x=318.50, y=63.00, z=188.50], EntityPig['Свинья'/6470, l='MpServer', x=318.50, y=63.00, z=187.50], EntityPig['Свинья'/6471, l='MpServer', x=317.50, y=64.00, z=191.50], EntityZotzpyre['Зоцпир'/20820, l='MpServer', x=285.50, y=59.00, z=292.50], EntityChicken['Курица'/6517, l='MpServer', x=326.50, y=66.00, z=232.50], EntityChicken['Курица'/6518, l='MpServer', x=324.50, y=66.00, z=233.50], EntityChicken['Курица'/6519, l='MpServer', x=327.50, y=67.00, z=233.50], EntityChicken['Курица'/6520, l='MpServer', x=326.50, y=66.00, z=233.50], EntityPig['Свинья'/6521, l='MpServer', x=327.50, y=66.00, z=187.50], EntityPig['Свинья'/6522, l='MpServer', x=327.50, y=66.00, z=186.50], EntityPig['Свинья'/6523, l='MpServer', x=327.50, y=66.00, z=184.50], EntityPig['Свинья'/6524, l='MpServer', x=321.50, y=64.00, z=188.50], EntitySkeleton['Скелет'/29124, l='MpServer', x=285.50, y=33.00, z=234.50], EntityEnderman['Эндермен'/25224, l='MpServer', x=251.50, y=62.00, z=278.06], EntityItem['item.tile.dirt.default'/21260, l='MpServer', x=274.14, y=73.00, z=271.88], EntityBat['Летучая мышь'/27497, l='MpServer', x=239.04, y=55.10, z=265.08], EntityWitherSkeleton['Визер-скелет'/29688, l='MpServer', x=265.83, y=57.00, z=266.50], EntitySpider['Паук'/29717, l='MpServer', x=318.50, y=20.00, z=316.50], EntityCreeper['Крипер'/29721, l='MpServer', x=191.50, y=16.00, z=308.50], EntityItem['item.item.egg'/29723, l='MpServer', x=301.54, y=73.00, z=283.56], EntityCreeper['Крипер'/29725, l='MpServer', x=307.50, y=27.00, z=265.50], EntityWitherSkeleton['Визер-скелет'/29829, l='MpServer', x=264.35, y=57.00, z=266.35], EntityBat['Летучая мышь'/29846, l='MpServer', x=235.13, y=50.12, z=254.80], EntityBat['Летучая мышь'/29847, l='MpServer', x=314.02, y=17.81, z=288.65], EntitySkeleton['Скелет'/29882, l='MpServer', x=195.49, y=28.00, z=268.30], EntitySkeleton['Скелет'/29883, l='MpServer', x=191.30, y=17.00, z=268.70], EntityBat['Летучая мышь'/29911, l='MpServer', x=230.51, y=30.72, z=339.75], EntityZotzpyre['Зоцпир'/29921, l='MpServer', x=323.50, y=20.00, z=317.50], EntitySpider['Паук'/29922, l='MpServer', x=320.50, y=20.00, z=319.50], EntitySpider['Паук'/23782, l='MpServer', x=225.50, y=19.00, z=301.50], EntityZombie['Зомби'/29947, l='MpServer', x=304.50, y=16.00, z=213.50], EntityZotzpyre['Зоцпир'/29948, l='MpServer', x=222.50, y=20.00, z=292.50], EntityZotzpyre['Зоцпир'/29949, l='MpServer', x=222.50, y=20.00, z=291.50], EntityBat['Летучая мышь'/29952, l='MpServer', x=214.73, y=35.11, z=201.42], EntityWitherSkeleton['Визер-скелет'/29992, l='MpServer', x=265.11, y=57.00, z=266.35], EntityCreeper['Крипер'/30001, l='MpServer', x=315.50, y=35.00, z=301.50], EntityCreeper['Крипер'/30004, l='MpServer', x=337.50, y=75.00, z=302.50], EntityZombie['Зомби'/30005, l='MpServer', x=334.80, y=68.00, z=247.59], EntityBat['Летучая мышь'/30007, l='MpServer', x=205.75, y=46.87, z=254.25], EntityCreeper['Крипер'/30009, l='MpServer', x=186.50, y=26.00, z=274.50], EntityWitherSkeleton['Визер-скелет'/30033, l='MpServer', x=262.51, y=73.00, z=268.66], EntityZombie['Зомби'/26035, l='MpServer', x=273.48, y=54.00, z=294.20], EntitySkeleton['Скелет'/28363, l='MpServer', x=289.27, y=35.00, z=236.50], EntitySkeleton['Скелет'/22299, l='MpServer', x=295.51, y=64.00, z=288.77], EntityPlayerSP['Its_Nismo'/1679, l='MpServer', x=265.43, y=61.65, z=261.49], EntityChicken['Курица'/6132, l='MpServer', x=293.08, y=69.00, z=237.92], EntityChicken['Курица'/6133, l='MpServer', x=280.59, y=69.00, z=243.22], EntityChicken['Курица'/6134, l='MpServer', x=295.16, y=70.00, z=250.55]]     Retry entities: 0 total; []     Server brand: fml,forge     Server type: Integrated singleplayer server Stacktrace:     at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:532)     at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2741)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:427)     at net.minecraft.client.main.Main.main(SourceFile:123)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28)     at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)     at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)     at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Windows 11 (amd64) version 10.0     Java Version: 1.8.0_401, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 588005024 bytes (560 MB) / 1388363776 bytes (1324 MB) up to 7197425664 bytes (6864 MB)     JVM Flags: 18 total; -XX:+AggressiveOpts -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:ParallelGCThreads=4 -XX:+UnlockExperimentalVMOptions -XX:+ExplicitGCInvokesConcurrent -XX:MaxGCPauseMillis=50 -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -XX:-OmitStackTraceInFastThrow -XX:+OptimizeStringConcat -XX:+UseAdaptiveGCBoundary -XX:NewRatio=3 -XX:+UseFastAccessorMethods -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms512m -Xmx7040m     IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95     FML: MCP 9.42 Powered by Forge 14.23.5.2859 Optifine OptiFine_1.12.2_HD_U_G5 66 mods loaded, 66 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                                |     |:------ |:-------------------- |:-------------------- |:------------------------------------------------- |:---------------------------------------- |     | LCHIJA | minecraft            | 1.12.2               | minecraft.jar                                     | None                                     |     | LCHIJA | mcp                  | 9.42                 | minecraft.jar                                     | None                                     |     | LCHIJA | FML                  | 8.0.99.99            | forge-1.12.2-14.23.5.2859-universal.jar           | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LCHIJA | forge                | 14.23.5.2859         | forge-1.12.2-14.23.5.2859-universal.jar           | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LCHIJA | smoothfontcore       | mc1.12.2-2.1.4       | minecraft.jar                                     | None                                     |     | LCHIJA | xaeroworldmap_core   | 1.12.2-1.0           | minecraft.jar                                     | None                                     |     | LCHIJA | foamfixcore          | 7.7.4                | minecraft.jar                                     | None                                     |     | LCHIJA | smoothfont           | mc1.12.2-2.1.4       | SmoothFont-mc1.12.2-2.1.4.jar                     | None                                     |     | LCHIJA | additionalstructures | 2.5.0                | Additional-Structures-v.2.5.0-1.12.2.jar          | None                                     |     | LCHIJA | aiimprovements       | 0.0.1.3              | aiimprovements-1.12-0.0.1b3.jar                   | None                                     |     | LCHIJA | jei                  | 4.16.1.1012          | jei_1.12.2-4.16.1.1012.jar                        | None                                     |     | LCHIJA | appleskin            | 1.0.9                | appleskin-mc1.12-1.0.9.jar                        | None                                     |     | LCHIJA | auginter             | 1.1.0                | auginter-1.1.0-1.12.x.jar                         | None                                     |     | LCHIJA | backpack             | 3.0.2                | backpack_3.0.2_1.12.2.jar                         | None                                     |     | LCHIJA | betterbuilderswands  | 0.13.2               | BetterBuildersWands-1.12.2-0.13.2.271+5997513.jar | None                                     |     | LCHIJA | bibliocraft          | 2.4.5                | BiblioCraft-v2.4.5-MC1.12.2.jar                   | None                                     |     | LCHIJA | bloodmoon            | 1.5.3                | Bloodmoon_MC1.12.2_1.5.3.jar                      | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LCHIJA | bookshelf            | 2.3.590              | Bookshelf_1.12.2_2.3.590.jar                      | d476d1b22b218a10d845928d1665d45fce301b27 |     | LCHIJA | carryon              | 1.12.3               | carryon-1.12.2-1.12.6.20.jar                      | fd21553434f4905f2f73ea7838147ac4ea07bd88 |     | LCHIJA | chameleon            | 1.12-4.1.3           | Chameleon-1.12-4.1.3.jar                          | None                                     |     | LCHIJA | colouredtooltips     | 1.0.9                | colouredtooltips-1.12.2-1.0.9.jar                 | d476d1b22b218a10d845928d1665d45fce301b27 |     | LCHIJA | craftingtweaks       | 8.1.9                | craftingtweaks_1.12.2-8.1.9.jar                   | None                                     |     | LCHIJA | ctm                  | MC1.12.2-1.0.2.31    | CTM-MC1.12.2-1.0.2.31.jar                         | None                                     |     | LCHIJA | eplus                | 5.0.179              | enchantingplus-1.12.2-5.0.179.jar                 | d476d1b22b218a10d845928d1665d45fce301b27 |     | LCHIJA | renderlib            | 1.3.4                | renderlib-1.12.2-1.3.4.jar                        | None                                     |     | LCHIJA | entityculling        | 6.4.3                | entityculling-1.12.2-6.4.3.jar                    | None                                     |     | LCHIJA | foamfix              | @VERSION@            | foamfix-0.10.15-1.12.2 (1).jar                    | None                                     |     | LCHIJA | gokistats            | 1.2.10               | GokiStats-1.2.10.jar                              | None                                     |     | LCHIJA | gravestone           | 1.10.0               | gravestone_mc1.12.2_1.10.0.jar                    | None                                     |     | LCHIJA | harvest              | 1.12-1.2.7-20        | harvest-1.12-1.2.7-20.jar                         | None                                     |     | LCHIJA | infernalmobs         | 1.7.6                | InfernalMobs-1.12.2.jar                           | None                                     |     | LCHIJA | inventoryhud         | 3.4.4                | inventoryhud-1.12.2.forge-3.4.4.jar               | None                                     |     | LCHIJA | inventorytweaks      | 1.64+dev.151.822d839 | inventorytweaks-1.64dev.151.jar                   | 55d2cd4f5f0961410bf7b91ef6c6bf00a766dcbe |     | LCHIJA | ironchest            | 1.12.2-7.0.67.844    | ironchest-1.12.2-7.0.72.847.jar                   | None                                     |     | LCHIJA | ironfurnaces         | 1.3.5                | ironfurnaces-1.3.5.jar                            | None                                     |     | LCHIJA | mantle               | 1.12-1.3.3.55        | mantle-1.12-1.3.3.55.jar                          | None                                     |     | LCHIJA | memorycleaner        | 1.4                  | memorycleaner-1.4 (1).jar                         | None                                     |     | LCHIJA | twilightforest       | 3.11.1021            | twilightforest-1.12.2-3.11.1021-universal.jar     | None                                     |     | LCHIJA | tconstruct           | 1.12.2-2.13.0.183    | tconstruct-1.12.2-2.13.0.183.jar                  | None                                     |     | LCHIJA | moartinkers          | 0.6.0                | moartinkers-0.6.0.jar                             | None                                     |     | LCHIJA | mob_grinding_utils   | 0.3.13               | MobGrindingUtils_1.12.2_0.3.13.jar                | None                                     |     | LCHIJA | mousetweaks          | 2.10.1               | mousetweaks-2.10.1-mc1.12.2.jar                   | None                                     |     | LCHIJA | nopotionshift        | 1.2.0                | nopotionshift_1.12.2-1.2.0.jar                    | None                                     |     | LCHIJA | norecipebook         | 1.2.1                | norecipebook_v1.2.2formc1.12.2.jar                | None                                     |     | LCHIJA | oreexcavation        | 1.4.150              | oreexcavation-1.4.150.jar                         | None                                     |     | LCHIJA | patchouli            | 1.0-23.6             | Patchouli-1.0-23.6.jar                            | None                                     |     | LCHIJA | performant           | 1.12.2-1.5           | performant-1.11.jar                               | None                                     |     | LCHIJA | placebo              | 1.6.0                | placebo-1.12.2-1.6.1.jar                          | None                                     |     | LCHIJA | progressivebosses    | 1.5.4                | ProgressiveBosses_1.5.4_mc1.12.x.jar              | None                                     |     | LCHIJA | ruins                | 17.2                 | ruins-1.12.2.jar                                  | None                                     |     | LCHIJA | silentlib            | 3.0.13               | silentlib-1.12.2-3.0.14168.jar                    | None                                     |     | LCHIJA | scalinghealth        | 1.3.37               | scalinghealth-1.12.2-1.3.42147.jar                | None                                     |     | LCHIJA | sereneseasons        | 1.2.18               | sereneseasons-1.12.2-1.2.18-universal.jar         | None                                     |     | LCHIJA | spark                | 1.5.2                | spark-forge1122.jar                               | None                                     |     | LCHIJA | stg                  | 1.12.2-1.2.3         | stg-1.12.2-1.2.3.jar                              | None                                     |     | LCHIJA | storagedrawers       | 5.5.0                | StorageDrawers-1.12.2-5.5.0.jar                   | None                                     |     | LCHIJA | surge                | 2.0.77               | surge-1.12.2-2.0.77.jar                           | d476d1b22b218a10d845928d1665d45fce301b27 |     | LCHIJA | texfix               | 4.0                  | texfixv-1.12-4.0 (1).jar                          | None                                     |     | LCHIJA | theoneprobe          | 1.4.28               | theoneprobe-1.12-1.4.28.jar                       | None                                     |     | LCHIJA | tinkersjei           | 1.2                  | tinkersjei-1.2.jar                                | None                                     |     | LCHIJA | toastcontrol         | 1.8.1                | toastcontrol-1.12.2-1.8.1.jar                     | None                                     |     | LCHIJA | topaddons            | 1.12.2-1.13.0        | topaddons-1.12.2-1.13.0.jar                       | None                                     |     | LCHIJA | torohealthmod        | 1.12.2-11            | torohealth-1.12.2-11.jar                          | None                                     |     | LCHIJA | waystones            | 4.1.0                | waystones_1.12.2-4.1.0.jar                        | None                                     |     | LCHIJA | xaeroworldmap        | 1.37.7               | XaerosWorldMap_1.37.7_Forge_1.12.jar              | None                                     |     | LCHIJA | betteranimalsplus    | 9.0.1                | betteranimalsplus_1.12.2_9.0.1.jar                | None                                     |     Loaded coremods (and transformers):  LoadingPlugin (Bloodmoon_MC1.12.2_1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer EntityCullingPlugin (entityculling-1.12.2-6.4.3.jar)   meldexun.entityculling.asm.EntityCullingClassTransformer Inventory Tweaks Coremod (inventorytweaks-1.64dev.151.jar)   invtweaks.forge.asm.ContainerTransformer SurgeLoadingPlugin (surge-1.12.2-2.0.77.jar)    Do not report to Forge! (If you haven't disabled the FoamFix coremod, try disabling it in the config! Note that this bit of text will still appear.) (foamfix-0.10.15-1.12.2 (1).jar)   pl.asie.foamfix.coremod.FoamFixTransformer CorePlugin (SmoothFont-mc1.12.2-2.1.4.jar)   bre.smoothfont.asm.Transformer XaeroWorldMapPlugin (XaerosWorldMap_1.37.7_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.EntityPlayerMPTransformer   xaero.map.core.transformer.PlayerListTransformer   xaero.map.core.transformer.SaveFormatTransformer   xaero.map.core.transformer.BiomeColorHelperTransformer   xaero.map.core.transformer.MinecraftServerTransformer   xaero.map.core.transformer.MinecraftTransformer CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)   team.chisel.ctm.client.asm.CTMTransformer SSLoadingPlugin (sereneseasons-1.12.2-1.2.18-universal.jar)   sereneseasons.asm.transformer.EntityRendererTransformer   sereneseasons.asm.transformer.WorldTransformer Born in a Barn (borninabarn1.8-1.12-1.2.jar)   com.chocohead.biab.BornInABarn RenderLibPlugin (renderlib-1.12.2-1.3.4.jar)   meldexun.renderlib.asm.RenderLibClassTransformer     GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.6.0 Compatibility Profile Context 24.2.1.240215' Renderer: 'Radeon RX 5500 XT'     Pulsar/tconstruct loaded Pulses:          - TinkerCommons (Enabled/Forced)         - TinkerWorld (Enabled/Not Forced)         - TinkerTools (Enabled/Not Forced)         - TinkerHarvestTools (Enabled/Forced)         - TinkerMeleeWeapons (Enabled/Forced)         - TinkerRangedWeapons (Enabled/Forced)         - TinkerModifiers (Enabled/Forced)         - TinkerSmeltery (Enabled/Not Forced)         - TinkerGadgets (Enabled/Not Forced)         - TinkerOredict (Enabled/Forced)         - TinkerIntegration (Enabled/Forced)         - TinkerFluids (Enabled/Forced)         - TinkerMaterials (Enabled/Forced)         - TinkerModelRegister (Enabled/Forced)         - craftingtweaksIntegration (Enabled/Not Forced)         - theoneprobeIntegration (Enabled/Not Forced)     Patchouli open book context: n/a     Launched Version: 1.12.2     LWJGL: 2.9.4     OpenGL: Radeon RX 5500 XT GL version 4.6.0 Compatibility Profile Context 24.2.1.240215, 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: ModdedFaithful 1.12.2-rv1 (1).zip, NotEnoughPixels1.12.2-1.1.4.zip, Classic Faithful 32x Programmer Art - 1.12.2 (2).zip     Current Language: Русский (Россия)     Profiler Position: N/A (disabled)     CPU: 12x Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz     OptiFine Version: OptiFine_1.12.2_HD_U_G5     OptiFine Build: 20210124-142939     Render Distance Chunks: 8     Mipmaps: 0     Anisotropic Filtering: 1     Antialiasing: 0     Multitexture: false     Shaders: null     OpenGlVersion: 4.6.0 Compatibility Profile Context 24.2.1.240215     OpenGlRenderer: Radeon RX 5500 XT     OpenGlVendor: ATI Technologies Inc.     CpuCount: 12
    • Im trying to get a way to set a custome briefcase next to the player similar to the Bonus chest  Digging on the code i found this two events  @SubscribeEvent public static void onPlayerRespawn( PlayerEvent.PlayerRespawnEvent event) { Player pe = event.getEntity(); Level warudo = pe.level(); System.out.println("\n\n\n #### player has respawn " + ", " + warudo.isClientSide() + "\n\n\n" ); //PlayerEvent$Clone } @SubscribeEvent public static void onPlayerStarAWorld( LevelEvent.CreateSpawnPosition event) { //Player pe = event.getEntity; <--- dont exists in LevelEvent Level warudo = (Level)event.getLevel(); ServerLevelData settings = event.getSettings(); //ServerPlayer player = Minecraft.getInstance().player;<--- this crash the game PlayerEntity is null //player.position() //player.getRespawnPosition() System.out.println("\n\n\n #### onPlayerStarAWorld " + ", " + warudo.isClientSide() + ", " + "\n\n\n" ); //PlayerEvent$Clone } CreateSpawnPosition seems like he way to go but i cannot find a way extract a block position from it nor the player to then know wheres the player    ################################# what i want is to get the player from this event soo i can know where it is and spawns a briefcase next to it  or maybe another event that could do the same           
    • If you're experiencing lag with the Forge client on CurseForge but not with other loaders, it could be a specific issue with Forge or how it interacts with your Mac. Since you've tried updating and adjusting memory allocation without success, consider checking for any Forge-specific settings that might affect performance. Also, exploring forums for Mac users running Forge might reveal some Mac-specific tweaks. Another idea is to reach out to the Forge community directly for advice, as they might have insights specific to your setup.
  • Topics

×
×
  • Create New...

Important Information

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