Jump to content

Erreur create


Recommended Posts

Bonjour,j'utilise régulièrement forge pour installer et jouer avec des modes et,récemment,j'ai décider d'installer forge 1.19.2 (la version 43.2.4) et d'installer le mod create (et donc par la suite également le mod flywheel).Lors'que je lance mon jeu,tout marche bien,je peut utiliser create sans aucun soucis mais lors'que je décide de crée un train,lors de l'assemblage,mon jeu plante. Le rapport de plantage est le suivant :

 

 

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 2023-01-28 19:18:44
Description: Unexpected error

java.lang.NullPointerException: Cannot invoke "net.minecraft.server.MinecraftServer.m_129880_(net.minecraft.resources.ResourceKey)" because the return value of "net.minecraft.world.level.Level.m_7654_()" is null
    at com.simibubi.create.content.logistics.trains.entity.Carriage.manageEntities(Carriage.java:253) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.content.logistics.trains.entity.Carriage.travel(Carriage.java:194) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.content.logistics.trains.entity.Train.tick(Train.java:377) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.content.logistics.trains.GlobalRailwayManager.tickTrains(GlobalRailwayManager.java:223) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.content.logistics.trains.GlobalRailwayManager.tick(GlobalRailwayManager.java:197) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.events.CommonEvents.onWorldTick(CommonEvents.java:97) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.events.__CommonEvents_onWorldTick_LevelTickEvent.invoke(.dynamic) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading,pl:eventbus:B}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2374!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2374!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2374!/:?] {}
    at net.minecraftforge.event.ForgeEventFactory.onPostLevelTick(ForgeEventFactory.java:820) ~[forge-1.19.2-43.2.4-universal.jar%23151!/:?] {re:classloading}
    at net.minecraft.client.Minecraft.m_91398_(Minecraft.java:1831) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1078) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.2.4.jar%2390!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at com.simibubi.create.content.logistics.trains.entity.Carriage.manageEntities(Carriage.java:253) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.content.logistics.trains.entity.Carriage.travel(Carriage.java:194) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.content.logistics.trains.entity.Train.tick(Train.java:377) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.content.logistics.trains.GlobalRailwayManager.tickTrains(GlobalRailwayManager.java:223) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.content.logistics.trains.GlobalRailwayManager.tick(GlobalRailwayManager.java:197) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.events.CommonEvents.onWorldTick(CommonEvents.java:97) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading}
    at com.simibubi.create.events.__CommonEvents_onWorldTick_LevelTickEvent.invoke(.dynamic) ~[create-1.19.2-0.5.0.h.jar%23144!/:0.5.0.h] {re:classloading,pl:eventbus:B}
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2374!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2374!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2374!/:?] {}
    at net.minecraftforge.event.ForgeEventFactory.onPostLevelTick(ForgeEventFactory.java:820) ~[forge-1.19.2-43.2.4-universal.jar%23151!/:?] {re:classloading}
-- Affected level --
Details:
    All players: 1 total; [LocalPlayer['Ju2H3brc0t'/240, l='ClientLevel', x=-65.84, y=69.87, z=25.79]]
    Chunk stats: 2209, 1309
    Level dimension: minecraft:overworld
    Level spawn location: World: (-48,71,-16), Section: (at 0,7,0 in -3,4,-1; chunk contains blocks -48,-64,-16 to -33,319,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,-64,-512 to -1,319,-1)
    Level time: 3951 game time, 3951 day time
    Server brand: forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.ClientLevel.m_6026_(ClientLevel.java:450) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:flywheel.mixins.json:ClientLevelMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91354_(Minecraft.java:2280) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:722) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23146!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.2.4.jar%2390!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2377!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}


-- Last reload --
Details:
    Reload number: 1
    Reload reason: initial
    Finished: Yes
    Packs: Mod Resources, Default

