diff --git a/common/libs/majrusz-library-common-1.20.1-7.0.0.jar b/common/libs/majrusz-library-common-1.20.1-7.0.0.jar index a16f812b7..c07da3f03 100644 Binary files a/common/libs/majrusz-library-common-1.20.1-7.0.0.jar and b/common/libs/majrusz-library-common-1.20.1-7.0.0.jar differ diff --git a/common/src/main/java/com/majruszsdifficulty/MajruszsDifficulty.java b/common/src/main/java/com/majruszsdifficulty/MajruszsDifficulty.java index e6e426581..f6cf0bbc6 100644 --- a/common/src/main/java/com/majruszsdifficulty/MajruszsDifficulty.java +++ b/common/src/main/java/com/majruszsdifficulty/MajruszsDifficulty.java @@ -72,181 +72,169 @@ public class MajruszsDifficulty { public static final RegistryGroup< RecipeSerializer< ? > > RECIPES = HELPER.create( BuiltInRegistries.RECIPE_SERIALIZER ); public static final RegistryGroup< SoundEvent > SOUND_EVENTS = HELPER.create( BuiltInRegistries.SOUND_EVENT ); - public static class Entities { - public static final RegistryObject< EntityType< Cerberus > > CERBERUS = ENTITY_TYPES.create( "cerberus", Cerberus::createEntityType ); - public static final RegistryObject< EntityType< Creeperling > > CREEPERLING = ENTITY_TYPES.create( "creeperling", Creeperling::createEntityType ); - public static final RegistryObject< EntityType< CursedArmor > > CURSED_ARMOR = ENTITY_TYPES.create( "cursed_armor", CursedArmor::createEntityType ); - public static final RegistryObject< EntityType< Giant > > GIANT = ENTITY_TYPES.create( "giant", Giant::createEntityType ); - public static final RegistryObject< EntityType< Illusioner > > ILLUSIONER = ENTITY_TYPES.create( "illusioner", Illusioner::createEntityType ); - public static final RegistryObject< EntityType< Tank > > TANK = ENTITY_TYPES.create( "tank", Tank::createEntityType ); + // Network + public static final NetworkObject< TreasureBag.RightClickAction > TREASURE_BAG_RIGHT_CLICK_NETWORK = HELPER.create( "treasure_bag_right_click", TreasureBag.RightClickAction.class ); + public static final NetworkObject< TreasureBagHelper.Progress > TREASURE_BAG_PROGRESS_NETWORK = HELPER.create( "treasure_bag_progress", TreasureBagHelper.Progress.class ); + + // Entities + public static final RegistryObject< EntityType< Cerberus > > CERBERUS_ENTITY = ENTITY_TYPES.create( "cerberus", Cerberus::createEntityType ); + public static final RegistryObject< EntityType< Creeperling > > CREEPERLING_ENTITY = ENTITY_TYPES.create( "creeperling", Creeperling::createEntityType ); + public static final RegistryObject< EntityType< CursedArmor > > CURSED_ARMOR_ENTITY = ENTITY_TYPES.create( "cursed_armor", CursedArmor::createEntityType ); + public static final RegistryObject< EntityType< Giant > > GIANT_ENTITY = ENTITY_TYPES.create( "giant", Giant::createEntityType ); + public static final RegistryObject< EntityType< Illusioner > > ILLUSIONER_ENTITY = ENTITY_TYPES.create( "illusioner", Illusioner::createEntityType ); + public static final RegistryObject< EntityType< Tank > > TANK_ENTITY = ENTITY_TYPES.create( "tank", Tank::createEntityType ); + + // Effects + public static final RegistryObject< Bleeding > BLEEDING_EFFECT = MOB_EFFECTS.create( "bleeding", Bleeding::new ); + public static final RegistryObject< BleedingImmunity > BLEEDING_IMMUNITY_EFFECT = MOB_EFFECTS.create( "bleeding_immunity", BleedingImmunity::new ); + public static final RegistryObject< GlassRegeneration > GLASS_REGENERATION_EFFECT = MOB_EFFECTS.create( "glass_regeneration", GlassRegeneration::new ); + + // Blocks + public static final RegistryObject< EnderiumBlock > ENDERIUM_BLOCK = BLOCKS.create( "enderium_block", EnderiumBlock::new ); + public static final RegistryObject< EnderiumShardOre > ENDERIUM_SHARD_ORE_BLOCK = BLOCKS.create( "enderium_shard_ore", EnderiumShardOre::new ); + public static final RegistryObject< FragileEndStone > FRAGILE_END_STONE_BLOCK = BLOCKS.create( "fragile_end_stone", FragileEndStone::new ); + public static final RegistryObject< InfernalSponge > INFERNAL_SPONGE_BLOCK = BLOCKS.create( "infernal_sponge", InfernalSponge::new ); + public static final RegistryObject< InfestedEndStone > INFESTED_END_STONE_BLOCK = BLOCKS.create( "infested_end_stone", InfestedEndStone::new ); + public static final RegistryObject< SoakedInfernalSponge > SOAKED_INFERNAL_SPONGE_BLOCK = BLOCKS.create( "soaked_infernal_sponge", SoakedInfernalSponge::new ); + + // Items + public static final RegistryObject< Bandage > BANDAGE_ITEM = ITEMS.create( "bandage", Bandage.normal() ); + public static final RegistryObject< CerberusFang > CERBERUS_FANG_ITEM = ITEMS.create( "cerberus_fang", CerberusFang::new ); + public static final RegistryObject< Cloth > CLOTH_ITEM = ITEMS.create( "cloth", Cloth::new ); + public static final RegistryObject< EnderiumTool.Axe > ENDERIUM_AXE_ITEM = ITEMS.create( "enderium_axe", EnderiumTool.Axe::new ); + public static final RegistryObject< EnderiumArmor > ENDERIUM_BOOTS_ITEM = ITEMS.create( "enderium_boots", EnderiumArmor.boots() ); + public static final RegistryObject< EnderiumArmor > ENDERIUM_CHESTPLATE_ITEM = ITEMS.create( "enderium_chestplate", EnderiumArmor.chestplate() ); + public static final RegistryObject< EnderiumArmor > ENDERIUM_HELMET_ITEM = ITEMS.create( "enderium_helmet", EnderiumArmor.helmet() ); + public static final RegistryObject< EnderiumTool.Hoe > ENDERIUM_HOE_ITEM = ITEMS.create( "enderium_hoe", EnderiumTool.Hoe::new ); + public static final RegistryObject< EnderiumIngot > ENDERIUM_INGOT_ITEM = ITEMS.create( "enderium_ingot", EnderiumIngot::new ); + public static final RegistryObject< EnderiumArmor > ENDERIUM_LEGGINGS_ITEM = ITEMS.create( "enderium_leggings", EnderiumArmor.leggings() ); + public static final RegistryObject< EnderiumTool.Pickaxe > ENDERIUM_PICKAXE_ITEM = ITEMS.create( "enderium_pickaxe", EnderiumTool.Pickaxe::new ); + public static final RegistryObject< EnderiumShard > ENDERIUM_SHARD_ITEM = ITEMS.create( "enderium_shard", EnderiumShard::new ); + public static final RegistryObject< EnderiumShardLocator > ENDERIUM_SHARD_LOCATOR_ITEM = ITEMS.create( "enderium_shard_locator", EnderiumShardLocator::new ); + public static final RegistryObject< EnderiumTool.Shovel > ENDERIUM_SHOVEL_ITEM = ITEMS.create( "enderium_shovel", EnderiumTool.Shovel::new ); + public static final RegistryObject< EnderiumTool.Sword > ENDERIUM_SWORD_ITEM = ITEMS.create( "enderium_sword", EnderiumTool.Sword::new ); + public static final RegistryObject< EnderiumSmithingTemplate > ENDERIUM_SMITHING_TEMPLATE_ITEM = ITEMS.create( "enderium_upgrade_smithing_template", EnderiumSmithingTemplate::new ); + public static final RegistryObject< EnderPouch > ENDER_POUCH_ITEM = ITEMS.create( "ender_pouch", EnderPouch::new ); + public static final RegistryObject< EvokerFangScroll > EVOKER_FANG_SCROLL_ITEM = ITEMS.create( "evoker_fang_scroll", EvokerFangScroll::new ); + public static final RegistryObject< Bandage > GOLDEN_BANDAGE_ITEM = ITEMS.create( "golden_bandage", Bandage.golden() ); + public static final RegistryObject< RecallPotion > RECALL_POTION_ITEM = ITEMS.create( "recall_potion", RecallPotion::new ); + public static final RegistryObject< SonicBoomScroll > SONIC_BOOM_SCROLL_ITEM = ITEMS.create( "sonic_boom_scroll", SonicBoomScroll::new ); + public static final RegistryObject< SoulJar > SOUL_JAR_ITEM = ITEMS.create( "soul_jar", SoulJar::new ); + public static final RegistryObject< TatteredArmor > TATTERED_BOOTS_ITEM = ITEMS.create( "tattered_boots", TatteredArmor.boots() ); + public static final RegistryObject< TatteredArmor > TATTERED_CHESTPLATE_ITEM = ITEMS.create( "tattered_chestplate", TatteredArmor.chestplate() ); + public static final RegistryObject< TatteredArmor > TATTERED_HELMET_ITEM = ITEMS.create( "tattered_helmet", TatteredArmor.helmet() ); + public static final RegistryObject< TatteredArmor > TATTERED_LEGGINGS_ITEM = ITEMS.create( "tattered_leggings", TatteredArmor.leggings() ); + public static final RegistryObject< UndeadBattleStandard > UNDEAD_BATTLE_STANDARD_ITEM = ITEMS.create( "undead_battle_standard", UndeadBattleStandard::new ); + public static final RegistryObject< WitherSword > WITHER_SWORD_ITEM = ITEMS.create( "wither_sword", WitherSword::new ); + + // Items (blocks) + public static final RegistryObject< EnderiumBlock.Item > ENDERIUM_BLOCK_ITEM = ITEMS.create( "enderium_block", EnderiumBlock.Item::new ); + public static final RegistryObject< EnderiumShardOre.Item > ENDERIUM_SHARD_ORE_ITEM = ITEMS.create( "enderium_shard_ore", EnderiumShardOre.Item::new ); + public static final RegistryObject< FragileEndStone.Item > FRAGILE_END_STONE_ITEM = ITEMS.create( "fragile_end_stone", FragileEndStone.Item::new ); + public static final RegistryObject< InfernalSponge.Item > INFERNAL_SPONGE_ITEM = ITEMS.create( "infernal_sponge", InfernalSponge.Item::new ); + public static final RegistryObject< InfestedEndStone.Item > INFESTED_END_STONE_ITEM = ITEMS.create( "infested_end_stone", InfestedEndStone.Item::new ); + public static final RegistryObject< SoakedInfernalSponge.Item > SOAKED_INFERNAL_SPONGE_ITEM = ITEMS.create( "soaked_infernal_sponge", SoakedInfernalSponge.Item::new ); + + // Items (spawn eggs) + public static final RegistryObject< SpawnEggItem > CERBERUS_SPAWN_EGG_ITEM = ITEMS.create( "cerberus_spawn_egg", ItemHelper.createEgg( CERBERUS_ENTITY, 0x212121, 0xe0e0e0 ) ); + public static final RegistryObject< SpawnEggItem > CREEPERLING_SPAWN_EGG_ITEM = ITEMS.create( "creeperling_spawn_egg", ItemHelper.createEgg( CREEPERLING_ENTITY, 0x0da70b, 0x000000 ) ); + public static final RegistryObject< SpawnEggItem > CURSED_ARMOR_SPAWN_EGG_ITEM = ITEMS.create( "cursed_armor_spawn_egg", ItemHelper.createEgg( CURSED_ARMOR_ENTITY, 0x808080, 0xe1e1e1 ) ); + public static final RegistryObject< SpawnEggItem > GIANT_SPAWN_EGG_ITEM = ITEMS.create( "giant_spawn_egg", ItemHelper.createEgg( GIANT_ENTITY, 0x00afaf, 0x799c65 ) ); + public static final RegistryObject< SpawnEggItem > ILLUSIONER_SPAWN_EGG_ITEM = ITEMS.create( "illusioner_spawn_egg", ItemHelper.createEgg( ILLUSIONER_ENTITY, 0x3e293c, 0x959b9b ) ); + public static final RegistryObject< SpawnEggItem > TANK_SPAWN_EGG_ITEM = ITEMS.create( "tank_spawn_egg", ItemHelper.createEgg( TANK_ENTITY, 0xc1c1c1, 0x949494 ) ); + + // Items (treasure bags) + public static final RegistryObject< TreasureBag > ANGLER_TREASURE_BAG_ITEM = ITEMS.create( "angler_treasure_bag", TreasureBag.angler() ); + public static final RegistryObject< TreasureBag > ELDER_GUARDIAN_TREASURE_BAG_ITEM = ITEMS.create( "elder_guardian_treasure_bag", TreasureBag.elderGuardian() ); + public static final RegistryObject< TreasureBag > ENDER_DRAGON_TREASURE_BAG_ITEM = ITEMS.create( "ender_dragon_treasure_bag", TreasureBag.enderDragon() ); + public static final RegistryObject< TreasureBag > PILLAGER_TREASURE_BAG_ITEM = ITEMS.create( "pillager_treasure_bag", TreasureBag.pillager() ); + public static final RegistryObject< TreasureBag > UNDEAD_ARMY_TREASURE_BAG_ITEM = ITEMS.create( "undead_army_treasure_bag", TreasureBag.undeadArmy() ); + public static final RegistryObject< TreasureBag > WARDEN_TREASURE_BAG_ITEM = ITEMS.create( "warden_treasure_bag", TreasureBag.warden() ); + public static final RegistryObject< TreasureBag > WITHER_TREASURE_BAG_ITEM = ITEMS.create( "wither_treasure_bag", TreasureBag.wither() ); + + // Items (fake) + static { + ITEMS.create( "advancement_bleeding", FakeItem::new ); + ITEMS.create( "advancement_normal", FakeItem::new ); + ITEMS.create( "advancement_expert", FakeItem::new ); + ITEMS.create( "advancement_master", FakeItem::new ); } - public static class Effects { - public static final RegistryObject< Bleeding > BLEEDING = MOB_EFFECTS.create( "bleeding", Bleeding::new ); - public static final RegistryObject< BleedingImmunity > BLEEDING_IMMUNITY = MOB_EFFECTS.create( "bleeding_immunity", BleedingImmunity::new ); - public static final RegistryObject< GlassRegeneration > GLASS_REGENERATION = MOB_EFFECTS.create( "glass_regeneration", GlassRegeneration::new ); - } + // Potions + public static final RegistryObject< Potion > WITHER_POTION = POTIONS.create( "wither", ()->new Potion( new MobEffectInstance( MobEffects.WITHER, TimeHelper.toTicks( 40.0 ) ) ) ); + public static final RegistryObject< Potion > WITHER_LONG_POTION = POTIONS.create( "long_wither", ()->new Potion( "wither", new MobEffectInstance( MobEffects.WITHER, TimeHelper.toTicks( 80.0 ) ) ) ); + public static final RegistryObject< Potion > WITHER_STRONG_POTION = POTIONS.create( "strong_wither", ()->new Potion( "wither", new MobEffectInstance( MobEffects.WITHER, TimeHelper.toTicks( 20.0 ), 1 ) ) ); - public static class Blocks { - public static final RegistryObject< EnderiumBlock > ENDERIUM_BLOCK = BLOCKS.create( "enderium_block", EnderiumBlock::new ); - public static final RegistryObject< EnderiumShardOre > ENDERIUM_SHARD_ORE = BLOCKS.create( "enderium_shard_ore", EnderiumShardOre::new ); - public static final RegistryObject< FragileEndStone > FRAGILE_END_STONE = BLOCKS.create( "fragile_end_stone", FragileEndStone::new ); - public static final RegistryObject< InfernalSponge > INFERNAL_SPONGE = BLOCKS.create( "infernal_sponge", InfernalSponge::new ); - public static final RegistryObject< InfestedEndStone > INFESTED_END_STONE = BLOCKS.create( "infested_end_stone", InfestedEndStone::new ); - public static final RegistryObject< SoakedInfernalSponge > SOAKED_INFERNAL_SPONGE = BLOCKS.create( "soaked_infernal_sponge", SoakedInfernalSponge::new ); - } + // Particles + public static final RegistryObject< SimpleParticleType > BLOOD_PARTICLE = PARTICLES.create( "blood", ()->new SimpleParticleType( true ) {} ); - public static class Items { - public static final RegistryObject< Bandage > BANDAGE = ITEMS.create( "bandage", Bandage.normal() ); - public static final RegistryObject< CerberusFang > CERBERUS_FANG = ITEMS.create( "cerberus_fang", CerberusFang::new ); - public static final RegistryObject< Cloth > CLOTH = ITEMS.create( "cloth", Cloth::new ); - public static final RegistryObject< EnderiumTool.Axe > ENDERIUM_AXE = ITEMS.create( "enderium_axe", EnderiumTool.Axe::new ); - public static final RegistryObject< EnderiumArmor > ENDERIUM_BOOTS = ITEMS.create( "enderium_boots", EnderiumArmor.boots() ); - public static final RegistryObject< EnderiumArmor > ENDERIUM_CHESTPLATE = ITEMS.create( "enderium_chestplate", EnderiumArmor.chestplate() ); - public static final RegistryObject< EnderiumArmor > ENDERIUM_HELMET = ITEMS.create( "enderium_helmet", EnderiumArmor.helmet() ); - public static final RegistryObject< EnderiumTool.Hoe > ENDERIUM_HOE = ITEMS.create( "enderium_hoe", EnderiumTool.Hoe::new ); - public static final RegistryObject< EnderiumIngot > ENDERIUM_INGOT = ITEMS.create( "enderium_ingot", EnderiumIngot::new ); - public static final RegistryObject< EnderiumArmor > ENDERIUM_LEGGINGS = ITEMS.create( "enderium_leggings", EnderiumArmor.leggings() ); - public static final RegistryObject< EnderiumTool.Pickaxe > ENDERIUM_PICKAXE = ITEMS.create( "enderium_pickaxe", EnderiumTool.Pickaxe::new ); - public static final RegistryObject< EnderiumShard > ENDERIUM_SHARD = ITEMS.create( "enderium_shard", EnderiumShard::new ); - public static final RegistryObject< EnderiumShardLocator > ENDERIUM_SHARD_LOCATOR = ITEMS.create( "enderium_shard_locator", EnderiumShardLocator::new ); - public static final RegistryObject< EnderiumTool.Shovel > ENDERIUM_SHOVEL = ITEMS.create( "enderium_shovel", EnderiumTool.Shovel::new ); - public static final RegistryObject< EnderiumTool.Sword > ENDERIUM_SWORD = ITEMS.create( "enderium_sword", EnderiumTool.Sword::new ); - public static final RegistryObject< EnderiumSmithingTemplate > ENDERIUM_SMITHING_TEMPLATE = ITEMS.create( "enderium_upgrade_smithing_template", EnderiumSmithingTemplate::new ); - public static final RegistryObject< EnderPouch > ENDER_POUCH = ITEMS.create( "ender_pouch", EnderPouch::new ); - public static final RegistryObject< EvokerFangScroll > EVOKER_FANG_SCROLL = ITEMS.create( "evoker_fang_scroll", EvokerFangScroll::new ); - public static final RegistryObject< Bandage > GOLDEN_BANDAGE = ITEMS.create( "golden_bandage", Bandage.golden() ); - public static final RegistryObject< RecallPotion > RECALL_POTION = ITEMS.create( "recall_potion", RecallPotion::new ); - public static final RegistryObject< SonicBoomScroll > SONIC_BOOM_SCROLL = ITEMS.create( "sonic_boom_scroll", SonicBoomScroll::new ); - public static final RegistryObject< SoulJar > SOUL_JAR = ITEMS.create( "soul_jar", SoulJar::new ); - public static final RegistryObject< TatteredArmor > TATTERED_BOOTS = ITEMS.create( "tattered_boots", TatteredArmor.boots() ); - public static final RegistryObject< TatteredArmor > TATTERED_CHESTPLATE = ITEMS.create( "tattered_chestplate", TatteredArmor.chestplate() ); - public static final RegistryObject< TatteredArmor > TATTERED_HELMET = ITEMS.create( "tattered_helmet", TatteredArmor.helmet() ); - public static final RegistryObject< TatteredArmor > TATTERED_LEGGINGS = ITEMS.create( "tattered_leggings", TatteredArmor.leggings() ); - public static final RegistryObject< UndeadBattleStandard > UNDEAD_BATTLE_STANDARD = ITEMS.create( "undead_battle_standard", UndeadBattleStandard::new ); - public static final RegistryObject< WitherSword > WITHER_SWORD = ITEMS.create( "wither_sword", WitherSword::new ); - - // Items (blocks) - public static final RegistryObject< EnderiumBlock.Item > ENDERIUM_BLOCK = ITEMS.create( "enderium_block", EnderiumBlock.Item::new ); - public static final RegistryObject< EnderiumShardOre.Item > ENDERIUM_SHARD_ORE = ITEMS.create( "enderium_shard_ore", EnderiumShardOre.Item::new ); - public static final RegistryObject< FragileEndStone.Item > FRAGILE_END_STONE = ITEMS.create( "fragile_end_stone", FragileEndStone.Item::new ); - public static final RegistryObject< InfernalSponge.Item > INFERNAL_SPONGE = ITEMS.create( "infernal_sponge", InfernalSponge.Item::new ); - public static final RegistryObject< InfestedEndStone.Item > INFESTED_END_STONE = ITEMS.create( "infested_end_stone", InfestedEndStone.Item::new ); - public static final RegistryObject< SoakedInfernalSponge.Item > SOAKED_INFERNAL_SPONGE = ITEMS.create( "soaked_infernal_sponge", SoakedInfernalSponge.Item::new ); - - // Items (spawn eggs) - public static final RegistryObject< SpawnEggItem > CERBERUS_SPAWN_EGG = ITEMS.create( "cerberus_spawn_egg", ItemHelper.createEgg( Entities.CERBERUS, 0x212121, 0xe0e0e0 ) ); - public static final RegistryObject< SpawnEggItem > CREEPERLING_SPAWN_EGG = ITEMS.create( "creeperling_spawn_egg", ItemHelper.createEgg( Entities.CREEPERLING, 0x0da70b, 0x000000 ) ); - public static final RegistryObject< SpawnEggItem > CURSED_ARMOR_SPAWN_EGG = ITEMS.create( "cursed_armor_spawn_egg", ItemHelper.createEgg( Entities.CURSED_ARMOR, 0x808080, 0xe1e1e1 ) ); - public static final RegistryObject< SpawnEggItem > GIANT_SPAWN_EGG = ITEMS.create( "giant_spawn_egg", ItemHelper.createEgg( Entities.GIANT, 0x00afaf, 0x799c65 ) ); - public static final RegistryObject< SpawnEggItem > ILLUSIONER_SPAWN_EGG = ITEMS.create( "illusioner_spawn_egg", ItemHelper.createEgg( Entities.ILLUSIONER, 0x3e293c, 0x959b9b ) ); - public static final RegistryObject< SpawnEggItem > TANK_SPAWN_EGG = ITEMS.create( "tank_spawn_egg", ItemHelper.createEgg( Entities.TANK, 0xc1c1c1, 0x949494 ) ); - - // Items (treasure bags) - public static final RegistryObject< TreasureBag > ANGLER_TREASURE_BAG = ITEMS.create( "angler_treasure_bag", TreasureBag.angler() ); - public static final RegistryObject< TreasureBag > ELDER_GUARDIAN_TREASURE_BAG = ITEMS.create( "elder_guardian_treasure_bag", TreasureBag.elderGuardian() ); - public static final RegistryObject< TreasureBag > ENDER_DRAGON_TREASURE_BAG = ITEMS.create( "ender_dragon_treasure_bag", TreasureBag.enderDragon() ); - public static final RegistryObject< TreasureBag > PILLAGER_TREASURE_BAG = ITEMS.create( "pillager_treasure_bag", TreasureBag.pillager() ); - public static final RegistryObject< TreasureBag > UNDEAD_ARMY_TREASURE_BAG = ITEMS.create( "undead_army_treasure_bag", TreasureBag.undeadArmy() ); - public static final RegistryObject< TreasureBag > WARDEN_TREASURE_BAG = ITEMS.create( "warden_treasure_bag", TreasureBag.warden() ); - public static final RegistryObject< TreasureBag > WITHER_TREASURE_BAG = ITEMS.create( "wither_treasure_bag", TreasureBag.wither() ); - - // Items (fake) - static { - ITEMS.create( "advancement_bleeding", FakeItem::new ); - ITEMS.create( "advancement_normal", FakeItem::new ); - ITEMS.create( "advancement_expert", FakeItem::new ); - ITEMS.create( "advancement_master", FakeItem::new ); - } - } + // Loot Functions + public static final RegistryObject< LootItemFunctionType > CURSE_RANDOMLY_LOOT_FUNCTION = LOOT_FUNCTIONS.create( "curse_randomly", CurseRandomly::create ); - public static class Potions { - public static final RegistryObject< Potion > WITHER = POTIONS.create( "wither", ()->new Potion( new MobEffectInstance( MobEffects.WITHER, TimeHelper.toTicks( 40.0 ) ) ) ); - public static final RegistryObject< Potion > WITHER_LONG = POTIONS.create( "long_wither", ()->new Potion( "wither", new MobEffectInstance( MobEffects.WITHER, TimeHelper.toTicks( 80.0 ) ) ) ); - public static final RegistryObject< Potion > WITHER_STRONG = POTIONS.create( "strong_wither", ()->new Potion( "wither", new MobEffectInstance( MobEffects.WITHER, TimeHelper.toTicks( 20.0 ), 1 ) ) ); - } + // Creative Mode Tabs + public static final RegistryObject< CreativeModeTab > PRIMARY_MODE_TAB = CREATIVE_MODE_TABS.create( "primary", com.majruszsdifficulty.items.CreativeModeTabs.primary() ); - public static class Particles { - public static final RegistryObject< SimpleParticleType > BLOOD = PARTICLES.create( "blood", ()->new SimpleParticleType( true ) {} ); - } + // Placed Features + public static final ResourceKey< PlacedFeature > ENDERIUM_ORE_PLACED_FEATURE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "enderium_ore" ) ); + public static final ResourceKey< PlacedFeature > ENDERIUM_ORE_LARGE_PLACED_FEATURE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "enderium_ore_large" ) ); + public static final ResourceKey< PlacedFeature > FRAGILE_END_STONE_PLACED_FEATURE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "fragile_end_stone" ) ); + public static final ResourceKey< PlacedFeature > FRAGILE_END_STONE_LARGE_PLACED_FEATURE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "fragile_end_stone_large" ) ); + public static final ResourceKey< PlacedFeature > INFESTED_END_STONE_PLACED_FEATURE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "infested_end_stone" ) ); - public static class LootFunctions { - public static final RegistryObject< LootItemFunctionType > CURSE_RANDOMLY = LOOT_FUNCTIONS.create( "curse_randomly", CurseRandomly::create ); - } + // Damage Sources + public static final ResourceKey< DamageType > BLEEDING_DAMAGE_SOURCE = ResourceKey.create( Registries.DAMAGE_TYPE, HELPER.getLocation( "bleeding" ) ); - public static class CreativeModeTabs { - public static final RegistryObject< CreativeModeTab > PRIMARY = CREATIVE_MODE_TABS.create( "primary", com.majruszsdifficulty.items.CreativeModeTabs.primary() ); - } + // Advancements + public static final GameStageAdvancement GAME_STAGE_ADVANCEMENT = new GameStageAdvancement(); - public static class PlacedFeatures { - public static final ResourceKey< PlacedFeature > ENDERIUM_ORE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "enderium_ore" ) ); - public static final ResourceKey< PlacedFeature > ENDERIUM_ORE_LARGE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "enderium_ore_large" ) ); - public static final ResourceKey< PlacedFeature > FRAGILE_END_STONE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "fragile_end_stone" ) ); - public static final ResourceKey< PlacedFeature > FRAGILE_END_STONE_LARGE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "fragile_end_stone_large" ) ); - public static final ResourceKey< PlacedFeature > INFESTED_END_STONE = ResourceKey.create( Registries.PLACED_FEATURE, HELPER.getLocation( "infested_end_stone" ) ); - } + // Sounds + public static final RegistryObject< SoundEvent > UNDEAD_ARMY_APPROACHING_SOUND = MajruszsDifficulty.register( "undead_army.approaching" ); + public static final RegistryObject< SoundEvent > UNDEAD_ARMY_WAVE_STARTED_SOUND = MajruszsDifficulty.register( "undead_army.wave_started" ); - public static class DamageSources { - public static final ResourceKey< DamageType > BLEEDING = ResourceKey.create( Registries.DAMAGE_TYPE, HELPER.getLocation( "bleeding" ) ); - } - - public static class Advancements { - public static final GameStageAdvancement GAME_STAGE = new GameStageAdvancement(); - } - - public static class Sounds { - public static final RegistryObject< SoundEvent > UNDEAD_ARMY_APPROACHING = Sounds.register( "undead_army.approaching" ); - public static final RegistryObject< SoundEvent > UNDEAD_ARMY_WAVE_STARTED = Sounds.register( "undead_army.wave_started" ); - - private static RegistryObject< SoundEvent > register( String name ) { - return SOUND_EVENTS.create( name, ()->SoundEvent.createVariableRangeEvent( HELPER.getLocation( name ) ) ); - } - } - - public static class Recipes { - public static final RegistryObject< RecipeSerializer< ? > > SOUL_JAR_SHIELD = RECIPES.create( "soul_jar_shield", SoulJarShieldRecipe.create() ); - } - - public static class Network { - public static final NetworkObject< TreasureBag.RightClickAction > TREASURE_BAG_RIGHT_CLICK = HELPER.create( "treasure_bag_right_click", TreasureBag.RightClickAction.class ); - public static final NetworkObject< TreasureBagHelper.Progress > TREASURE_BAG_PROGRESS = HELPER.create( "treasure_bag_progress", TreasureBagHelper.Progress.class ); - } + // Recipes + public static final RegistryObject< RecipeSerializer< ? > > SOUL_JAR_SHIELD_RECIPE = RECIPES.create( "soul_jar_shield", SoulJarShieldRecipe.create() ); static { OnGameInitialized.listen( MajruszsDifficulty::addDefaultEmitters ); HELPER.create( Custom.Advancements.class, advancements->{ - advancements.register( Advancements.GAME_STAGE ); + advancements.register( GAME_STAGE_ADVANCEMENT ); } ); HELPER.create( Custom.Attributes.class, attributes->{ - attributes.register( Entities.CERBERUS.get(), Cerberus.createAttributes() ); - attributes.register( Entities.CURSED_ARMOR.get(), CursedArmor.createAttributes() ); - attributes.register( Entities.CREEPERLING.get(), Creeperling.createChildAttributes() ); - attributes.register( Entities.GIANT.get(), Giant.createAttributes() ); - attributes.register( Entities.ILLUSIONER.get(), Illusioner.createAttributes().build() ); - attributes.register( Entities.TANK.get(), Tank.createAttributes() ); + attributes.register( CERBERUS_ENTITY.get(), Cerberus.createAttributes() ); + attributes.register( CURSED_ARMOR_ENTITY.get(), CursedArmor.createAttributes() ); + attributes.register( CREEPERLING_ENTITY.get(), Creeperling.createChildAttributes() ); + attributes.register( GIANT_ENTITY.get(), Giant.createAttributes() ); + attributes.register( ILLUSIONER_ENTITY.get(), Illusioner.createAttributes().build() ); + attributes.register( TANK_ENTITY.get(), Tank.createAttributes() ); } ); HELPER.create( Custom.SpawnPlacements.class, spawnPlacements->{ - spawnPlacements.register( Entities.CERBERUS.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cerberus::checkMonsterSpawnRules ); - spawnPlacements.register( Entities.CURSED_ARMOR.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CursedArmor::checkMonsterSpawnRules ); - spawnPlacements.register( Entities.CREEPERLING.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Creeperling::checkMonsterSpawnRules ); - spawnPlacements.register( Entities.GIANT.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Giant::checkMonsterSpawnRules ); - spawnPlacements.register( Entities.ILLUSIONER.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Illusioner::checkMonsterSpawnRules ); - spawnPlacements.register( Entities.TANK.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Tank::checkMonsterSpawnRules ); + spawnPlacements.register( CERBERUS_ENTITY.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cerberus::checkMonsterSpawnRules ); + spawnPlacements.register( CURSED_ARMOR_ENTITY.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CursedArmor::checkMonsterSpawnRules ); + spawnPlacements.register( CREEPERLING_ENTITY.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Creeperling::checkMonsterSpawnRules ); + spawnPlacements.register( GIANT_ENTITY.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Giant::checkMonsterSpawnRules ); + spawnPlacements.register( ILLUSIONER_ENTITY.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Illusioner::checkMonsterSpawnRules ); + spawnPlacements.register( TANK_ENTITY.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Tank::checkMonsterSpawnRules ); } ); } + private static RegistryObject< SoundEvent > register( String name ) { + return SOUND_EVENTS.create( name, ()->SoundEvent.createVariableRangeEvent( HELPER.getLocation( name ) ) ); + } + private static void addDefaultEmitters( OnGameInitialized data ) { - ParticleEmitter.setDefault( Particles.BLOOD.get(), new ParticleEmitter.Properties( ParticleEmitter.offset( 0.5f ), ParticleEmitter.speed( 0.025f, 0.075f ) ) ); + ParticleEmitter.setDefault( BLOOD_PARTICLE.get(), new ParticleEmitter.Properties( ParticleEmitter.offset( 0.5f ), ParticleEmitter.speed( 0.025f, 0.075f ) ) ); } + private MajruszsDifficulty() {} + @OnlyIn( Dist.CLIENT ) public static class Client { static { HELPER.create( Custom.ItemProperties.class, itemProperties->{ - itemProperties.register( MajruszsDifficulty.Items.ENDERIUM_SHARD_LOCATOR.get(), new ResourceLocation( "shard_distance" ), EnderiumShardLocator.Client::getShardDistance ); + itemProperties.register( MajruszsDifficulty.ENDERIUM_SHARD_LOCATOR_ITEM.get(), new ResourceLocation( "shard_distance" ), EnderiumShardLocator.Client::getShardDistance ); } ); HELPER.create( Custom.ModelLayers.class, modelLayers->{ @@ -260,23 +248,23 @@ public static class Client { } ); HELPER.create( Custom.Particles.class, particles->{ - particles.register( Particles.BLOOD.get(), BloodParticle.Factory::new ); + particles.register( MajruszsDifficulty.BLOOD_PARTICLE.get(), BloodParticle.Factory::new ); } ); HELPER.create( Custom.PotionRecipe.class, recipes->{ - recipes.register( ()->net.minecraft.world.item.alchemy.Potions.WATER, Items.CERBERUS_FANG, ()->net.minecraft.world.item.alchemy.Potions.MUNDANE ); - recipes.register( ()->net.minecraft.world.item.alchemy.Potions.AWKWARD, Items.CERBERUS_FANG, Potions.WITHER ); - recipes.register( Potions.WITHER, ()->net.minecraft.world.item.Items.REDSTONE, Potions.WITHER_LONG ); - recipes.register( Potions.WITHER, ()->net.minecraft.world.item.Items.GLOWSTONE_DUST, Potions.WITHER_STRONG ); + recipes.register( ()->net.minecraft.world.item.alchemy.Potions.WATER, MajruszsDifficulty.CERBERUS_FANG_ITEM, ()->net.minecraft.world.item.alchemy.Potions.MUNDANE ); + recipes.register( ()->net.minecraft.world.item.alchemy.Potions.AWKWARD, MajruszsDifficulty.CERBERUS_FANG_ITEM, MajruszsDifficulty.WITHER_POTION ); + recipes.register( MajruszsDifficulty.WITHER_POTION, ()->net.minecraft.world.item.Items.REDSTONE, MajruszsDifficulty.WITHER_LONG_POTION ); + recipes.register( MajruszsDifficulty.WITHER_POTION, ()->net.minecraft.world.item.Items.GLOWSTONE_DUST, MajruszsDifficulty.WITHER_STRONG_POTION ); } ); HELPER.create( Custom.Renderers.class, renderers->{ - renderers.register( Entities.CERBERUS.get(), CerberusRenderer::new ); - renderers.register( Entities.CURSED_ARMOR.get(), CursedArmorRenderer::new ); - renderers.register( Entities.CREEPERLING.get(), CreeperlingRenderer::new ); - renderers.register( Entities.GIANT.get(), GiantRenderer::new ); - renderers.register( Entities.ILLUSIONER.get(), IllusionerRenderer::new ); - renderers.register( Entities.TANK.get(), TankRenderer::new ); + renderers.register( CERBERUS_ENTITY.get(), CerberusRenderer::new ); + renderers.register( CURSED_ARMOR_ENTITY.get(), CursedArmorRenderer::new ); + renderers.register( CREEPERLING_ENTITY.get(), CreeperlingRenderer::new ); + renderers.register( GIANT_ENTITY.get(), GiantRenderer::new ); + renderers.register( ILLUSIONER_ENTITY.get(), IllusionerRenderer::new ); + renderers.register( TANK_ENTITY.get(), TankRenderer::new ); } ); } } diff --git a/common/src/main/java/com/majruszsdifficulty/blocks/EnderiumBlock.java b/common/src/main/java/com/majruszsdifficulty/blocks/EnderiumBlock.java index b1d9485a1..37ad83f3a 100644 --- a/common/src/main/java/com/majruszsdifficulty/blocks/EnderiumBlock.java +++ b/common/src/main/java/com/majruszsdifficulty/blocks/EnderiumBlock.java @@ -14,7 +14,7 @@ public EnderiumBlock() { public static class Item extends BlockItem { public Item() { - super( MajruszsDifficulty.Blocks.ENDERIUM_BLOCK.get(), new Properties().stacksTo( 64 ).rarity( Rarity.UNCOMMON ) ); + super( MajruszsDifficulty.ENDERIUM_BLOCK.get(), new Properties().stacksTo( 64 ).rarity( Rarity.UNCOMMON ) ); } } } diff --git a/common/src/main/java/com/majruszsdifficulty/blocks/EnderiumShardOre.java b/common/src/main/java/com/majruszsdifficulty/blocks/EnderiumShardOre.java index 73894d8db..fcd901a4c 100644 --- a/common/src/main/java/com/majruszsdifficulty/blocks/EnderiumShardOre.java +++ b/common/src/main/java/com/majruszsdifficulty/blocks/EnderiumShardOre.java @@ -31,7 +31,7 @@ protected void tryDropExperience( ServerLevel level, BlockPos position, ItemStac public static class Item extends BlockItem { public Item() { - super( MajruszsDifficulty.Blocks.ENDERIUM_SHARD_ORE.get(), new Properties().stacksTo( 64 ) ); + super( MajruszsDifficulty.ENDERIUM_SHARD_ORE_BLOCK.get(), new Properties().stacksTo( 64 ) ); } } } diff --git a/common/src/main/java/com/majruszsdifficulty/blocks/FragileEndStone.java b/common/src/main/java/com/majruszsdifficulty/blocks/FragileEndStone.java index 998bc3073..ffc8a7de1 100644 --- a/common/src/main/java/com/majruszsdifficulty/blocks/FragileEndStone.java +++ b/common/src/main/java/com/majruszsdifficulty/blocks/FragileEndStone.java @@ -64,7 +64,7 @@ private static void destroy( Level level, BlockState blockState, BlockPos blockP public static class Item extends BlockItem { public Item() { - super( MajruszsDifficulty.Blocks.FRAGILE_END_STONE.get(), new Properties().stacksTo( 64 ) ); + super( MajruszsDifficulty.FRAGILE_END_STONE_BLOCK.get(), new Properties().stacksTo( 64 ) ); } } } diff --git a/common/src/main/java/com/majruszsdifficulty/blocks/InfernalSponge.java b/common/src/main/java/com/majruszsdifficulty/blocks/InfernalSponge.java index 9fef21ae0..2262baa66 100644 --- a/common/src/main/java/com/majruszsdifficulty/blocks/InfernalSponge.java +++ b/common/src/main/java/com/majruszsdifficulty/blocks/InfernalSponge.java @@ -19,7 +19,7 @@ public class InfernalSponge extends Block { static { OnBlockPlaced.listen( InfernalSponge::absorb ) .addCondition( Condition.isLogicalServer() ) - .addCondition( data->data.blockState.is( MajruszsDifficulty.Blocks.INFERNAL_SPONGE.get() ) ); + .addCondition( data->data.blockState.is( MajruszsDifficulty.INFERNAL_SPONGE_BLOCK.get() ) ); } public InfernalSponge() { @@ -68,13 +68,13 @@ private static void absorb( Level level, BlockPos spongePos ) { } ) - 1; if( absorbedBlocks > 0 ) { - level.setBlock( spongePos, MajruszsDifficulty.Blocks.SOAKED_INFERNAL_SPONGE.get().defaultBlockState(), 2 ); + level.setBlock( spongePos, MajruszsDifficulty.SOAKED_INFERNAL_SPONGE_BLOCK.get().defaultBlockState(), 2 ); } } public static class Item extends BlockItem { public Item() { - super( MajruszsDifficulty.Blocks.INFERNAL_SPONGE.get(), new Properties().rarity( Rarity.UNCOMMON ).fireResistant() ); + super( MajruszsDifficulty.INFERNAL_SPONGE_BLOCK.get(), new Properties().rarity( Rarity.UNCOMMON ).fireResistant() ); } } } diff --git a/common/src/main/java/com/majruszsdifficulty/blocks/InfestedEndStone.java b/common/src/main/java/com/majruszsdifficulty/blocks/InfestedEndStone.java index b8ab5e4bb..4faedac2c 100644 --- a/common/src/main/java/com/majruszsdifficulty/blocks/InfestedEndStone.java +++ b/common/src/main/java/com/majruszsdifficulty/blocks/InfestedEndStone.java @@ -59,7 +59,7 @@ private void tryToSpawnEndermite( Level level, ItemStack itemStack, BlockPos blo public static class Item extends BlockItem { public Item() { - super( MajruszsDifficulty.Blocks.INFESTED_END_STONE.get(), new Properties().stacksTo( 64 ) ); + super( MajruszsDifficulty.INFESTED_END_STONE_BLOCK.get(), new Properties().stacksTo( 64 ) ); } } } diff --git a/common/src/main/java/com/majruszsdifficulty/blocks/SoakedInfernalSponge.java b/common/src/main/java/com/majruszsdifficulty/blocks/SoakedInfernalSponge.java index 5b6b50dbd..6be32ddfc 100644 --- a/common/src/main/java/com/majruszsdifficulty/blocks/SoakedInfernalSponge.java +++ b/common/src/main/java/com/majruszsdifficulty/blocks/SoakedInfernalSponge.java @@ -31,7 +31,7 @@ public class SoakedInfernalSponge extends Block { static { OnBlockPlaced.listen( SoakedInfernalSponge::tryToConvert ) .addCondition( Condition.isLogicalServer() ) - .addCondition( data->data.blockState.is( MajruszsDifficulty.Blocks.SOAKED_INFERNAL_SPONGE.get() ) ); + .addCondition( data->data.blockState.is( MajruszsDifficulty.SOAKED_INFERNAL_SPONGE_BLOCK.get() ) ); } public SoakedInfernalSponge() { @@ -98,7 +98,7 @@ private static void tryToConvert( Level level, BlockPos blockPos ) { for( Direction direction : Direction.values() ) { FluidState fluidState = level.getFluidState( blockPos.relative( direction ) ); if( fluidState.is( Fluids.WATER ) || fluidState.is( Fluids.FLOWING_WATER ) ) { - level.setBlock( blockPos, MajruszsDifficulty.Blocks.INFERNAL_SPONGE.get().defaultBlockState(), 2 ); + level.setBlock( blockPos, MajruszsDifficulty.INFERNAL_SPONGE_BLOCK.get().defaultBlockState(), 2 ); SoundEmitter.of( SoundEvents.LAVA_EXTINGUISH ) .position( blockPos.getCenter() ) .emit( level ); @@ -109,7 +109,7 @@ private static void tryToConvert( Level level, BlockPos blockPos ) { public static class Item extends BlockItem { public Item() { - super( MajruszsDifficulty.Blocks.SOAKED_INFERNAL_SPONGE.get(), new Properties().rarity( Rarity.UNCOMMON ).fireResistant() ); + super( MajruszsDifficulty.SOAKED_INFERNAL_SPONGE_BLOCK.get(), new Properties().rarity( Rarity.UNCOMMON ).fireResistant() ); } } } diff --git a/common/src/main/java/com/majruszsdifficulty/bloodmoon/BloodMoon.java b/common/src/main/java/com/majruszsdifficulty/bloodmoon/BloodMoon.java index 3a28558f9..238d822c2 100644 --- a/common/src/main/java/com/majruszsdifficulty/bloodmoon/BloodMoon.java +++ b/common/src/main/java/com/majruszsdifficulty/bloodmoon/BloodMoon.java @@ -14,10 +14,6 @@ public class BloodMoon { .define( "is_active", Reader.bool(), s->s.isActive, ( s, v )->s.isActive = v ); } - public boolean setActive( boolean isActive ) { - return isActive ? this.start() : this.finish(); - } - public boolean start() { if( !this.isActive && BloodMoonHelper.isValidDayTime() && !Events.dispatch( new OnBloodMoonStarted() ).isCancelled() ) { this.isActive = true; diff --git a/common/src/main/java/com/majruszsdifficulty/bloodmoon/BloodMoonHelper.java b/common/src/main/java/com/majruszsdifficulty/bloodmoon/BloodMoonHelper.java index 617a8879e..4395596cd 100644 --- a/common/src/main/java/com/majruszsdifficulty/bloodmoon/BloodMoonHelper.java +++ b/common/src/main/java/com/majruszsdifficulty/bloodmoon/BloodMoonHelper.java @@ -16,7 +16,7 @@ public class BloodMoonHelper { .define( "blood_moon", Reader.custom( BloodMoon::new ), ()->BLOOD_MOON, v->BLOOD_MOON = v ); Serializables.getStatic( WorldData.Client.class ) - .define( "blood_moon", Reader.bool(), ()->BLOOD_MOON.isActive(), v->BLOOD_MOON.setActive( v ) ); + .define( "blood_moon", Reader.bool(), ()->BLOOD_MOON.isActive(), v->BLOOD_MOON.isActive = v ); } public static boolean start() { diff --git a/common/src/main/java/com/majruszsdifficulty/data/WorldData.java b/common/src/main/java/com/majruszsdifficulty/data/WorldData.java index 2b3867e46..6652c7c0d 100644 --- a/common/src/main/java/com/majruszsdifficulty/data/WorldData.java +++ b/common/src/main/java/com/majruszsdifficulty/data/WorldData.java @@ -1,5 +1,13 @@ package com.majruszsdifficulty.data; +import com.majruszlibrary.data.Serializables; + public class WorldData { + static { + Serializables.getStatic( WorldData.class ); + + Serializables.getStatic( WorldData.Client.class ); + } + public static class Client {} } diff --git a/common/src/main/java/com/majruszsdifficulty/effects/Bleeding.java b/common/src/main/java/com/majruszsdifficulty/effects/Bleeding.java index 9d50ddc57..9b23cd85b 100644 --- a/common/src/main/java/com/majruszsdifficulty/effects/Bleeding.java +++ b/common/src/main/java/com/majruszsdifficulty/effects/Bleeding.java @@ -56,7 +56,7 @@ public static class MobEffectInstance extends net.minecraft.world.effect.MobEffe public final @Nullable Entity damageSourceEntity; public MobEffectInstance( int duration, int amplifier, @Nullable LivingEntity attacker ) { - super( MajruszsDifficulty.Effects.BLEEDING.get(), duration, amplifier, false, false, true ); + super( MajruszsDifficulty.BLEEDING_EFFECT.get(), duration, amplifier, false, false, true ); this.damageSourceEntity = attacker; } diff --git a/common/src/main/java/com/majruszsdifficulty/effects/BleedingImmunity.java b/common/src/main/java/com/majruszsdifficulty/effects/BleedingImmunity.java index 6c409d84b..401b851c8 100644 --- a/common/src/main/java/com/majruszsdifficulty/effects/BleedingImmunity.java +++ b/common/src/main/java/com/majruszsdifficulty/effects/BleedingImmunity.java @@ -12,8 +12,8 @@ public class BleedingImmunity extends MobEffect { static { OnEntityEffectCheck.listen( OnEntityEffectCheck::cancelEffect ) - .addCondition( data->EffectHelper.has( MajruszsDifficulty.Effects.BLEEDING_IMMUNITY, data.entity ) ) - .addCondition( data->data.effect.equals( MajruszsDifficulty.Effects.BLEEDING.get() ) ); + .addCondition( data->EffectHelper.has( MajruszsDifficulty.BLEEDING_IMMUNITY_EFFECT, data.entity ) ) + .addCondition( data->data.effect.equals( MajruszsDifficulty.BLEEDING_EFFECT.get() ) ); } public BleedingImmunity() { @@ -25,7 +25,7 @@ public void applyEffectTick( LivingEntity entity, int amplifier ) {} @Override public void applyInstantenousEffect( @Nullable Entity source, @Nullable Entity indirectSource, LivingEntity entity, int amplifier, double health ) { - entity.removeEffect( MajruszsDifficulty.Effects.BLEEDING.get() ); + entity.removeEffect( MajruszsDifficulty.BLEEDING_EFFECT.get() ); } @Override diff --git a/common/src/main/java/com/majruszsdifficulty/effects/GlassRegeneration.java b/common/src/main/java/com/majruszsdifficulty/effects/GlassRegeneration.java index 948fbb3bd..8cdbade76 100644 --- a/common/src/main/java/com/majruszsdifficulty/effects/GlassRegeneration.java +++ b/common/src/main/java/com/majruszsdifficulty/effects/GlassRegeneration.java @@ -22,7 +22,7 @@ public class GlassRegeneration extends MobEffect { static { OnEntityDamaged.listen( GlassRegeneration::removeOnHit ) .addCondition( Condition.isLogicalServer() ) - .addCondition( data->EffectHelper.has( MajruszsDifficulty.Effects.GLASS_REGENERATION, data.target ) ); + .addCondition( data->EffectHelper.has( MajruszsDifficulty.GLASS_REGENERATION_EFFECT, data.target ) ); } public GlassRegeneration() { @@ -49,7 +49,7 @@ public boolean isDurationEffectTick( int duration, int amplifier ) { } private static void removeOnHit( OnEntityDamaged data ) { - data.target.removeEffect( MajruszsDifficulty.Effects.GLASS_REGENERATION.get() ); + data.target.removeEffect( MajruszsDifficulty.GLASS_REGENERATION_EFFECT.get() ); GLASS_BREAK.position( data.target.position() ).emit( data.getServerLevel() ); } } diff --git a/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingAppleProtection.java b/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingAppleProtection.java index e2f37f67f..c884f4a60 100644 --- a/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingAppleProtection.java +++ b/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingAppleProtection.java @@ -27,7 +27,7 @@ public class BleedingAppleProtection { } private static void cancelBleeding( OnItemEaten data ) { - data.entity.removeEffect( MajruszsDifficulty.Effects.BLEEDING.get() ); + data.entity.removeEffect( MajruszsDifficulty.BLEEDING_EFFECT.get() ); } private static void addTooltip( OnItemTooltip data ) { diff --git a/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingArmorProtection.java b/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingArmorProtection.java index 66df07b96..516306986 100644 --- a/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingArmorProtection.java +++ b/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingArmorProtection.java @@ -21,7 +21,7 @@ public class BleedingArmorProtection { static { OnEntityEffectCheck.listen( OnEntityEffectCheck::cancelEffect ) .addCondition( Condition.isLogicalServer() ) - .addCondition( data->data.effect.equals( MajruszsDifficulty.Effects.BLEEDING.get() ) ) + .addCondition( data->data.effect.equals( MajruszsDifficulty.BLEEDING_EFFECT.get() ) ) .addCondition( data->Random.check( BleedingArmorProtection.calculateCancelChance( data ) ) ); OnBleedingTooltip.listen( BleedingArmorProtection::addTooltip ) diff --git a/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingDamage.java b/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingDamage.java index 7db895d66..a55ef655f 100644 --- a/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingDamage.java +++ b/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingDamage.java @@ -32,7 +32,7 @@ public class BleedingDamage { OnEntityTicked.listen( BleedingDamage::tick ) .addCondition( Condition.isLogicalServer() ) - .addCondition( data->EffectHelper.has( MajruszsDifficulty.Effects.BLEEDING, data.entity ) ); + .addCondition( data->EffectHelper.has( MajruszsDifficulty.BLEEDING_EFFECT, data.entity ) ); } private static void tryToApply( OnEntityDamaged data ) { @@ -42,7 +42,7 @@ private static void tryToApply( OnEntityDamaged data ) { } private static void tick( OnEntityTicked data ) { - int amplifier = EffectHelper.getAmplifier( MajruszsDifficulty.Effects.BLEEDING, data.entity ).orElse( 0 ); + int amplifier = EffectHelper.getAmplifier( MajruszsDifficulty.BLEEDING_EFFECT, data.entity ).orElse( 0 ); int extraDuration = Random.round( 0.3 * ( amplifier + 2 ) * ( 7.26 * EntityHelper.getWalkDistanceDelta( data.entity ) + 1 ) ); int duration = ENTITY_TICKS.getOrDefault( data.entity.getId(), 0 ) + extraDuration; if( duration > DAMAGE_COOLDOWN ) { @@ -57,9 +57,9 @@ private static void dealDamage( LivingEntity entity ) { Holder< DamageType > damageType = entity.level() .registryAccess() .registryOrThrow( net.minecraft.core.registries.Registries.DAMAGE_TYPE ) - .getHolderOrThrow( MajruszsDifficulty.DamageSources.BLEEDING ); + .getHolderOrThrow( MajruszsDifficulty.BLEEDING_DAMAGE_SOURCE ); - if( entity.getEffect( MajruszsDifficulty.Effects.BLEEDING.get() ) instanceof Bleeding.MobEffectInstance effectInstance ) { + if( entity.getEffect( MajruszsDifficulty.BLEEDING_EFFECT.get() ) instanceof Bleeding.MobEffectInstance effectInstance ) { Vec3 motion = entity.getDeltaMovement(); entity.hurt( new DamageSource( damageType, null, effectInstance.damageSourceEntity ), 1.0f ); entity.setDeltaMovement( motion ); // sets previous motion to avoid any knockback from bleeding diff --git a/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingParticles.java b/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingParticles.java index 0c1731b1b..7be264b31 100644 --- a/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingParticles.java +++ b/common/src/main/java/com/majruszsdifficulty/effects/bleeding/BleedingParticles.java @@ -18,22 +18,22 @@ public class BleedingParticles { OnEntityTicked.listen( BleedingParticles::emit ) .addCondition( Condition.isLogicalServer() ) .addCondition( Condition.cooldown( 0.15f ) ) - .addCondition( data->EffectHelper.has( MajruszsDifficulty.Effects.BLEEDING, data.entity ) ); + .addCondition( data->EffectHelper.has( MajruszsDifficulty.BLEEDING_EFFECT, data.entity ) ); OnEntityDied.listen( BleedingParticles::emit ) .addCondition( Condition.isLogicalServer() ) - .addCondition( data->EffectHelper.has( MajruszsDifficulty.Effects.BLEEDING, data.target ) ); + .addCondition( data->EffectHelper.has( MajruszsDifficulty.BLEEDING_EFFECT, data.target ) ); OnEntityPreDamaged.listen( BleedingParticles::addGuiOverlay ) .priority( Priority.LOWEST ) - .addCondition( data->data.source.is( MajruszsDifficulty.DamageSources.BLEEDING ) ); + .addCondition( data->data.source.is( MajruszsDifficulty.BLEEDING_DAMAGE_SOURCE ) ); } private static void emit( OnEntityTicked data ) { - int amplifier = EffectHelper.getAmplifier( MajruszsDifficulty.Effects.BLEEDING, data.entity ).orElse( 0 ); + int amplifier = EffectHelper.getAmplifier( MajruszsDifficulty.BLEEDING_EFFECT, data.entity ).orElse( 0 ); float walkDistanceDelta = EntityHelper.getWalkDistanceDelta( data.entity ); - ParticleEmitter.of( MajruszsDifficulty.Particles.BLOOD ) + ParticleEmitter.of( MajruszsDifficulty.BLOOD_PARTICLE ) .count( Random.round( 0.5 + 0.5 * ( 15.0 + amplifier ) * walkDistanceDelta ) ) .sizeBased( data.entity ) .offset( AnyPos.from( data.entity.getBbWidth(), data.entity.getBbHeight(), data.entity.getBbWidth() ).mul( 0.25, 0.25, 0.25 ).vec3() ) @@ -41,7 +41,7 @@ private static void emit( OnEntityTicked data ) { } private static void emit( OnEntityDied data ) { - ParticleEmitter.of( MajruszsDifficulty.Particles.BLOOD ) + ParticleEmitter.of( MajruszsDifficulty.BLOOD_PARTICLE ) .count( 50 ) .sizeBased( data.target ) .offset( AnyPos.from( data.target.getBbWidth(), data.target.getBbHeight(), data.target.getBbWidth() ).mul( 0.25, 0.25, 0.25 ).vec3() ) diff --git a/common/src/main/java/com/majruszsdifficulty/entity/Cerberus.java b/common/src/main/java/com/majruszsdifficulty/entity/Cerberus.java index dfe40b015..62084cad7 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/Cerberus.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/Cerberus.java @@ -12,14 +12,13 @@ import com.majruszlibrary.events.base.Condition; import com.majruszlibrary.math.AnyPos; import com.majruszlibrary.math.Random; -import com.majruszlibrary.modhelper.LazyResource; +import com.majruszlibrary.modhelper.Resource; import com.majruszlibrary.time.TimeHelper; import com.majruszsdifficulty.MajruszsDifficulty; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.server.packs.PackType; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.damagesource.DamageSource; @@ -43,7 +42,7 @@ import net.minecraft.world.phys.Vec3; public class Cerberus extends Monster implements IAnimableEntity { - private static final LazyResource< AnimationsDef > ANIMATIONS = MajruszsDifficulty.HELPER.load( "cerberus_animation", AnimationsDef.class, PackType.SERVER_DATA ); + private static final Resource< AnimationsDef > ANIMATIONS = MajruszsDifficulty.HELPER.load( "cerberus_animation", AnimationsDef.class ); private final Animations animations = Animations.create(); static { diff --git a/common/src/main/java/com/majruszsdifficulty/entity/CerberusModel.java b/common/src/main/java/com/majruszsdifficulty/entity/CerberusModel.java index 1dc9bfb3a..abfe8c66b 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/CerberusModel.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/CerberusModel.java @@ -5,18 +5,17 @@ import com.majruszlibrary.annotation.Dist; import com.majruszlibrary.annotation.OnlyIn; import com.majruszlibrary.math.AnyPos; -import com.majruszlibrary.modhelper.LazyResource; +import com.majruszlibrary.modhelper.Resource; import com.majruszlibrary.platform.Side; import com.majruszsdifficulty.MajruszsDifficulty; import net.minecraft.client.model.HierarchicalModel; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.player.LocalPlayer; -import net.minecraft.server.packs.PackType; import net.minecraft.util.Mth; @OnlyIn( Dist.CLIENT ) public class CerberusModel< Type extends Cerberus > extends HierarchicalModel< Type > { - public static LazyResource< ModelDef > MODEL = MajruszsDifficulty.HELPER.load( "cerberus_model", ModelDef.class, PackType.CLIENT_RESOURCES ); + public static Resource< ModelDef > MODEL = MajruszsDifficulty.HELPER.loadClient( "cerberus_model", ModelDef.class ); public final ModelParts modelParts; public final ModelPart body, necks, neck1, neck3, jawUpper1, jawUpper2, jawUpper3, jawLower1, jawLower2, jawLower3, frontLeg1, frontLeg2, hindLeg1, hindLeg2; diff --git a/common/src/main/java/com/majruszsdifficulty/entity/CreeperlingModel.java b/common/src/main/java/com/majruszsdifficulty/entity/CreeperlingModel.java index e72090085..0a751f1aa 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/CreeperlingModel.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/CreeperlingModel.java @@ -4,16 +4,15 @@ import com.majruszlibrary.animations.ModelParts; import com.majruszlibrary.annotation.Dist; import com.majruszlibrary.annotation.OnlyIn; -import com.majruszlibrary.modhelper.LazyResource; +import com.majruszlibrary.modhelper.Resource; import com.majruszsdifficulty.MajruszsDifficulty; import net.minecraft.client.model.HierarchicalModel; import net.minecraft.client.model.geom.ModelPart; -import net.minecraft.server.packs.PackType; import net.minecraft.util.Mth; @OnlyIn( Dist.CLIENT ) public class CreeperlingModel< Type extends Creeperling > extends HierarchicalModel< Type > { - public static LazyResource< ModelDef > MODEL = MajruszsDifficulty.HELPER.load( "creeperling_model", ModelDef.class, PackType.CLIENT_RESOURCES ); + public static Resource< ModelDef > MODEL = MajruszsDifficulty.HELPER.loadClient( "creeperling_model", ModelDef.class ); public final ModelParts modelParts; public final ModelPart head, leftBackFoot, leftFrontFoot, rightBackFoot, rightFrontFoot; diff --git a/common/src/main/java/com/majruszsdifficulty/entity/CursedArmor.java b/common/src/main/java/com/majruszsdifficulty/entity/CursedArmor.java index 7e741bdf7..4677848a8 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/CursedArmor.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/CursedArmor.java @@ -20,7 +20,7 @@ import com.majruszlibrary.math.AnyPos; import com.majruszlibrary.math.Random; import com.majruszlibrary.math.Range; -import com.majruszlibrary.modhelper.LazyResource; +import com.majruszlibrary.modhelper.Resource; import com.majruszlibrary.text.TextHelper; import com.majruszlibrary.time.TimeHelper; import com.majruszsdifficulty.MajruszsDifficulty; @@ -31,7 +31,6 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.server.packs.PackType; import net.minecraft.sounds.SoundSource; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.EntityType; @@ -59,7 +58,7 @@ import java.util.function.Function; public class CursedArmor extends Monster implements IAnimableEntity { - private static final LazyResource< AnimationsDef > ANIMATIONS = MajruszsDifficulty.HELPER.load( "cursed_armor_animation", AnimationsDef.class, PackType.SERVER_DATA ); + private static final Resource< AnimationsDef > ANIMATIONS = MajruszsDifficulty.HELPER.load( "cursed_armor_animation", AnimationsDef.class ); private static float ITEM_DROP_CHANCE = 0.2f; private static float NAME_CHANCE = 0.025f; private static List< String > NAMES = List.of( "Freshah" ); @@ -252,7 +251,7 @@ private static LocationDef getRandomLocationDef() { private static void spawnCursedArmor( OnLootGenerated data ) { TimeHelper.nextTick( delay->{ - CursedArmor cursedArmor = EntityHelper.createSpawner( MajruszsDifficulty.Entities.CURSED_ARMOR, data.getLevel() ) + CursedArmor cursedArmor = EntityHelper.createSpawner( MajruszsDifficulty.CURSED_ARMOR_ENTITY, data.getLevel() ) .position( CursedArmor.getSpawnPosition( data ) ) .beforeEvent( entity->{ float yRot = BlockHelper.getState( data.getLevel(), data.origin ).getValue( ChestBlock.FACING ).toYRot(); diff --git a/common/src/main/java/com/majruszsdifficulty/entity/CursedArmorModel.java b/common/src/main/java/com/majruszsdifficulty/entity/CursedArmorModel.java index c9bd5d907..9ec836cba 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/CursedArmorModel.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/CursedArmorModel.java @@ -4,15 +4,14 @@ import com.majruszlibrary.animations.ModelParts; import com.majruszlibrary.annotation.Dist; import com.majruszlibrary.annotation.OnlyIn; -import com.majruszlibrary.modhelper.LazyResource; +import com.majruszlibrary.modhelper.Resource; import com.majruszsdifficulty.MajruszsDifficulty; import net.minecraft.client.model.HumanoidModel; import net.minecraft.client.model.geom.ModelPart; -import net.minecraft.server.packs.PackType; @OnlyIn( Dist.CLIENT ) public class CursedArmorModel< Type extends CursedArmor > extends HumanoidModel< Type > { - public static LazyResource< ModelDef > MODEL = MajruszsDifficulty.HELPER.load( "cursed_armor_model", ModelDef.class, PackType.CLIENT_RESOURCES ); + public static Resource< ModelDef > MODEL = MajruszsDifficulty.HELPER.loadClient( "cursed_armor_model", ModelDef.class ); public final ModelParts modelParts; public CursedArmorModel( ModelPart modelPart ) { diff --git a/common/src/main/java/com/majruszsdifficulty/entity/IllusionerRenderer.java b/common/src/main/java/com/majruszsdifficulty/entity/IllusionerRenderer.java index 0243a4f77..050ea158d 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/IllusionerRenderer.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/IllusionerRenderer.java @@ -6,9 +6,11 @@ import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.model.IllagerModel; import net.minecraft.client.model.geom.ModelLayers; +import net.minecraft.client.renderer.ItemInHandRenderer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.IllagerRenderer; +import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.layers.ItemInHandLayer; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; @@ -22,16 +24,7 @@ public class IllusionerRenderer extends IllagerRenderer< Illusioner > { public IllusionerRenderer( EntityRendererProvider.Context $$0 ) { super( $$0, new IllagerModel<>( $$0.bakeLayer( ModelLayers.ILLUSIONER ) ), 0.5f ); - this.addLayer( new ItemInHandLayer<>( this, $$0.getItemInHandRenderer() ) { - public void render( PoseStack $$0, MultiBufferSource $$1, int $$2, Illusioner $$3, float $$4, float $$5, float $$6, float $$7, float $$8, - float $$9 - ) { - if( $$3.isCastingSpell() || $$3.isAggressive() ) { - super.render( $$0, $$1, $$2, $$3, $$4, $$5, $$6, $$7, $$8, $$9 ); - } - - } - } ); + this.addLayer( new Layer( this, $$0.getItemInHandRenderer() ) ); ( ( IllagerModel )this.model ).getHat().visible = true; } @@ -59,4 +52,18 @@ public void render( Illusioner $$0, float $$1, float $$2, PoseStack $$3, MultiBu protected boolean isBodyVisible( Illusioner $$0 ) { return true; } + + @OnlyIn( Dist.CLIENT ) + private static class Layer extends ItemInHandLayer< Illusioner, IllagerModel< Illusioner > > { + public Layer( RenderLayerParent< Illusioner, IllagerModel< Illusioner > > $$0, ItemInHandRenderer $$1 ) { + super( $$0, $$1 ); + } + + @Override + public void render( PoseStack $$0, MultiBufferSource $$1, int $$2, Illusioner $$3, float $$4, float $$5, float $$6, float $$7, float $$8, float $$9 ) { + if( $$3.isCastingSpell() || $$3.isAggressive() ) { + super.render( $$0, $$1, $$2, $$3, $$4, $$5, $$6, $$7, $$8, $$9 ); + } + } + } } diff --git a/common/src/main/java/com/majruszsdifficulty/entity/Tank.java b/common/src/main/java/com/majruszsdifficulty/entity/Tank.java index a94c1826b..18a70f0ce 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/Tank.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/Tank.java @@ -9,14 +9,13 @@ import com.majruszlibrary.level.LevelHelper; import com.majruszlibrary.math.AnyPos; import com.majruszlibrary.math.Random; -import com.majruszlibrary.modhelper.LazyResource; +import com.majruszlibrary.modhelper.Resource; import com.majruszsdifficulty.MajruszsDifficulty; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.BlockParticleOption; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.server.packs.PackType; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.damagesource.DamageSource; @@ -38,7 +37,7 @@ import net.minecraft.world.phys.Vec3; public class Tank extends Monster implements IAnimableEntity { - private static final LazyResource< AnimationsDef > ANIMATIONS = MajruszsDifficulty.HELPER.load( "tank_animations", AnimationsDef.class, PackType.SERVER_DATA ); + private static final Resource< AnimationsDef > ANIMATIONS = MajruszsDifficulty.HELPER.load( "tank_animations", AnimationsDef.class ); private final Animations animations = Animations.create(); public static EntityType< Tank > createEntityType() { diff --git a/common/src/main/java/com/majruszsdifficulty/entity/TankModel.java b/common/src/main/java/com/majruszsdifficulty/entity/TankModel.java index 97ce30286..6593cec4a 100644 --- a/common/src/main/java/com/majruszsdifficulty/entity/TankModel.java +++ b/common/src/main/java/com/majruszsdifficulty/entity/TankModel.java @@ -4,16 +4,15 @@ import com.majruszlibrary.animations.ModelParts; import com.majruszlibrary.annotation.Dist; import com.majruszlibrary.annotation.OnlyIn; -import com.majruszlibrary.modhelper.LazyResource; +import com.majruszlibrary.modhelper.Resource; import com.majruszsdifficulty.MajruszsDifficulty; import net.minecraft.client.model.HierarchicalModel; import net.minecraft.client.model.geom.ModelPart; -import net.minecraft.server.packs.PackType; import net.minecraft.util.Mth; @OnlyIn( Dist.CLIENT ) public class TankModel< Type extends Tank > extends HierarchicalModel< Type > { - public static LazyResource< ModelDef > MODEL = MajruszsDifficulty.HELPER.load( "tank_model", ModelDef.class, PackType.CLIENT_RESOURCES ); + public static Resource< ModelDef > MODEL = MajruszsDifficulty.HELPER.loadClient( "tank_model", ModelDef.class ); public final ModelParts modelParts; public final ModelPart head, leftLeg, rightLeg, body; diff --git a/common/src/main/java/com/majruszsdifficulty/features/CreeperSplitIntoCreeperlings.java b/common/src/main/java/com/majruszsdifficulty/features/CreeperSplitIntoCreeperlings.java index 0828e1c68..66603968d 100644 --- a/common/src/main/java/com/majruszsdifficulty/features/CreeperSplitIntoCreeperlings.java +++ b/common/src/main/java/com/majruszsdifficulty/features/CreeperSplitIntoCreeperlings.java @@ -63,7 +63,7 @@ private static void spawnCreeperlings( OnExploded data ) { GameStage gameStage = GameStageHelper.determineGameStage( data ); int count = Random.nextInt( 1, COUNT.get( gameStage ) + 1 ); for( int i = 0; i < count; ++i ) { - Creeperling creeperling = EntityHelper.createSpawner( MajruszsDifficulty.Entities.CREEPERLING, data.getLevel() ) + Creeperling creeperling = EntityHelper.createSpawner( MajruszsDifficulty.CREEPERLING_ENTITY, data.getLevel() ) .position( AnyPos.from( creeper.blockPosition() ).add( Random.nextVector( -2, 2, -1, 1, -2, 2 ) ).center().vec3() ) .mobSpawnType( MobSpawnType.EVENT ) .spawn(); diff --git a/common/src/main/java/com/majruszsdifficulty/features/SpawnPlayerZombie.java b/common/src/main/java/com/majruszsdifficulty/features/SpawnPlayerZombie.java index 59960283e..fb9928811 100644 --- a/common/src/main/java/com/majruszsdifficulty/features/SpawnPlayerZombie.java +++ b/common/src/main/java/com/majruszsdifficulty/features/SpawnPlayerZombie.java @@ -38,7 +38,7 @@ public class SpawnPlayerZombie { .addCondition( data->IS_ENABLED ) .addCondition( CustomCondition.check( REQUIRED_GAME_STAGE ) ) .addCondition( data->data.target instanceof Player ) - .addCondition( data->data.target.hasEffect( MajruszsDifficulty.Effects.BLEEDING.get() ) || data.attacker instanceof Zombie ); + .addCondition( data->data.target.hasEffect( MajruszsDifficulty.BLEEDING_EFFECT.get() ) || data.attacker instanceof Zombie ); OnEntityDied.listen( SpawnPlayerZombie::giveAdvancement ) .addCondition( data->data.target instanceof Zombie ) diff --git a/common/src/main/java/com/majruszsdifficulty/gamestage/listeners/AdvancementProvider.java b/common/src/main/java/com/majruszsdifficulty/gamestage/listeners/AdvancementProvider.java index 3996d6190..f799785f2 100644 --- a/common/src/main/java/com/majruszsdifficulty/gamestage/listeners/AdvancementProvider.java +++ b/common/src/main/java/com/majruszsdifficulty/gamestage/listeners/AdvancementProvider.java @@ -28,14 +28,14 @@ private static void giveAdvancement( OnGlobalGameStageChanged data ) { Side.getServer() .getPlayerList() .getPlayers() - .forEach( player->MajruszsDifficulty.Advancements.GAME_STAGE.trigger( player, data.current ) ); + .forEach( player->MajruszsDifficulty.GAME_STAGE_ADVANCEMENT.trigger( player, data.current ) ); } private static void giveAdvancement( OnPlayerGameStageChanged data ) { - MajruszsDifficulty.Advancements.GAME_STAGE.trigger( ( ServerPlayer )data.player, data.current ); + MajruszsDifficulty.GAME_STAGE_ADVANCEMENT.trigger( ( ServerPlayer )data.player, data.current ); } private static void giveAdvancement( OnPlayerLoggedIn data ) { - MajruszsDifficulty.Advancements.GAME_STAGE.trigger( data.player, GameStageHelper.determineGameStage( data.player ) ); + MajruszsDifficulty.GAME_STAGE_ADVANCEMENT.trigger( data.player, GameStageHelper.determineGameStage( data.player ) ); } } diff --git a/common/src/main/java/com/majruszsdifficulty/items/Bandage.java b/common/src/main/java/com/majruszsdifficulty/items/Bandage.java index 7c6296f73..51a4ef1ec 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/Bandage.java +++ b/common/src/main/java/com/majruszsdifficulty/items/Bandage.java @@ -15,7 +15,6 @@ import net.minecraft.ChatFormatting; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvents; -import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; @@ -26,11 +25,11 @@ public class Bandage extends Item { private static List< EffectDef > NORMAL_EFFECTS = List.of( - new EffectDef( MajruszsDifficulty.Effects.GLASS_REGENERATION, 0, 20.0f ) + new EffectDef( MajruszsDifficulty.GLASS_REGENERATION_EFFECT, 0, 20.0f ) ); private static List< EffectDef > GOLDEN_EFFECTS = List.of( - new EffectDef( MajruszsDifficulty.Effects.GLASS_REGENERATION, 1, 20.0f ), - new EffectDef( MajruszsDifficulty.Effects.BLEEDING_IMMUNITY, 0, 90.0f ) + new EffectDef( MajruszsDifficulty.GLASS_REGENERATION_EFFECT, 1, 20.0f ), + new EffectDef( MajruszsDifficulty.BLEEDING_IMMUNITY_EFFECT, 0, 90.0f ) ); private final Supplier< List< EffectDef > > effects; @@ -45,7 +44,7 @@ public static Supplier< Bandage > golden() { static { OnPlayerInteracted.listen( Bandage::use ) .addCondition( data->data.itemStack.getItem() instanceof Bandage ) - .addCondition( data->!ItemHelper.isOnCooldown( data.player, MajruszsDifficulty.Items.BANDAGE.get(), MajruszsDifficulty.Items.GOLDEN_BANDAGE.get() ) ); + .addCondition( data->!ItemHelper.isOnCooldown( data.player, MajruszsDifficulty.BANDAGE_ITEM.get(), MajruszsDifficulty.GOLDEN_BANDAGE_ITEM.get() ) ); OnItemTooltip.listen( Bandage::addEffectInfo ) .addCondition( data->data.itemStack.getItem() instanceof Bandage ); @@ -68,20 +67,20 @@ private static void use( OnPlayerInteracted data ) { .position( target.position() ) .emit( target.level() ); Bandage.removeBleeding( bandage, data.player, target ); - ItemHelper.addCooldown( data.player, TimeHelper.toTicks( 0.7 ), MajruszsDifficulty.Items.BANDAGE.get(), MajruszsDifficulty.Items.GOLDEN_BANDAGE.get() ); + ItemHelper.addCooldown( data.player, TimeHelper.toTicks( 0.7 ), MajruszsDifficulty.BANDAGE_ITEM.get(), MajruszsDifficulty.GOLDEN_BANDAGE_ITEM.get() ); ItemHelper.consumeItemOnUse( data.itemStack, data.player ); data.finish(); } private static void removeBleeding( Bandage item, Player player, LivingEntity target ) { - if( target.hasEffect( MajruszsDifficulty.Effects.BLEEDING.get() ) && player instanceof ServerPlayer serverPlayer ) { + if( target.hasEffect( MajruszsDifficulty.BLEEDING_EFFECT.get() ) && player instanceof ServerPlayer serverPlayer ) { if( target.equals( serverPlayer ) ) { MajruszsDifficulty.HELPER.triggerAchievement( serverPlayer, "bandage_used" ); - } else if( item.equals( MajruszsDifficulty.Items.GOLDEN_BANDAGE.get() ) ) { + } else if( item.equals( MajruszsDifficulty.GOLDEN_BANDAGE_ITEM.get() ) ) { MajruszsDifficulty.HELPER.triggerAchievement( serverPlayer, "golden_bandage_used_on_others" ); } } - target.removeEffect( MajruszsDifficulty.Effects.BLEEDING.get() ); + target.removeEffect( MajruszsDifficulty.BLEEDING_EFFECT.get() ); } private static void addEffectInfo( OnItemTooltip data ) { diff --git a/common/src/main/java/com/majruszsdifficulty/items/CreativeModeTabs.java b/common/src/main/java/com/majruszsdifficulty/items/CreativeModeTabs.java index 421778e4e..0eecf87dc 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/CreativeModeTabs.java +++ b/common/src/main/java/com/majruszsdifficulty/items/CreativeModeTabs.java @@ -18,70 +18,70 @@ public static Supplier< CreativeModeTab > primary() { return ()->CreativeModeTab.builder( CreativeModeTab.Row.TOP, 0 ) .title( PRIMARY ) .displayItems( CreativeModeTabs::definePrimaryItems ) - .icon( ()->new ItemStack( MajruszsDifficulty.Items.FRAGILE_END_STONE.get() ) ) + .icon( ()->new ItemStack( MajruszsDifficulty.UNDEAD_BATTLE_STANDARD_ITEM.get() ) ) .build(); } private static void definePrimaryItems( CreativeModeTab.ItemDisplayParameters params, CreativeModeTab.Output output ) { Stream.of( - MajruszsDifficulty.Items.INFERNAL_SPONGE, - MajruszsDifficulty.Items.SOAKED_INFERNAL_SPONGE, - MajruszsDifficulty.Items.ENDERIUM_BLOCK, - MajruszsDifficulty.Items.ENDERIUM_SHARD_ORE, - MajruszsDifficulty.Items.FRAGILE_END_STONE, - MajruszsDifficulty.Items.INFESTED_END_STONE, - MajruszsDifficulty.Items.BANDAGE, - MajruszsDifficulty.Items.GOLDEN_BANDAGE, - MajruszsDifficulty.Items.CLOTH, - MajruszsDifficulty.Items.UNDEAD_BATTLE_STANDARD, - MajruszsDifficulty.Items.SOUL_JAR, - MajruszsDifficulty.Items.RECALL_POTION, - MajruszsDifficulty.Items.EVOKER_FANG_SCROLL, - MajruszsDifficulty.Items.SONIC_BOOM_SCROLL, - MajruszsDifficulty.Items.CERBERUS_FANG, - MajruszsDifficulty.Items.ENDER_POUCH, - MajruszsDifficulty.Items.ENDERIUM_SHARD_LOCATOR, - MajruszsDifficulty.Items.ENDERIUM_SHARD, - MajruszsDifficulty.Items.ENDERIUM_INGOT, - MajruszsDifficulty.Items.ENDERIUM_SMITHING_TEMPLATE + MajruszsDifficulty.INFERNAL_SPONGE_ITEM, + MajruszsDifficulty.SOAKED_INFERNAL_SPONGE_ITEM, + MajruszsDifficulty.ENDERIUM_BLOCK_ITEM, + MajruszsDifficulty.ENDERIUM_SHARD_ORE_ITEM, + MajruszsDifficulty.FRAGILE_END_STONE_ITEM, + MajruszsDifficulty.INFESTED_END_STONE_ITEM, + MajruszsDifficulty.BANDAGE_ITEM, + MajruszsDifficulty.GOLDEN_BANDAGE_ITEM, + MajruszsDifficulty.CLOTH_ITEM, + MajruszsDifficulty.UNDEAD_BATTLE_STANDARD_ITEM, + MajruszsDifficulty.SOUL_JAR_ITEM, + MajruszsDifficulty.RECALL_POTION_ITEM, + MajruszsDifficulty.EVOKER_FANG_SCROLL_ITEM, + MajruszsDifficulty.SONIC_BOOM_SCROLL_ITEM, + MajruszsDifficulty.CERBERUS_FANG_ITEM, + MajruszsDifficulty.ENDER_POUCH_ITEM, + MajruszsDifficulty.ENDERIUM_SHARD_LOCATOR_ITEM, + MajruszsDifficulty.ENDERIUM_SHARD_ITEM, + MajruszsDifficulty.ENDERIUM_INGOT_ITEM, + MajruszsDifficulty.ENDERIUM_SMITHING_TEMPLATE_ITEM ).map( item->new ItemStack( item.get() ) ).forEach( output::accept ); Stream.of( Items.TIPPED_ARROW, Items.POTION, Items.SPLASH_POTION, Items.LINGERING_POTION ).forEach( item-> Stream.of( - MajruszsDifficulty.Potions.WITHER, - MajruszsDifficulty.Potions.WITHER_LONG, - MajruszsDifficulty.Potions.WITHER_STRONG + MajruszsDifficulty.WITHER_POTION, + MajruszsDifficulty.WITHER_LONG_POTION, + MajruszsDifficulty.WITHER_STRONG_POTION ).forEach( potion->output.accept( PotionUtils.setPotion( new ItemStack( item ), potion.get() ) ) ) ); Stream.of( - MajruszsDifficulty.Items.WITHER_SWORD, - MajruszsDifficulty.Items.ENDERIUM_SWORD, - MajruszsDifficulty.Items.ENDERIUM_SHOVEL, - MajruszsDifficulty.Items.ENDERIUM_PICKAXE, - MajruszsDifficulty.Items.ENDERIUM_AXE, - MajruszsDifficulty.Items.ENDERIUM_HOE, - MajruszsDifficulty.Items.TATTERED_HELMET, - MajruszsDifficulty.Items.TATTERED_CHESTPLATE, - MajruszsDifficulty.Items.TATTERED_LEGGINGS, - MajruszsDifficulty.Items.TATTERED_BOOTS, - MajruszsDifficulty.Items.ENDERIUM_HELMET, - MajruszsDifficulty.Items.ENDERIUM_CHESTPLATE, - MajruszsDifficulty.Items.ENDERIUM_LEGGINGS, - MajruszsDifficulty.Items.ENDERIUM_BOOTS, - MajruszsDifficulty.Items.ANGLER_TREASURE_BAG, - MajruszsDifficulty.Items.ELDER_GUARDIAN_TREASURE_BAG, - MajruszsDifficulty.Items.ENDER_DRAGON_TREASURE_BAG, - MajruszsDifficulty.Items.PILLAGER_TREASURE_BAG, - MajruszsDifficulty.Items.UNDEAD_ARMY_TREASURE_BAG, - MajruszsDifficulty.Items.WARDEN_TREASURE_BAG, - MajruszsDifficulty.Items.WITHER_TREASURE_BAG, - MajruszsDifficulty.Items.CERBERUS_SPAWN_EGG, - MajruszsDifficulty.Items.CREEPERLING_SPAWN_EGG, - MajruszsDifficulty.Items.CURSED_ARMOR_SPAWN_EGG, - MajruszsDifficulty.Items.GIANT_SPAWN_EGG, - MajruszsDifficulty.Items.ILLUSIONER_SPAWN_EGG, - MajruszsDifficulty.Items.TANK_SPAWN_EGG + MajruszsDifficulty.WITHER_SWORD_ITEM, + MajruszsDifficulty.ENDERIUM_SWORD_ITEM, + MajruszsDifficulty.ENDERIUM_SHOVEL_ITEM, + MajruszsDifficulty.ENDERIUM_PICKAXE_ITEM, + MajruszsDifficulty.ENDERIUM_AXE_ITEM, + MajruszsDifficulty.ENDERIUM_HOE_ITEM, + MajruszsDifficulty.TATTERED_HELMET_ITEM, + MajruszsDifficulty.TATTERED_CHESTPLATE_ITEM, + MajruszsDifficulty.TATTERED_LEGGINGS_ITEM, + MajruszsDifficulty.TATTERED_BOOTS_ITEM, + MajruszsDifficulty.ENDERIUM_HELMET_ITEM, + MajruszsDifficulty.ENDERIUM_CHESTPLATE_ITEM, + MajruszsDifficulty.ENDERIUM_LEGGINGS_ITEM, + MajruszsDifficulty.ENDERIUM_BOOTS_ITEM, + MajruszsDifficulty.ANGLER_TREASURE_BAG_ITEM, + MajruszsDifficulty.ELDER_GUARDIAN_TREASURE_BAG_ITEM, + MajruszsDifficulty.ENDER_DRAGON_TREASURE_BAG_ITEM, + MajruszsDifficulty.PILLAGER_TREASURE_BAG_ITEM, + MajruszsDifficulty.UNDEAD_ARMY_TREASURE_BAG_ITEM, + MajruszsDifficulty.WARDEN_TREASURE_BAG_ITEM, + MajruszsDifficulty.WITHER_TREASURE_BAG_ITEM, + MajruszsDifficulty.CERBERUS_SPAWN_EGG_ITEM, + MajruszsDifficulty.CREEPERLING_SPAWN_EGG_ITEM, + MajruszsDifficulty.CURSED_ARMOR_SPAWN_EGG_ITEM, + MajruszsDifficulty.GIANT_SPAWN_EGG_ITEM, + MajruszsDifficulty.ILLUSIONER_SPAWN_EGG_ITEM, + MajruszsDifficulty.TANK_SPAWN_EGG_ITEM ).map( item->new ItemStack( item.get() ) ).forEach( output::accept ); } } diff --git a/common/src/main/java/com/majruszsdifficulty/items/CustomArmorMaterial.java b/common/src/main/java/com/majruszsdifficulty/items/CustomArmorMaterial.java index ce69e376c..0e4b3e5f3 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/CustomArmorMaterial.java +++ b/common/src/main/java/com/majruszsdifficulty/items/CustomArmorMaterial.java @@ -21,7 +21,7 @@ public enum CustomArmorMaterial implements ArmorMaterial { SoundEvents.ARMOR_EQUIP_LEATHER, 0.0f, 0.0f, - ()->Ingredient.of( MajruszsDifficulty.Items.CLOTH.get() ) + ()->Ingredient.of( MajruszsDifficulty.CLOTH_ITEM.get() ) ), ENDERIUM( "enderium", @@ -31,7 +31,7 @@ public enum CustomArmorMaterial implements ArmorMaterial { SoundEvents.ARMOR_EQUIP_NETHERITE, 4.0f, 0.1f, - ()->Ingredient.of( MajruszsDifficulty.Items.ENDERIUM_INGOT.get() ) + ()->Ingredient.of( MajruszsDifficulty.ENDERIUM_INGOT_ITEM.get() ) ); private static final int[] MAX_DAMAGE_ARRAY = new int[]{ 13, 15, 16, 11 }; diff --git a/common/src/main/java/com/majruszsdifficulty/items/CustomItemTier.java b/common/src/main/java/com/majruszsdifficulty/items/CustomItemTier.java index 40a0bd426..3e4f1a67e 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/CustomItemTier.java +++ b/common/src/main/java/com/majruszsdifficulty/items/CustomItemTier.java @@ -7,8 +7,8 @@ import java.util.function.Supplier; public enum CustomItemTier implements Tier { - WITHER( 360, 3, 15, 5.0f, 3.0f, ()->Ingredient.of( MajruszsDifficulty.Items.CERBERUS_FANG.get() ) ), - ENDERIUM( 2137, 4, 15, 10.0f, 5.0f, ()->Ingredient.of( MajruszsDifficulty.Items.ENDERIUM_INGOT.get() ) ); + WITHER( 360, 3, 15, 5.0f, 3.0f, ()->Ingredient.of( MajruszsDifficulty.CERBERUS_FANG_ITEM.get() ) ), + ENDERIUM( 2137, 4, 15, 10.0f, 5.0f, ()->Ingredient.of( MajruszsDifficulty.ENDERIUM_INGOT_ITEM.get() ) ); final int maxUses, harvestLevel, enchantability; final float efficiency, attackDamage; diff --git a/common/src/main/java/com/majruszsdifficulty/items/EnderiumShardLocator.java b/common/src/main/java/com/majruszsdifficulty/items/EnderiumShardLocator.java index 8404e74f0..dad725d80 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/EnderiumShardLocator.java +++ b/common/src/main/java/com/majruszsdifficulty/items/EnderiumShardLocator.java @@ -33,7 +33,7 @@ public EnderiumShardLocator() { private static boolean isOre( Level level, BlockPos position ) { - return BlockHelper.getState( level, position ).getBlock() == MajruszsDifficulty.Blocks.ENDERIUM_SHARD_ORE.get(); + return BlockHelper.getState( level, position ).getBlock() == MajruszsDifficulty.ENDERIUM_SHARD_ORE_BLOCK.get(); } @OnlyIn( Dist.CLIENT ) diff --git a/common/src/main/java/com/majruszsdifficulty/items/TatteredArmor.java b/common/src/main/java/com/majruszsdifficulty/items/TatteredArmor.java index 84d5efca0..55326252d 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/TatteredArmor.java +++ b/common/src/main/java/com/majruszsdifficulty/items/TatteredArmor.java @@ -33,7 +33,7 @@ public static Supplier< TatteredArmor > leggings() { private static boolean hasBootsEquipped( OnEntityPowderSnowCheck data ) { return data.entity instanceof LivingEntity entity - && entity.getItemBySlot( EquipmentSlot.FEET ).is( MajruszsDifficulty.Items.TATTERED_BOOTS.get() ); + && entity.getItemBySlot( EquipmentSlot.FEET ).is( MajruszsDifficulty.TATTERED_BOOTS_ITEM.get() ); } private TatteredArmor( Type type ) { diff --git a/common/src/main/java/com/majruszsdifficulty/items/TreasureBag.java b/common/src/main/java/com/majruszsdifficulty/items/TreasureBag.java index 399b46e89..ea99a2bee 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/TreasureBag.java +++ b/common/src/main/java/com/majruszsdifficulty/items/TreasureBag.java @@ -34,7 +34,7 @@ public class TreasureBag extends Item { Serializables.get( RightClickAction.class ) .define( "container_idx", Reader.integer(), s->s.containerIdx, ( s, v )->s.containerIdx = v ); - MajruszsDifficulty.Network.TREASURE_BAG_RIGHT_CLICK.addServerCallback( TreasureBag::openInInventory ); + MajruszsDifficulty.TREASURE_BAG_RIGHT_CLICK_NETWORK.addServerCallback( TreasureBag::openInInventory ); } public static Supplier< TreasureBag > angler() { @@ -126,7 +126,7 @@ public static class Client { } private static void openInInventory( OnItemInventoryClicked data ) { - MajruszsDifficulty.Network.TREASURE_BAG_RIGHT_CLICK.sendToServer( new RightClickAction( data.containerIdx ) ); + MajruszsDifficulty.TREASURE_BAG_RIGHT_CLICK_NETWORK.sendToServer( new RightClickAction( data.containerIdx ) ); data.cancel(); } } diff --git a/common/src/main/java/com/majruszsdifficulty/itemsets/EnderiumSet.java b/common/src/main/java/com/majruszsdifficulty/itemsets/EnderiumSet.java index 00dc17176..69c7b2740 100644 --- a/common/src/main/java/com/majruszsdifficulty/itemsets/EnderiumSet.java +++ b/common/src/main/java/com/majruszsdifficulty/itemsets/EnderiumSet.java @@ -37,10 +37,10 @@ public class EnderiumSet { MobEffects.MOVEMENT_SPEED, MobEffects.SATURATION }; - static final ItemSetRequirement HELMET = ItemSetRequirement.of( MajruszsDifficulty.Items.ENDERIUM_HELMET, EquipmentSlot.HEAD ); - static final ItemSetRequirement CHESTPLATE = ItemSetRequirement.of( MajruszsDifficulty.Items.ENDERIUM_CHESTPLATE, EquipmentSlot.CHEST ); - static final ItemSetRequirement LEGGINGS = ItemSetRequirement.of( MajruszsDifficulty.Items.ENDERIUM_LEGGINGS, EquipmentSlot.LEGS ); - static final ItemSetRequirement BOOTS = ItemSetRequirement.of( MajruszsDifficulty.Items.ENDERIUM_BOOTS, EquipmentSlot.FEET ); + static final ItemSetRequirement HELMET = ItemSetRequirement.of( MajruszsDifficulty.ENDERIUM_HELMET_ITEM, EquipmentSlot.HEAD ); + static final ItemSetRequirement CHESTPLATE = ItemSetRequirement.of( MajruszsDifficulty.ENDERIUM_CHESTPLATE_ITEM, EquipmentSlot.CHEST ); + static final ItemSetRequirement LEGGINGS = ItemSetRequirement.of( MajruszsDifficulty.ENDERIUM_LEGGINGS_ITEM, EquipmentSlot.LEGS ); + static final ItemSetRequirement BOOTS = ItemSetRequirement.of( MajruszsDifficulty.ENDERIUM_BOOTS_ITEM, EquipmentSlot.FEET ); static final ItemSetBonus ENDERMAN_PROTECTION = ItemSetBonus.requires( HELMET ) .component( "majruszsdifficulty.sets.enderium.bonus_1", TextHelper.translatable( "item.majruszsdifficulty.enderium_helmet" ) ); static final ItemSetBonus END_LOOTING = ItemSetBonus.any( 2 ) diff --git a/common/src/main/java/com/majruszsdifficulty/itemsets/ItemSet.java b/common/src/main/java/com/majruszsdifficulty/itemsets/ItemSet.java index 1ec1ea6fb..ea1ea36c0 100644 --- a/common/src/main/java/com/majruszsdifficulty/itemsets/ItemSet.java +++ b/common/src/main/java/com/majruszsdifficulty/itemsets/ItemSet.java @@ -65,38 +65,38 @@ public List< ItemSetRequirement > findRequirementsMet( LivingEntity entity ) { private ItemSet() { Side.runOnClient( ()->()->{ - OnItemTooltip.listen( this::addTooltip ) + OnItemTooltip.listen( data->Client.addTooltip( data, this ) ) .addCondition( data->this.requirements.stream().anyMatch( requirement->requirement.is( data.itemStack ) ) ); } ); } - @OnlyIn( Dist.CLIENT ) - private void addTooltip( OnItemTooltip data ) { - if( !ClientHelper.isShiftDown() ) { - data.components.add( TextHelper.empty() ); - data.components.add( TextHelper.translatable( "majruszsdifficulty.item_sets.hint" ).withStyle( ChatFormatting.GRAY ) ); - return; - } - - List< ItemSetRequirement > requirementsMet = this.findRequirementsMet( Side.getLocalPlayer() ); - - data.components.add( TextHelper.empty() ); - data.components.add( this.getItemTitleComponent( requirementsMet ) ); - data.components.addAll( this.requirements.stream().map( requirement->requirement.toComponent( this, requirementsMet ) ).toList() ); - data.components.add( TextHelper.empty() ); - data.components.add( this.getBonusTitleComponent() ); - data.components.addAll( this.bonuses.stream().map( bonus->bonus.toComponent( this, requirementsMet ) ).toList() ); - } - - @OnlyIn( Dist.CLIENT ) private Component getItemTitleComponent( List< ItemSetRequirement > requirementsMet ) { return TextHelper.translatable( "majruszsdifficulty.item_sets.item_title", this.component, requirementsMet.size(), this.requirements.size() ) .withStyle( ChatFormatting.GRAY ); } - @OnlyIn( Dist.CLIENT ) private Component getBonusTitleComponent() { return TextHelper.translatable( "majruszsdifficulty.item_sets.bonus_title", this.component ) .withStyle( ChatFormatting.GRAY ); } + + @OnlyIn( Dist.CLIENT ) + private static class Client { + private static void addTooltip( OnItemTooltip data, ItemSet itemSet ) { + if( !ClientHelper.isShiftDown() ) { + data.components.add( TextHelper.empty() ); + data.components.add( TextHelper.translatable( "majruszsdifficulty.item_sets.hint" ).withStyle( ChatFormatting.GRAY ) ); + return; + } + + List< ItemSetRequirement > requirementsMet = itemSet.findRequirementsMet( Side.getLocalPlayer() ); + + data.components.add( TextHelper.empty() ); + data.components.add( itemSet.getItemTitleComponent( requirementsMet ) ); + data.components.addAll( itemSet.requirements.stream().map( requirement->requirement.toComponent( itemSet, requirementsMet ) ).toList() ); + data.components.add( TextHelper.empty() ); + data.components.add( itemSet.getBonusTitleComponent() ); + data.components.addAll( itemSet.bonuses.stream().map( bonus->bonus.toComponent( itemSet, requirementsMet ) ).toList() ); + } + } } diff --git a/common/src/main/java/com/majruszsdifficulty/itemsets/UndeadSet.java b/common/src/main/java/com/majruszsdifficulty/itemsets/UndeadSet.java index c2fb04489..04d2d7acd 100644 --- a/common/src/main/java/com/majruszsdifficulty/itemsets/UndeadSet.java +++ b/common/src/main/java/com/majruszsdifficulty/itemsets/UndeadSet.java @@ -9,10 +9,10 @@ import net.minecraft.world.entity.Mob; public class UndeadSet { - static final ItemSetRequirement HELMET = ItemSetRequirement.of( MajruszsDifficulty.Items.TATTERED_HELMET, EquipmentSlot.HEAD ); - static final ItemSetRequirement CHESTPLATE = ItemSetRequirement.of( MajruszsDifficulty.Items.TATTERED_CHESTPLATE, EquipmentSlot.CHEST ); - static final ItemSetRequirement LEGGINGS = ItemSetRequirement.of( MajruszsDifficulty.Items.TATTERED_LEGGINGS, EquipmentSlot.LEGS ); - static final ItemSetRequirement BOOTS = ItemSetRequirement.of( MajruszsDifficulty.Items.TATTERED_BOOTS, EquipmentSlot.FEET ); + static final ItemSetRequirement HELMET = ItemSetRequirement.of( MajruszsDifficulty.TATTERED_HELMET_ITEM, EquipmentSlot.HEAD ); + static final ItemSetRequirement CHESTPLATE = ItemSetRequirement.of( MajruszsDifficulty.TATTERED_CHESTPLATE_ITEM, EquipmentSlot.CHEST ); + static final ItemSetRequirement LEGGINGS = ItemSetRequirement.of( MajruszsDifficulty.TATTERED_LEGGINGS_ITEM, EquipmentSlot.LEGS ); + static final ItemSetRequirement BOOTS = ItemSetRequirement.of( MajruszsDifficulty.TATTERED_BOOTS_ITEM, EquipmentSlot.FEET ); static final ItemSetBonus DURABILITY = ItemSetBonus.any( 3 ) .component( "majruszsdifficulty.sets.undead.bonus_1", 1 ); static final ItemSetBonus SOUL_JAR = ItemSetBonus.any( 4 ) diff --git a/common/src/main/java/com/majruszsdifficulty/loot/CurseRandomly.java b/common/src/main/java/com/majruszsdifficulty/loot/CurseRandomly.java index 5823ae984..b3799ad59 100644 --- a/common/src/main/java/com/majruszsdifficulty/loot/CurseRandomly.java +++ b/common/src/main/java/com/majruszsdifficulty/loot/CurseRandomly.java @@ -35,7 +35,7 @@ public CurseRandomly( LootItemCondition[] itemConditions ) { @Override public LootItemFunctionType getType() { - return MajruszsDifficulty.LootFunctions.CURSE_RANDOMLY.get(); + return MajruszsDifficulty.CURSE_RANDOMLY_LOOT_FUNCTION.get(); } @Override diff --git a/common/src/main/java/com/majruszsdifficulty/recipes/SoulJarShieldRecipe.java b/common/src/main/java/com/majruszsdifficulty/recipes/SoulJarShieldRecipe.java index 124c41d66..0eca175d4 100644 --- a/common/src/main/java/com/majruszsdifficulty/recipes/SoulJarShieldRecipe.java +++ b/common/src/main/java/com/majruszsdifficulty/recipes/SoulJarShieldRecipe.java @@ -48,7 +48,7 @@ public boolean canCraftInDimensions( int width, int height ) { @Override public RecipeSerializer< ? > getSerializer() { - return MajruszsDifficulty.Recipes.SOUL_JAR_SHIELD.get(); + return MajruszsDifficulty.SOUL_JAR_SHIELD_RECIPE.get(); } private static RecipeData convert( CraftingContainer container ) { diff --git a/common/src/main/java/com/majruszsdifficulty/treasurebag/TreasureBagClient.java b/common/src/main/java/com/majruszsdifficulty/treasurebag/TreasureBagClient.java index 832890088..0cbdb7a31 100644 --- a/common/src/main/java/com/majruszsdifficulty/treasurebag/TreasureBagClient.java +++ b/common/src/main/java/com/majruszsdifficulty/treasurebag/TreasureBagClient.java @@ -30,7 +30,7 @@ public class TreasureBagClient { OnItemTooltip.listen( TreasureBagClient::addTooltip ) .addCondition( data->data.itemStack.getItem() instanceof TreasureBag ); - MajruszsDifficulty.Network.TREASURE_BAG_PROGRESS.addClientCallback( TreasureBagClient::onProgressReceived ); + MajruszsDifficulty.TREASURE_BAG_PROGRESS_NETWORK.addClientCallback( TreasureBagClient::onProgressReceived ); } private static void addTooltip( OnItemTooltip data ) { diff --git a/common/src/main/java/com/majruszsdifficulty/treasurebag/TreasureBagHelper.java b/common/src/main/java/com/majruszsdifficulty/treasurebag/TreasureBagHelper.java index e045a093f..08c6c4ad3 100644 --- a/common/src/main/java/com/majruszsdifficulty/treasurebag/TreasureBagHelper.java +++ b/common/src/main/java/com/majruszsdifficulty/treasurebag/TreasureBagHelper.java @@ -144,7 +144,7 @@ private static void sendToPlayer( Player player, ResourceLocation id, BagProgres } private static void sendToPlayer( Player player, ResourceLocation id, BagProgress bagProgress, List< Integer > unlockedIndices ) { - MajruszsDifficulty.Network.TREASURE_BAG_PROGRESS.sendToClient( ( ServerPlayer )player, new Progress( id, bagProgress, unlockedIndices ) ); + MajruszsDifficulty.TREASURE_BAG_PROGRESS_NETWORK.sendToClient( ( ServerPlayer )player, new Progress( id, bagProgress, unlockedIndices ) ); } private static void createDefaultProgress( BagProgress bagProgress, LootParams params, ResourceLocation lootId ) { diff --git a/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/FishingRewarder.java b/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/FishingRewarder.java index 15faf44e5..b58f9794b 100644 --- a/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/FishingRewarder.java +++ b/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/FishingRewarder.java @@ -36,7 +36,7 @@ private static void updateItemsFished( OnItemFished data ) { --fishingInfo.fishesLeft; if( fishingInfo.fishesLeft == 0 ) { - ItemHelper.giveToPlayer( new ItemStack( MajruszsDifficulty.Items.ANGLER_TREASURE_BAG.get() ), data.player ); + ItemHelper.giveToPlayer( new ItemStack( MajruszsDifficulty.ANGLER_TREASURE_BAG_ITEM.get() ), data.player ); } } ); } diff --git a/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/KillRewarder.java b/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/KillRewarder.java index 9d562b47f..7ede5f446 100644 --- a/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/KillRewarder.java +++ b/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/KillRewarder.java @@ -18,10 +18,10 @@ public class KillRewarder { private static final Map< String, Supplier< TreasureBag > > REWARDS = Map.of( - "minecraft:elder_guardian", MajruszsDifficulty.Items.ELDER_GUARDIAN_TREASURE_BAG, - "minecraft:ender_dragon", MajruszsDifficulty.Items.ENDER_DRAGON_TREASURE_BAG, - "minecraft:warden", MajruszsDifficulty.Items.WARDEN_TREASURE_BAG, - "minecraft:wither", MajruszsDifficulty.Items.WITHER_TREASURE_BAG + "minecraft:elder_guardian", MajruszsDifficulty.ELDER_GUARDIAN_TREASURE_BAG_ITEM, + "minecraft:ender_dragon", MajruszsDifficulty.ENDER_DRAGON_TREASURE_BAG_ITEM, + "minecraft:warden", MajruszsDifficulty.WARDEN_TREASURE_BAG_ITEM, + "minecraft:wither", MajruszsDifficulty.WITHER_TREASURE_BAG_ITEM ); static { diff --git a/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/RaidRewarder.java b/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/RaidRewarder.java index 8f48189cb..02401fd85 100644 --- a/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/RaidRewarder.java +++ b/common/src/main/java/com/majruszsdifficulty/treasurebag/listeners/RaidRewarder.java @@ -17,10 +17,10 @@ public class RaidRewarder { } private static void giveTreasureBags( OnRaidDefeated data ) { - data.players.forEach( player->ItemHelper.giveToPlayer( new ItemStack( MajruszsDifficulty.Items.PILLAGER_TREASURE_BAG.get() ), player ) ); + data.players.forEach( player->ItemHelper.giveToPlayer( new ItemStack( MajruszsDifficulty.PILLAGER_TREASURE_BAG_ITEM.get() ), player ) ); } private static void giveTreasureBags( OnUndeadArmyDefeated data ) { - data.undeadArmy.participants.forEach( player->ItemHelper.giveToPlayer( new ItemStack( MajruszsDifficulty.Items.UNDEAD_ARMY_TREASURE_BAG.get() ), player ) ); + data.undeadArmy.participants.forEach( player->ItemHelper.giveToPlayer( new ItemStack( MajruszsDifficulty.UNDEAD_ARMY_TREASURE_BAG_ITEM.get() ), player ) ); } } diff --git a/common/src/main/java/com/majruszsdifficulty/undeadarmy/UndeadArmyConfig.java b/common/src/main/java/com/majruszsdifficulty/undeadarmy/UndeadArmyConfig.java index aef7b7920..f2ac29612 100644 --- a/common/src/main/java/com/majruszsdifficulty/undeadarmy/UndeadArmyConfig.java +++ b/common/src/main/java/com/majruszsdifficulty/undeadarmy/UndeadArmyConfig.java @@ -54,7 +54,7 @@ public class UndeadArmyConfig { new MobDef( EntityType.HUSK, "majruszsdifficulty:undead_army/wave_3_mob", 3 ), new MobDef( EntityType.STRAY, "majruszsdifficulty:undead_army/wave_3_skeleton", 3 ) ), - new MobDef( MajruszsDifficulty.Entities.TANK ), + new MobDef( MajruszsDifficulty.TANK_ENTITY ), GameStage.NORMAL_ID, 24 ), @@ -64,7 +64,7 @@ public class UndeadArmyConfig { new MobDef( EntityType.WITHER_SKELETON, "majruszsdifficulty:undead_army/wave_4_mob", 1 ), new MobDef( EntityType.SKELETON, "majruszsdifficulty:undead_army/wave_4_skeleton", 2 ), new MobDef( EntityType.WITHER_SKELETON, "majruszsdifficulty:undead_army/wave_4_mob", 1 ), - new MobDef( MajruszsDifficulty.Entities.TANK ), + new MobDef( MajruszsDifficulty.TANK_ENTITY ), new MobDef( EntityType.HUSK, "majruszsdifficulty:undead_army/wave_4_mob", 3 ), new MobDef( EntityType.WITHER_SKELETON, "majruszsdifficulty:undead_army/wave_4_mob", 1 ), new MobDef( EntityType.STRAY, "majruszsdifficulty:undead_army/wave_4_skeleton", 3 ), @@ -80,11 +80,11 @@ public class UndeadArmyConfig { new MobDef( EntityType.SKELETON, "majruszsdifficulty:undead_army/wave_5_skeleton", 1 ), new MobDef( EntityType.STRAY, "majruszsdifficulty:undead_army/wave_5_skeleton", 3 ), new MobDef( EntityType.WITHER_SKELETON, "majruszsdifficulty:undead_army/wave_5_mob", 2 ), - new MobDef( MajruszsDifficulty.Entities.TANK ), + new MobDef( MajruszsDifficulty.TANK_ENTITY ), new MobDef( EntityType.HUSK, "majruszsdifficulty:undead_army/wave_5_mob", 3 ), new MobDef( EntityType.WITHER_SKELETON, "majruszsdifficulty:undead_army/wave_5_mob", 2 ) ), - new MobDef( MajruszsDifficulty.Entities.CERBERUS ), + new MobDef( MajruszsDifficulty.CERBERUS_ENTITY ), GameStage.EXPERT_ID, 40 ), @@ -92,13 +92,13 @@ public class UndeadArmyConfig { List.of( new MobDef( EntityType.ZOMBIE, "majruszsdifficulty:undead_army/wave_6_mob", 1 ), new MobDef( EntityType.SKELETON, "majruszsdifficulty:undead_army/wave_6_skeleton", 1 ), - new MobDef( MajruszsDifficulty.Entities.TANK ), + new MobDef( MajruszsDifficulty.TANK_ENTITY ), new MobDef( EntityType.STRAY, "majruszsdifficulty:undead_army/wave_6_skeleton", 1 ), new MobDef( EntityType.HUSK, "majruszsdifficulty:undead_army/wave_6_mob", 1 ), new MobDef( EntityType.WITHER_SKELETON, "majruszsdifficulty:undead_army/wave_6_wither_skeleton", 1 ), - new MobDef( MajruszsDifficulty.Entities.CERBERUS ) + new MobDef( MajruszsDifficulty.CERBERUS_ENTITY ) ), - new MobDef( MajruszsDifficulty.Entities.GIANT, "majruszsdifficulty:undead_army/wave_6_mob", 1 ), + new MobDef( MajruszsDifficulty.GIANT_ENTITY, "majruszsdifficulty:undead_army/wave_6_mob", 1 ), GameStage.MASTER_ID, 48 ) diff --git a/common/src/main/java/com/majruszsdifficulty/undeadarmy/listeners/SoundPlayer.java b/common/src/main/java/com/majruszsdifficulty/undeadarmy/listeners/SoundPlayer.java index cb2239bf6..fe52d98fb 100644 --- a/common/src/main/java/com/majruszsdifficulty/undeadarmy/listeners/SoundPlayer.java +++ b/common/src/main/java/com/majruszsdifficulty/undeadarmy/listeners/SoundPlayer.java @@ -19,7 +19,7 @@ public class SoundPlayer { } private static void playStart( OnUndeadArmyStarted data ) { - SoundEmitter.of( MajruszsDifficulty.Sounds.UNDEAD_ARMY_APPROACHING ) + SoundEmitter.of( MajruszsDifficulty.UNDEAD_ARMY_APPROACHING_SOUND ) .position( AnyPos.from( data.undeadArmy.position ).vec3() ) .volume( Random.nextFloat( 0.2f, 0.3f ) ) .pitch( Random.nextFloat( 0.9f, 1.1f ) ) @@ -34,7 +34,7 @@ private static void playWaveStart( OnUndeadArmyStateChanged data ) { .vec3(); data.undeadArmy.participants.forEach( player->{ - SoundEmitter.of( MajruszsDifficulty.Sounds.UNDEAD_ARMY_WAVE_STARTED ) + SoundEmitter.of( MajruszsDifficulty.UNDEAD_ARMY_WAVE_STARTED_SOUND ) .position( new Vec3( position.x, player.getY(), position.z ) ) .volume( Random.nextFloat( 50.0f, 80.0f ) ) .pitch( Random.nextFloat( 0.9f, 1.1f ) ) diff --git a/fabric/libs/majrusz-library-fabric-1.20.1-7.0.0.jar b/fabric/libs/majrusz-library-fabric-1.20.1-7.0.0.jar index 5a7e2b516..a9794f350 100644 Binary files a/fabric/libs/majrusz-library-fabric-1.20.1-7.0.0.jar and b/fabric/libs/majrusz-library-fabric-1.20.1-7.0.0.jar differ diff --git a/fabric/src/main/java/com/majruszsdifficulty/Initializer.java b/fabric/src/main/java/com/majruszsdifficulty/Initializer.java index b0fa67158..212d85109 100644 --- a/fabric/src/main/java/com/majruszsdifficulty/Initializer.java +++ b/fabric/src/main/java/com/majruszsdifficulty/Initializer.java @@ -18,15 +18,15 @@ public class Initializer implements ModInitializer { public void onInitialize() { MajruszsDifficulty.HELPER.register(); - BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.PlacedFeatures.ENDERIUM_ORE ); - BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.PlacedFeatures.ENDERIUM_ORE_LARGE ); - BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.PlacedFeatures.FRAGILE_END_STONE ); - BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.PlacedFeatures.FRAGILE_END_STONE_LARGE ); - BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.PlacedFeatures.INFESTED_END_STONE ); + BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.ENDERIUM_ORE_PLACED_FEATURE ); + BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.ENDERIUM_ORE_LARGE_PLACED_FEATURE ); + BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.FRAGILE_END_STONE_PLACED_FEATURE ); + BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.FRAGILE_END_STONE_LARGE_PLACED_FEATURE ); + BiomeModifications.addFeature( IS_END, GenerationStep.Decoration.UNDERGROUND_ORES, MajruszsDifficulty.INFESTED_END_STONE_PLACED_FEATURE ); - BiomeModifications.addSpawn( IS_OVERWORLD, MobCategory.MONSTER, MajruszsDifficulty.Entities.CURSED_ARMOR.get(), 30, 1, 3 ); - BiomeModifications.addSpawn( IS_OVERWORLD, MobCategory.MONSTER, MajruszsDifficulty.Entities.ILLUSIONER.get(), 8, 1, 1 ); - BiomeModifications.addSpawn( IS_OVERWORLD, MobCategory.MONSTER, MajruszsDifficulty.Entities.TANK.get(), 3, 1, 1 ); - BiomeModifications.addSpawn( IS_NETHER, MobCategory.MONSTER, MajruszsDifficulty.Entities.CERBERUS.get(), 1, 1, 1 ); + BiomeModifications.addSpawn( IS_OVERWORLD, MobCategory.MONSTER, MajruszsDifficulty.CURSED_ARMOR_ENTITY.get(), 30, 1, 3 ); + BiomeModifications.addSpawn( IS_OVERWORLD, MobCategory.MONSTER, MajruszsDifficulty.ILLUSIONER_ENTITY.get(), 8, 1, 1 ); + BiomeModifications.addSpawn( IS_OVERWORLD, MobCategory.MONSTER, MajruszsDifficulty.TANK_ENTITY.get(), 3, 1, 1 ); + BiomeModifications.addSpawn( IS_NETHER, MobCategory.MONSTER, MajruszsDifficulty.CERBERUS_ENTITY.get(), 1, 1, 1 ); } } diff --git a/forge/libs/majrusz-library-forge-1.20.1-7.0.0.jar b/forge/libs/majrusz-library-forge-1.20.1-7.0.0.jar index 1ec35ada9..91648d7c1 100644 Binary files a/forge/libs/majrusz-library-forge-1.20.1-7.0.0.jar and b/forge/libs/majrusz-library-forge-1.20.1-7.0.0.jar differ diff --git a/neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.0.jar b/neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.0.jar index 074865ed1..c75da0bd4 100644 Binary files a/neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.0.jar and b/neoforge/libs/majrusz-library-neoforge-1.20.1-7.0.0.jar differ