fix: armor stacks to 64 + creative tab handler on wrong bus
- ShardDiamondArmorItem forced stacksTo(64): armor pieces stacked like items. Now explicitly stacksTo(1) (ArmorItem does not default to 1 in 1.21.1, vanilla sets it per-item). - CustomOreGenModTabs.buildTabContentsVanilla was subscribed on the GAME bus, but BuildCreativeModeTabContentsEvent is an IModBusEvent posted via ModLoader: the handler never fired and mod items never appeared in vanilla tabs. Moved to the MOD bus.
This commit is contained in:
@@ -1,7 +1,3 @@
|
|||||||
|
|
||||||
/*
|
|
||||||
* MCreator note: This file will be REGENERATED on each build.
|
|
||||||
*/
|
|
||||||
package net.mcreator.customoregen.init;
|
package net.mcreator.customoregen.init;
|
||||||
|
|
||||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||||
@@ -20,7 +16,7 @@ import net.mcreator.customoregen.CustomOreGenMod;
|
|||||||
|
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
@EventBusSubscriber(modid = CustomOreGenMod.MODID, bus = EventBusSubscriber.Bus.GAME)
|
@EventBusSubscriber(modid = CustomOreGenMod.MODID, bus = EventBusSubscriber.Bus.MOD)
|
||||||
public class CustomOreGenModTabs {
|
public class CustomOreGenModTabs {
|
||||||
public static final DeferredRegister<CreativeModeTab> REGISTRY = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, CustomOreGenMod.MODID);
|
public static final DeferredRegister<CreativeModeTab> REGISTRY = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, CustomOreGenMod.MODID);
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import net.mcreator.customoregen.config.ModConfigs;
|
|||||||
public abstract class ShardDiamondArmorItem extends ArmorItem {
|
public abstract class ShardDiamondArmorItem extends ArmorItem {
|
||||||
|
|
||||||
public ShardDiamondArmorItem(ArmorItem.Type type, Item.Properties properties) {
|
public ShardDiamondArmorItem(ArmorItem.Type type, Item.Properties properties) {
|
||||||
super(ShardDiamondArmorMaterial.SHARD_DIAMOND, type, properties.stacksTo(64));
|
super(ShardDiamondArmorMaterial.SHARD_DIAMOND, type, properties.stacksTo(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user