-- System Details --
Details:
    Minecraft Version: 1.19.2
    Minecraft Version ID: 1.19.2
    Operating System: Linux (amd64) version 5.10.0-19-amd64
    Java Version: 17.0.3, Microsoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
    Memory: 561472136 bytes (535 MiB) / 2147483648 bytes (2048 MiB) up to 2147483648 bytes (2048 MiB)
    CPUs: 4
    Processor Vendor: GenuineIntel
    Processor Name: Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz
    Identifier: Intel64 Family 6 Model 60 Stepping 3
    Microarchitecture: Haswell (Client)
    Frequency (GHz): 3.70
    Number of physical packages: 1
    Number of physical CPUs: 2
    Number of logical CPUs: 4
    Graphics card #0 name: Cedar [Radeon HD 5000/6000/7350/8350 Series]
    Graphics card #0 vendor: Advanced Micro Devices, Inc. [AMD/ATI] (0x1002)
    Graphics card #0 VRAM (MB): 256.00
    Graphics card #0 deviceId: 0x68f9
    Graphics card #0 versionInfo: unknown
    Virtual memory max (MB): 4928.22
    Virtual memory used (MB): 5339.00
    Swap memory total (MB): 976.00
    Swap memory used (MB): 52.00
    JVM Flags: 8 total; -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
    Launched Version: 1.19.2-forge-43.2.4
    Backend library: LWJGL version 3.3.1 build 7
    Backend API: AMD CEDAR (DRM 2.50.0 / 5.10.0-19-amd64, LLVM 11.0.1) GL version 3.3 (Core Profile) Mesa 20.3.5, X.Org
    Window size: 1366x768
    GL Caps: Using framebuffer using OpenGL 3.2
    GL debug messages: 
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'; Server brand changed to 'forge'
    Type: Integrated Server (map_client.txt)
    Graphics mode: fast
    Resource Packs: vanilla
    Current Language: Français (France)
    CPU: 4x Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz
    Server Running: true
    Player Count: 1 / 8; [ServerPlayer['Ju2H3brc0t'/240, l='ServerLevel[Tst create]', x=-65.84, y=69.87, z=25.79]]
    Data Packs: vanilla, mod:forge, mod:flywheel (incompatible), mod:create
    World Generation: Stable
    ModLauncher: 10.0.8+10.0.8+main.0ef7e830
    ModLauncher launch target: forgeclient
    ModLauncher naming: srg
    ModLauncher services: 
        mixin-0.8.5.jar mixin PLUGINSERVICE 
        eventbus-6.0.3.jar eventbus PLUGINSERVICE 
        fmlloader-1.19.2-43.2.4.jar slf4jfixer PLUGINSERVICE 
        fmlloader-1.19.2-43.2.4.jar object_holder_definalize PLUGINSERVICE 
        fmlloader-1.19.2-43.2.4.jar runtime_enum_extender PLUGINSERVICE 
        fmlloader-1.19.2-43.2.4.jar capability_token_subclass PLUGINSERVICE 
        accesstransformers-8.0.4.jar accesstransformer PLUGINSERVICE 
        fmlloader-1.19.2-43.2.4.jar runtimedistcleaner PLUGINSERVICE 
        modlauncher-10.0.8.jar mixin TRANSFORMATIONSERVICE 
        modlauncher-10.0.8.jar fml TRANSFORMATIONSERVICE 
    FML Language Providers: 
        minecraft@1.0
        lowcodefml@null
        javafml@null
    Mod List: 
        client-1.19.2-20220805.130853-srg.jar             |Minecraft                     |minecraft                     |1.19.2              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
        forge-1.19.2-43.2.4-universal.jar                 |Forge                         |forge                         |43.2.4              |DONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90
        flywheel-forge-1.19.2-0.6.8.a.jar                 |Flywheel                      |flywheel                      |0.6.8.a             |DONE      |Manifest: NOSIGNATURE
        create-1.19.2-0.5.0.h.jar                         |Create                        |create                        |0.5.0.h             |DONE      |Manifest: NOSIGNATURE
    Flywheel Backend: GL33 Instanced Arrays
    Crash Report UUID: aefbdd72-4916-4b28-bbe5-e5a70f1a692b
    FML: 43.2
    Forge: net.minecraftforge:43.2.4

 

 

 

(Je joue a Minecraft sur Linux (Debian 11) et comme c'est déja bien galère d'installer des truc,create et flywheel sont les seul mod présent sur mon pc)

Link to comment
Share on other sites

I don't think you need Flywheel with newer versions of the Create mod.

Je ne pense pas que vous ayez besoin de Flywheel sur les nouvelles versions du mod de Create.

(Traduit avec Google Traduction)

