-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
By Toasterkid · Posted
Also doubting if my usage of awardStat is correct. It just looks like this right now: player.awardStat(SampleModRegistry.FIREWORK_BOOSTS_USED.getId()); but there are places vanilla Minecraft uses the function like this: .awardStat(Stats.CUSTOM.get(Stats.DAMAGE_BLOCKED_BY_SHIELD) -
By Toasterkid · Posted
What's the issue your running into? The link for the image you posted is also broken. -
By Toasterkid · Posted
What does NetworkHooks.openScreen(player, blockEntity, pPos) do? -
By Toasterkid · Posted
At an attempt at answering my first question I thought I might be able to change the code to this public static final RegistryObject<StatType<?>> FIREWORK_BOOSTS_USED = STATISTICS.register("firework_boosts_used", () -> new StatType<>(ForgeRegistries.STAT_TYPES, Component.literal("firework_boosts"))); or to this public static final RegistryObject<StatType<?>> FIREWORK_BOOSTS_USED = STATISTICS.register("firework_boosts_used", () -> new StatType<>(BuiltInRegistries.STAT_TYPE, Component.literal("firework_boosts"))); but for the first code snippet the StatType constructor requires a Registry not an IForgeRegistry and for the second code snippet we run into the same NPE issue from above.
-
-
Topics
-
Who's Online (See full list)
Recommended Posts