I'm not good at modding, but at least I can read a crash report (well enough). That's something, right?

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

    • Minecraft 1.20.1 Forge 47.2.0 log and crash report: https://pastebin.com/P7tQymQS ; (crash report) I launch the game and i got this error: Someone could help me please?  
    • EDIT: NVM, the enchantment ID was wrong and that was causing the issue. Not sure why it doesn't let me delete this post Hi, I'm trying to make a "smelting" enchantment Global Loot Modifier, but for some reason the game could not decode its related JSON file, altough is applying the Loot Modifier to every single loot When I join a world I get this error in the console   [01:08:01] [Render thread/WARN] [ne.mi.co.lo.LootModifierManager/]: Could not decode GlobalLootModifier with json id mineworld:enchantments/fiery_touch - error: Not a json array: {"condition":"minecraft:match_tool","predicate":{"enchantments":[{"enchantment":"mineworld:smelting","levels":{"min":1}}]}} The GLM Json file is the following { "type": "mineworld:fiery_touch", "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "mineworld:smelting", "levels": { "min": 1 } } ] } } ] } And this is the LootModifier class   package org.mineworld.loot; import com.google.common.base.Suppliers; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import net.minecraft.core.RegistryAccess; import net.minecraft.world.Container; import net.minecraft.world.SimpleContainer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.RecipeManager; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; import net.minecraftforge.common.loot.IGlobalLootModifier; import net.minecraftforge.common.loot.LootModifier; import net.minecraftforge.items.ItemHandlerHelper; import org.jetbrains.annotations.NotNull; import org.mineworld.MineWorld; import java.util.List; import java.util.Optional; import java.util.function.Supplier; import java.util.stream.IntStream; /** * {@link MineWorld MineWorld} loot modifier for smelting a drop from a block */ public final class FieryTouchModifier extends LootModifier { /** * {@link Supplier<Codec> The loot codec supplier} */ public static final Supplier<Codec<FieryTouchModifier>> CODEC = Suppliers.memoize(() -> RecordCodecBuilder.create(inst -> codecStart(inst).apply(inst, FieryTouchModifier::new))); /** * Constructor. Set the {@link LootItemCondition loot id conditions} * * @param lootConditions {@index ILootCondition The conditions that need to be matched before the loot is modified} */ public FieryTouchModifier(final LootItemCondition[] lootConditions) { super(lootConditions); } /** * Add the {@link MWLootItem items} to the loot * * @param loot {@link ObjectArrayList<ItemStack> The current loot} * @param context {@link LootContext The loot context} * @return {@link ObjectArrayList<ItemStack> The modified loot} */ @Override protected @NotNull ObjectArrayList<ItemStack> doApply(final ObjectArrayList<ItemStack> loot, final LootContext context) { if(context.hasParam(LootContextParams.BLOCK_STATE)) { final Level level = context.getLevel(); final RecipeManager recipeManager = level.getRecipeManager(); final RegistryAccess registryAccess = level.registryAccess(); IntStream.range(0, loot.size()).forEach(index -> { final ItemStack drop = loot.get(index); final ItemStack smeltedDrop = tryGetSmeltedDrop(recipeManager, RecipeType.SMELTING, level, registryAccess, drop) .orElse(tryGetSmeltedDrop(recipeManager, RecipeType.SMITHING, level, registryAccess, drop) .orElse(tryGetSmeltedDrop(recipeManager, RecipeType.BLASTING, level, registryAccess, drop) .orElse(tryGetSmeltedDrop(recipeManager, RecipeType.SMOKING, level, registryAccess, drop) .orElse(tryGetSmeltedDrop(recipeManager, RecipeType.CAMPFIRE_COOKING, level, registryAccess, drop) .orElse(ItemStack.EMPTY))))); if(!smeltedDrop.isEmpty()) { loot.set(index, smeltedDrop); } }); } return loot; } /** * Get the {@link Codec loot modifier codec} * * @return {@link #CODEC The loot modifier codec} */ @Override public Codec<? extends IGlobalLootModifier> codec() { return CODEC.get(); } /** * Try to set the smelted drop to the {@link List<ItemStack> block drop list} * * @param recipeManager {@link RecipeManager The recipe manager} * @param recipeType {@link RecipeType The recipe type} * @param level {@link Level The level reference} * @param registryAccess {@link RegistryAccess The registry access} * @param drop {@link ItemStack The dropped item} * @return {@link ItemStack The smelted ItemStack} */ private static <C extends Container, T extends Recipe<C>> Optional<ItemStack> tryGetSmeltedDrop(final RecipeManager recipeManager, final RecipeType<T> recipeType, final Level level, final RegistryAccess registryAccess, final ItemStack drop) { return recipeManager.getRecipeFor(recipeType, (C) new SimpleContainer(drop), level) .map(recipe -> recipe.value().getResultItem(registryAccess)) .filter(itemStack -> !itemStack.isEmpty()) .map(itemStack -> ItemHandlerHelper.copyStackWithSize(itemStack, drop.getCount() * itemStack.getCount())); } } I have another GLM that has some entries as well and doesn't have any issues
    • Why are you doing this instead of just playing the sound using the level or the player method? 
    • You can use  event.getEntity().level()  
  • Topics

×
×
  • Create New...

Important Information

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