diff --git a/common/src/generated/resources/.cache/34eff76d8db6df414572b0996d464f3a4bc943ee b/common/src/generated/resources/.cache/34eff76d8db6df414572b0996d464f3a4bc943ee index 476554bc..5b155283 100644 --- a/common/src/generated/resources/.cache/34eff76d8db6df414572b0996d464f3a4bc943ee +++ b/common/src/generated/resources/.cache/34eff76d8db6df414572b0996d464f3a4bc943ee @@ -1,4 +1,4 @@ -// 1.21 2024-06-15T10:07:24.2355164 Item Models: sereneseasons +// 1.21.3 2024-10-29T11:57:32.3272904 Item Models: sereneseasons 8131cb872e089e4f0ac2bccf3d4d7a25d7d92ec7 assets/sereneseasons/models/item/calendar.json cb387a39c39a0f4665c565e7218cd4426875246a assets/sereneseasons/models/item/calendar_00.json c154671ec34c7931bc05c47db4f69f21a5e413c7 assets/sereneseasons/models/item/calendar_01.json diff --git a/common/src/generated/resources/.cache/51dc2b66606c1345aa908ef96784ba8686abe32c b/common/src/generated/resources/.cache/51dc2b66606c1345aa908ef96784ba8686abe32c index beeceea1..745c7dc8 100644 --- a/common/src/generated/resources/.cache/51dc2b66606c1345aa908ef96784ba8686abe32c +++ b/common/src/generated/resources/.cache/51dc2b66606c1345aa908ef96784ba8686abe32c @@ -1,4 +1,4 @@ -// 1.21 2024-06-15T10:07:24.2345172 Block States: sereneseasons +// 1.21.3 2024-10-29T11:57:32.3262892 Block States: sereneseasons edf060403d4f871caf88b27e91d713ee2be4ebc1 assets/sereneseasons/blockstates/season_sensor.json 2797b7f59442c019e778d4e72e49c819153d75b3 assets/sereneseasons/models/block/season_sensor_autumn.json 607600cb666bf37bc704c834d7d0ffc585b405d0 assets/sereneseasons/models/block/season_sensor_spring.json diff --git a/common/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/common/src/generated/resources/.cache/7dda471881370ae09913a072085433a4eb774f0b similarity index 58% rename from common/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e rename to common/src/generated/resources/.cache/7dda471881370ae09913a072085433a4eb774f0b index 3fc4adf3..c96c677a 100644 --- a/common/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/common/src/generated/resources/.cache/7dda471881370ae09913a072085433a4eb774f0b @@ -1,5 +1,5 @@ -// 1.21 2024-06-15T10:07:24.2355164 Recipes +// 1.21.3 2024-10-29T11:57:32.3267901 SS Recipes e072858e57ee517a9ad673759ea337523f1faf58 data/sereneseasons/advancement/recipes/redstone/season_sensor.json a6e2e9061195651e5a5ebe536429b983725e47a8 data/sereneseasons/advancement/recipes/tools/calendar.json -6dcfb1f16a07426dedd4bb0c22cf7e8875aaa637 data/sereneseasons/recipe/calendar.json -3a8122eb3cd03dfa946e5daabcc7c0a9813346e2 data/sereneseasons/recipe/season_sensor.json +8baddb9771f6e76a935fa1bf988623c65578b91f data/sereneseasons/recipe/calendar.json +1e0108f730fc7055f414ae4274b89cda22b7a722 data/sereneseasons/recipe/season_sensor.json diff --git a/common/src/generated/resources/data/sereneseasons/recipe/calendar.json b/common/src/generated/resources/data/sereneseasons/recipe/calendar.json index 24eb49df..c2abce1a 100644 --- a/common/src/generated/resources/data/sereneseasons/recipe/calendar.json +++ b/common/src/generated/resources/data/sereneseasons/recipe/calendar.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "C": { - "item": "minecraft:clock" - }, - "P": { - "item": "minecraft:paper" - } + "C": "minecraft:clock", + "P": "minecraft:paper" }, "pattern": [ "PPP", diff --git a/common/src/generated/resources/data/sereneseasons/recipe/season_sensor.json b/common/src/generated/resources/data/sereneseasons/recipe/season_sensor.json index 9bd29ca8..0480220c 100644 --- a/common/src/generated/resources/data/sereneseasons/recipe/season_sensor.json +++ b/common/src/generated/resources/data/sereneseasons/recipe/season_sensor.json @@ -2,18 +2,10 @@ "type": "minecraft:crafting_shaped", "category": "redstone", "key": { - "#": { - "item": "minecraft:cobblestone_slab" - }, - "C": { - "item": "sereneseasons:calendar" - }, - "G": { - "item": "minecraft:glass" - }, - "Q": { - "item": "minecraft:quartz" - } + "#": "minecraft:cobblestone_slab", + "C": "sereneseasons:calendar", + "G": "minecraft:glass", + "Q": "minecraft:quartz" }, "pattern": [ "GGG", diff --git a/common/src/main/java/sereneseasons/init/ModBlockEntities.java b/common/src/main/java/sereneseasons/init/ModBlockEntities.java index d70c2e00..110bb81c 100644 --- a/common/src/main/java/sereneseasons/init/ModBlockEntities.java +++ b/common/src/main/java/sereneseasons/init/ModBlockEntities.java @@ -7,6 +7,7 @@ import net.minecraft.Util; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.datafix.fixes.References; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import sereneseasons.api.SSBlockEntities; @@ -15,18 +16,19 @@ import sereneseasons.core.SereneSeasons; import java.util.List; +import java.util.Set; import java.util.function.BiConsumer; public class ModBlockEntities { public static void registerBlockEntities(BiConsumer> func) { - SSBlockEntities.SEASON_SENSOR = register(func, "season_sensor", BlockEntityType.Builder.of(SeasonSensorBlockEntity::new, SSBlocks.SEASON_SENSOR)); + SSBlockEntities.SEASON_SENSOR = register(func, "season_sensor", SeasonSensorBlockEntity::new, Set.of(SSBlocks.SEASON_SENSOR)); } - private static BlockEntityType register(BiConsumer> func, String name, BlockEntityType.Builder builder) + private static BlockEntityType register(BiConsumer> func, String name, BlockEntityType.BlockEntitySupplier supplier, Set blocks) { - var type = builder.build(Util.fetchChoiceType(References.BLOCK_ENTITY, name)); + var type = new BlockEntityType(supplier, blocks); func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), type); return type; } diff --git a/common/src/main/java/sereneseasons/init/ModBlocks.java b/common/src/main/java/sereneseasons/init/ModBlocks.java index 87b68231..25d700b8 100644 --- a/common/src/main/java/sereneseasons/init/ModBlocks.java +++ b/common/src/main/java/sereneseasons/init/ModBlocks.java @@ -1,24 +1,39 @@ package sereneseasons.init; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockBehaviour; import sereneseasons.api.SSBlocks; import sereneseasons.block.SeasonSensorBlock; import sereneseasons.core.SereneSeasons; import java.util.function.BiConsumer; +import java.util.function.Function; public class ModBlocks { public static void registerBlocks(BiConsumer func) { - SSBlocks.SEASON_SENSOR = register(func, new SeasonSensorBlock(Block.Properties.of().strength(0.2F).sound(SoundType.STONE)), "season_sensor"); + SSBlocks.SEASON_SENSOR = register(func, "season_sensor", SeasonSensorBlock::new, Block.Properties.of().strength(0.2F).sound(SoundType.STONE)); } - private static Block register(BiConsumer func, Block block, String name) + private static Block register(BiConsumer func, ResourceKey key, Function factory, BlockBehaviour.Properties properties) { - func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), block); + Block block = factory.apply(properties.setId(key)); + func.accept(key.location(), block); return block; } + + private static Block register(BiConsumer func, String name, Function factory, BlockBehaviour.Properties properties) + { + return register(func, blockId(name), factory, properties); + } + + private static ResourceKey blockId(String name) + { + return ResourceKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name)); + } } diff --git a/common/src/main/java/sereneseasons/init/ModFertility.java b/common/src/main/java/sereneseasons/init/ModFertility.java index e50d2c42..14c0e2a3 100644 --- a/common/src/main/java/sereneseasons/init/ModFertility.java +++ b/common/src/main/java/sereneseasons/init/ModFertility.java @@ -96,7 +96,7 @@ else if (!ModConfig.fertility.seasonalCrops || biome.is(ModTags.Biomes.BLACKLIST } else { - if (!biome.value().warmEnoughToRain(pos)) + if (!biome.value().warmEnoughToRain(pos, level.getSeaLevel())) { if (winterPlants.contains(cropName)) { @@ -139,7 +139,7 @@ else if (season == Season.WINTER && winterPlants.contains(cropName)) private static void populateSeasonCrops(TagKey tag, Set cropSet, int bitmask) { - BuiltInRegistries.BLOCK.getTag(tag).ifPresent(blocks -> + BuiltInRegistries.BLOCK.get(tag).ifPresent(blocks -> { for (Holder block : blocks) { @@ -176,7 +176,7 @@ private static void populateSeasonCrops(TagKey tag, Set cropSet, private static void populateSeasonSeeds(TagKey tag, Set cropSet, int bitmask) { - BuiltInRegistries.ITEM.getTag(tag).ifPresent(items -> + BuiltInRegistries.ITEM.get(tag).ifPresent(items -> { for (Holder item : items) { diff --git a/common/src/main/java/sereneseasons/init/ModItems.java b/common/src/main/java/sereneseasons/init/ModItems.java index 6a3bbc56..6c630704 100644 --- a/common/src/main/java/sereneseasons/init/ModItems.java +++ b/common/src/main/java/sereneseasons/init/ModItems.java @@ -1,15 +1,20 @@ package sereneseasons.init; import glitchcore.util.Environment; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; import sereneseasons.api.SSBlocks; import sereneseasons.api.SSItems; import sereneseasons.core.SereneSeasons; import sereneseasons.item.CalendarItem; import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Function; import static sereneseasons.api.SSItems.*; @@ -29,20 +34,57 @@ public static void setup(BiConsumer func) public static void registerItems(BiConsumer func) { // SS Creative Tab Icon - SSItems.SS_ICON = register(func, "ss_icon", new Item(new Item.Properties())); + SSItems.SS_ICON = registerItem(func, "ss_icon", new Item.Properties()); // Main Items - SSItems.CALENDAR = register(func, "calendar", new CalendarItem(new Item.Properties().stacksTo(1))); + SSItems.CALENDAR = registerItem(func, "calendar", CalendarItem::new, new Item.Properties().stacksTo(1)); } public static void registerBlockItems(BiConsumer func) { - SEASON_SENSOR = register(func, "season_sensor", new BlockItem(SSBlocks.SEASON_SENSOR, new Item.Properties())); + SEASON_SENSOR = registerBlock(func, SSBlocks.SEASON_SENSOR); } - private static Item register(BiConsumer func, String name, Item item) + public static Item registerBlock(BiConsumer func, Block block) { - func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), item); + return registerBlock(func, block, BlockItem::new); + } + + public static Item registerBlock(BiConsumer func, Block block, BiFunction factory) + { + return registerBlock(func, block, factory, new Item.Properties()); + } + + public static Item registerBlock(BiConsumer func, Block block, BiFunction factory, Item.Properties properties) + { + return registerItem(func, blockIdToItemId(block.builtInRegistryHolder().key()), p_370785_ -> factory.apply(block, p_370785_), properties.useBlockDescriptionPrefix() + ); + } + + private static Item registerItem(BiConsumer func, ResourceKey key, Function factory, Item.Properties properties) + { + Item item = factory.apply(properties.setId(key)); + func.accept(key.location(), item); return item; } + + private static Item registerItem(BiConsumer func, String name, Function factory, Item.Properties properties) + { + return registerItem(func, itemId(name), factory, properties); + } + + private static Item registerItem(BiConsumer func, String name, Item.Properties properties) + { + return registerItem(func, itemId(name), Item::new, properties); + } + + private static ResourceKey blockIdToItemId(ResourceKey key) + { + return ResourceKey.create(Registries.ITEM, key.location()); + } + + private static ResourceKey itemId(String name) + { + return ResourceKey.create(Registries.ITEM, ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name)); + } } diff --git a/common/src/main/java/sereneseasons/mixin/MixinBiome.java b/common/src/main/java/sereneseasons/mixin/MixinBiome.java index c15451f9..29fae8ca 100644 --- a/common/src/main/java/sereneseasons/mixin/MixinBiome.java +++ b/common/src/main/java/sereneseasons/mixin/MixinBiome.java @@ -20,12 +20,12 @@ public class MixinBiome @Inject(method="shouldSnow", at=@At("HEAD"), cancellable = true) public void onShouldSnow(LevelReader level, BlockPos pos, CallbackInfoReturnable cir) { - cir.setReturnValue(SeasonHooks.shouldSnowHook((Biome)(Object)this, level, pos)); + cir.setReturnValue(SeasonHooks.shouldSnowHook((Biome)(Object)this, level, pos, level.getSeaLevel())); } - @Redirect(method = "shouldFreeze(Lnet/minecraft/world/level/LevelReader;Lnet/minecraft/core/BlockPos;Z)Z", at=@At(value = "INVOKE", target = "net/minecraft/world/level/biome/Biome.warmEnoughToRain(Lnet/minecraft/core/BlockPos;)Z")) - public boolean onShouldFreeze_warmEnoughToRain(Biome biome, BlockPos pos, LevelReader level) + @Redirect(method = "shouldFreeze(Lnet/minecraft/world/level/LevelReader;Lnet/minecraft/core/BlockPos;Z)Z", at=@At(value = "INVOKE", target = "net/minecraft/world/level/biome/Biome.warmEnoughToRain(Lnet/minecraft/core/BlockPos;I)Z")) + public boolean onShouldFreeze_warmEnoughToRain(Biome biome, BlockPos pos, int seaLevel, LevelReader level) { - return SeasonHooks.shouldFreezeWarmEnoughToRainHook(biome, pos, level); + return SeasonHooks.shouldFreezeWarmEnoughToRainHook(biome, pos, seaLevel, level); } } diff --git a/common/src/main/java/sereneseasons/mixin/MixinServerLevel.java b/common/src/main/java/sereneseasons/mixin/MixinServerLevel.java index 276cb6d9..66ac1bae 100644 --- a/common/src/main/java/sereneseasons/mixin/MixinServerLevel.java +++ b/common/src/main/java/sereneseasons/mixin/MixinServerLevel.java @@ -16,9 +16,9 @@ @Mixin(ServerLevel.class) public class MixinServerLevel { - @Redirect(method="tickPrecipitation", at=@At(value = "INVOKE", target = "Lnet/minecraft/world/level/biome/Biome;getPrecipitationAt(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/level/biome/Biome$Precipitation;")) - public Biome.Precipitation tickIceAndSnow_getPrecipitationAt(Biome biome, BlockPos pos) + @Redirect(method="tickPrecipitation", at=@At(value = "INVOKE", target = "Lnet/minecraft/world/level/biome/Biome;getPrecipitationAt(Lnet/minecraft/core/BlockPos;I)Lnet/minecraft/world/level/biome/Biome$Precipitation;")) + public Biome.Precipitation tickIceAndSnow_getPrecipitationAt(Biome biome, BlockPos pos, int seaLevel) { - return SeasonHooks.getPrecipitationAtTickIceAndSnowHook((LevelReader)this, biome, pos); + return SeasonHooks.getPrecipitationAtTickIceAndSnowHook((LevelReader)this, biome, pos, seaLevel); } } diff --git a/common/src/main/java/sereneseasons/mixin/client/MixinBiomeClient.java b/common/src/main/java/sereneseasons/mixin/client/MixinBiomeClient.java index cc3687b8..f8c18fb8 100644 --- a/common/src/main/java/sereneseasons/mixin/client/MixinBiomeClient.java +++ b/common/src/main/java/sereneseasons/mixin/client/MixinBiomeClient.java @@ -18,14 +18,14 @@ public class MixinBiomeClient { @Inject(method="getPrecipitationAt", at=@At("HEAD"), cancellable = true) - public void onGetPrecipitationAt(BlockPos pos, CallbackInfoReturnable cir) + public void onGetPrecipitationAt(BlockPos pos, int seaLevel, CallbackInfoReturnable cir) { Minecraft minecraft = Minecraft.getInstance(); Level level = minecraft.level; if (level != null) { - cir.setReturnValue(SeasonHooks.getPrecipitationAtSeasonal(level, level.getBiome(pos), pos)); + cir.setReturnValue(SeasonHooks.getPrecipitationAtSeasonal(level, level.getBiome(pos), pos, seaLevel)); } } } diff --git a/common/src/main/java/sereneseasons/mixin/client/MixinLevelRenderer.java b/common/src/main/java/sereneseasons/mixin/client/MixinLevelRenderer.java deleted file mode 100644 index 70053948..00000000 --- a/common/src/main/java/sereneseasons/mixin/client/MixinLevelRenderer.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright 2022, the Glitchfiend Team. - * All rights reserved. - ******************************************************************************/ -package sereneseasons.mixin.client; - -import net.minecraft.client.renderer.LevelRenderer; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Holder; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.biome.Biome; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; -import sereneseasons.season.SeasonHooks; - -@Mixin(LevelRenderer.class) -public class MixinLevelRenderer -{ - @Unique - private Level renderSnowAndRain_level; - @Unique - private Holder renderSnowAndRain_biome; - - /* - * renderSnowAndRain - */ - - @Redirect(method="renderSnowAndRain", at=@At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;getBiome(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/core/Holder;")) - public Holder renderSnowAndRain_getBiome(Level level, BlockPos pos) - { - this.renderSnowAndRain_level = level; - this.renderSnowAndRain_biome = level.getBiome(pos); - return this.renderSnowAndRain_biome; - } - - @Redirect(method="renderSnowAndRain", at=@At(value = "INVOKE", target = "Lnet/minecraft/world/level/biome/Biome;hasPrecipitation()Z")) - public boolean renderSnowAndRain_hasPrecipitation(Biome biome) - { - return SeasonHooks.hasPrecipitationSeasonal(this.renderSnowAndRain_level, this.renderSnowAndRain_biome); - } -} diff --git a/common/src/main/java/sereneseasons/mixin/client/MixinWeatherEffectRenderer.java b/common/src/main/java/sereneseasons/mixin/client/MixinWeatherEffectRenderer.java new file mode 100644 index 00000000..8a1a0b5c --- /dev/null +++ b/common/src/main/java/sereneseasons/mixin/client/MixinWeatherEffectRenderer.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2022, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package sereneseasons.mixin.client; + +import net.minecraft.client.renderer.WeatherEffectRenderer; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.biome.Biome; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import sereneseasons.core.SereneSeasons; +import sereneseasons.season.SeasonHooks; + +@Mixin(WeatherEffectRenderer.class) +public class MixinWeatherEffectRenderer +{ + @Inject(method="getPrecipitationAt", at=@At(value = "HEAD"), cancellable = true) + public void onGetPrecipitationAt(Level level, BlockPos pos, CallbackInfoReturnable cir) + { + cir.setReturnValue(SeasonHooks.getPrecipitationAtSeasonal(level, level.getBiome(pos), pos, level.getSeaLevel())); + } +} diff --git a/common/src/main/java/sereneseasons/season/RandomUpdateHandler.java b/common/src/main/java/sereneseasons/season/RandomUpdateHandler.java index 1ae67a3a..eb02304e 100644 --- a/common/src/main/java/sereneseasons/season/RandomUpdateHandler.java +++ b/common/src/main/java/sereneseasons/season/RandomUpdateHandler.java @@ -75,7 +75,7 @@ private static void meltInChunk(ChunkMap chunkMap, LevelChunk chunkIn, float mel Holder biome = world.getBiome(topAirPos); Holder groundBiome = world.getBiome(topGroundPos); - if (!biome.is(ModTags.Biomes.BLACKLISTED_BIOMES) && SeasonHooks.getBiomeTemperature(world, biome, topGroundPos) >= 0.15F) + if (!biome.is(ModTags.Biomes.BLACKLISTED_BIOMES) && SeasonHooks.getBiomeTemperature(world, biome, topGroundPos, world.getSeaLevel()) >= 0.15F) { if (aboveGroundState.getBlock() == Blocks.SNOW) { @@ -83,7 +83,7 @@ private static void meltInChunk(ChunkMap chunkMap, LevelChunk chunkIn, float mel } } - if (!groundBiome.is(ModTags.Biomes.BLACKLISTED_BIOMES) && SeasonHooks.getBiomeTemperature(world, groundBiome, topGroundPos) >= 0.15F) + if (!groundBiome.is(ModTags.Biomes.BLACKLISTED_BIOMES) && SeasonHooks.getBiomeTemperature(world, groundBiome, topGroundPos, world.getSeaLevel()) >= 0.15F) { if (groundState.getBlock() == Blocks.ICE) { diff --git a/common/src/main/java/sereneseasons/season/SeasonColorHandlers.java b/common/src/main/java/sereneseasons/season/SeasonColorHandlers.java index 2420ea47..ba63ce62 100644 --- a/common/src/main/java/sereneseasons/season/SeasonColorHandlers.java +++ b/common/src/main/java/sereneseasons/season/SeasonColorHandlers.java @@ -25,6 +25,7 @@ import javax.annotation.Nullable; import java.util.List; +import java.util.Optional; public class SeasonColorHandlers { @@ -64,8 +65,8 @@ private static int resolveColors(ResolverType type, Biome biome, double x, doubl if (level == null) return originalColor; - Registry biomeRegistry = level.registryAccess().registryOrThrow(Registries.BIOME); - Holder biomeHolder = biomeRegistry.getResourceKey(biome).flatMap(biomeRegistry::getHolder).orElse(null); + Registry biomeRegistry = level.registryAccess().lookupOrThrow(Registries.BIOME); + Holder.Reference biomeHolder = biomeRegistry.getResourceKey(biome).flatMap(biomeRegistry::get).orElse(null); if (biomeHolder != null) { diff --git a/common/src/main/java/sereneseasons/season/SeasonHandler.java b/common/src/main/java/sereneseasons/season/SeasonHandler.java index 0ba658d0..f1e1b4a0 100644 --- a/common/src/main/java/sereneseasons/season/SeasonHandler.java +++ b/common/src/main/java/sereneseasons/season/SeasonHandler.java @@ -38,11 +38,10 @@ public class SeasonHandler implements SeasonHelper.ISeasonDataProvider public static void onLevelTick(TickEvent.Level event) { - Level level = event.getLevel(); - - if (event.getPhase() != TickEvent.Phase.START || level.isClientSide() || !ModConfig.seasons.isDimensionWhitelisted(level.dimension())) + if (event.getPhase() != TickEvent.Phase.START || event.getLevel().isClientSide() || !ModConfig.seasons.isDimensionWhitelisted(event.getLevel().dimension())) return; + ServerLevel level = (ServerLevel)event.getLevel(); long dayTime = level.getDayTime(); long lastDayTime = lastDayTimes.getOrDefault(level, dayTime); lastDayTimes.put(level, dayTime); diff --git a/common/src/main/java/sereneseasons/season/SeasonHooks.java b/common/src/main/java/sereneseasons/season/SeasonHooks.java index e8a6466e..295b4968 100644 --- a/common/src/main/java/sereneseasons/season/SeasonHooks.java +++ b/common/src/main/java/sereneseasons/season/SeasonHooks.java @@ -25,15 +25,15 @@ public class SeasonHooks // Hooks called by ASM // - public static boolean shouldSnowHook(Biome biome, LevelReader levelReader, BlockPos pos) + public static boolean shouldSnowHook(Biome biome, LevelReader levelReader, BlockPos pos, int seaLevel) { - if ((ModConfig.seasons.generateSnowAndIce && warmEnoughToRainSeasonal(levelReader, pos)) || (!ModConfig.seasons.generateSnowAndIce && biome.warmEnoughToRain(pos))) + if ((ModConfig.seasons.generateSnowAndIce && warmEnoughToRainSeasonal(levelReader, pos, seaLevel)) || (!ModConfig.seasons.generateSnowAndIce && biome.warmEnoughToRain(pos, seaLevel))) { return false; } else { - if (pos.getY() >= levelReader.getMinBuildHeight() && pos.getY() < levelReader.getMaxBuildHeight() && levelReader.getBrightness(LightLayer.BLOCK, pos) < 10) + if (levelReader.isInsideBuildHeight(pos.getY()) && levelReader.getBrightness(LightLayer.BLOCK, pos) < 10) { BlockState blockstate = levelReader.getBlockState(pos); if (blockstate.isAir() && Blocks.SNOW.defaultBlockState().canSurvive(levelReader, pos)) @@ -46,9 +46,9 @@ public static boolean shouldSnowHook(Biome biome, LevelReader levelReader, Block } } - public static boolean shouldFreezeWarmEnoughToRainHook(Biome biome, BlockPos pos, LevelReader levelReader) + public static boolean shouldFreezeWarmEnoughToRainHook(Biome biome, BlockPos pos, int seaLevel, LevelReader levelReader) { - return (ModConfig.seasons.generateSnowAndIce && warmEnoughToRainSeasonal(levelReader, pos)) || (!ModConfig.seasons.generateSnowAndIce && biome.warmEnoughToRain(pos)); + return (ModConfig.seasons.generateSnowAndIce && warmEnoughToRainSeasonal(levelReader, pos, seaLevel)) || (!ModConfig.seasons.generateSnowAndIce && biome.warmEnoughToRain(pos, seaLevel)); } public static boolean isRainingAtHook(Level level, BlockPos position) @@ -62,11 +62,11 @@ public static boolean isRainingAtHook(Level level, BlockPos position) if (ModConfig.seasons.isDimensionWhitelisted(level.dimension()) && !biome.is(ModTags.Biomes.BLACKLISTED_BIOMES)) { - return getPrecipitationAtSeasonal(level, biome, position) == Biome.Precipitation.RAIN && warmEnoughToRainSeasonal(level, biome, position); + return getPrecipitationAtSeasonal(level, biome, position, level.getSeaLevel()) == Biome.Precipitation.RAIN && warmEnoughToRainSeasonal(level, biome, position, level.getSeaLevel()); } else { - return biome.value().getPrecipitationAt(position) == Biome.Precipitation.RAIN && biome.value().getTemperature(position) >= 0.15F; + return biome.value().getPrecipitationAt(position, level.getSeaLevel()) == Biome.Precipitation.RAIN && biome.value().getTemperature(position, level.getSeaLevel()) >= 0.15F; } } } @@ -75,7 +75,7 @@ public static boolean isRainingAtHook(Level level, BlockPos position) // Hooks for different calls to getPrecipitationAt in Biome // - public static Biome.Precipitation getPrecipitationAtTickIceAndSnowHook(LevelReader level, Biome biome, BlockPos pos) + public static Biome.Precipitation getPrecipitationAtTickIceAndSnowHook(LevelReader level, Biome biome, BlockPos pos, int seaLevel) { if (!biome.hasPrecipitation()) { @@ -83,7 +83,7 @@ public static Biome.Precipitation getPrecipitationAtTickIceAndSnowHook(LevelRead } else { - boolean shouldSnow = (ModConfig.seasons.generateSnowAndIce && coldEnoughToSnowSeasonal(level, pos)) || (!ModConfig.seasons.generateSnowAndIce && biome.coldEnoughToSnow(pos)); + boolean shouldSnow = (ModConfig.seasons.generateSnowAndIce && coldEnoughToSnowSeasonal(level, pos, seaLevel)) || (!ModConfig.seasons.generateSnowAndIce && biome.coldEnoughToSnow(pos, seaLevel)); return shouldSnow ? Biome.Precipitation.SNOW : Biome.Precipitation.RAIN; } } @@ -91,50 +91,50 @@ public static Biome.Precipitation getPrecipitationAtTickIceAndSnowHook(LevelRead // // General utilities // - public static boolean coldEnoughToSnowSeasonal(LevelReader level, BlockPos pos) + public static boolean coldEnoughToSnowSeasonal(LevelReader level, BlockPos pos, int seaLevel) { - return coldEnoughToSnowSeasonal(level, level.getBiome(pos), pos); + return coldEnoughToSnowSeasonal(level, level.getBiome(pos), pos, seaLevel); } - public static boolean coldEnoughToSnowSeasonal(LevelReader level, Holder biome, BlockPos pos) + public static boolean coldEnoughToSnowSeasonal(LevelReader level, Holder biome, BlockPos pos, int seaLevel) { - return !warmEnoughToRainSeasonal(level, biome, pos); + return !warmEnoughToRainSeasonal(level, biome, pos, seaLevel); } - public static boolean warmEnoughToRainSeasonal(LevelReader level, BlockPos pos) + public static boolean warmEnoughToRainSeasonal(LevelReader level, BlockPos pos, int seaLevel) { - return warmEnoughToRainSeasonal(level, level.getBiome(pos), pos); + return warmEnoughToRainSeasonal(level, level.getBiome(pos), pos, seaLevel); } - public static boolean warmEnoughToRainSeasonal(LevelReader level, Holder biome, BlockPos pos) + public static boolean warmEnoughToRainSeasonal(LevelReader level, Holder biome, BlockPos pos, int seaLevel) { - return getBiomeTemperature(level, biome, pos) >= 0.15F; + return getBiomeTemperature(level, biome, pos, seaLevel) >= 0.15F; } - public static float getBiomeTemperature(LevelReader level, Holder biome, BlockPos pos) + public static float getBiomeTemperature(LevelReader level, Holder biome, BlockPos pos, int seaLevel) { if (!(level instanceof Level)) { - return biome.value().getTemperature(pos); + return biome.value().getTemperature(pos, seaLevel); } - return getBiomeTemperature((Level)level, biome, pos); + return getBiomeTemperature((Level)level, biome, pos, seaLevel); } - public static float getBiomeTemperature(Level level, Holder biome, BlockPos pos) + public static float getBiomeTemperature(Level level, Holder biome, BlockPos pos, int seaLevel) { if (!ModConfig.seasons.isDimensionWhitelisted(level.dimension()) || biome.is(ModTags.Biomes.BLACKLISTED_BIOMES)) { - return biome.value().getTemperature(pos); + return biome.value().getTemperature(pos, seaLevel); } - return getBiomeTemperatureInSeason(new SeasonTime(SeasonHelper.getSeasonState(level).getSeasonCycleTicks()).getSubSeason(), biome, pos); + return getBiomeTemperatureInSeason(new SeasonTime(SeasonHelper.getSeasonState(level).getSeasonCycleTicks()).getSubSeason(), biome, pos, seaLevel); } - public static float getBiomeTemperatureInSeason(Season.SubSeason subSeason, Holder biome, BlockPos pos) + public static float getBiomeTemperatureInSeason(Season.SubSeason subSeason, Holder biome, BlockPos pos, int seaLevel) { boolean tropicalBiome = biome.is(ModTags.Biomes.TROPICAL_BIOMES); - float biomeTemp = biome.value().getTemperature(pos); + float biomeTemp = biome.value().getTemperature(pos, seaLevel); if (!tropicalBiome && biome.value().getBaseTemperature() <= 0.8F && !biome.is(ModTags.Biomes.BLACKLISTED_BIOMES)) { biomeTemp = Mth.clamp(biomeTemp + ModConfig.seasons.getSeasonProperties(subSeason).biomeTempAdjustment(), -0.5F, 2.0F); @@ -165,7 +165,7 @@ public static boolean hasPrecipitationSeasonal(Level level, Holder biome) return biome.value().hasPrecipitation(); } - public static Biome.Precipitation getPrecipitationAtSeasonal(Level level, Holder biome, BlockPos pos) + public static Biome.Precipitation getPrecipitationAtSeasonal(Level level, Holder biome, BlockPos pos, int seaLevel) { if (!hasPrecipitationSeasonal(level, biome)) { @@ -173,7 +173,7 @@ public static Biome.Precipitation getPrecipitationAtSeasonal(Level level, Holder } else { - return coldEnoughToSnowSeasonal(level, biome, pos) ? Biome.Precipitation.SNOW : Biome.Precipitation.RAIN; + return coldEnoughToSnowSeasonal(level, biome, pos, seaLevel) ? Biome.Precipitation.SNOW : Biome.Precipitation.RAIN; } } } diff --git a/common/src/main/java/sereneseasons/season/SeasonalCropGrowthHandler.java b/common/src/main/java/sereneseasons/season/SeasonalCropGrowthHandler.java index 37f329ec..bba62e67 100644 --- a/common/src/main/java/sereneseasons/season/SeasonalCropGrowthHandler.java +++ b/common/src/main/java/sereneseasons/season/SeasonalCropGrowthHandler.java @@ -6,17 +6,15 @@ import net.minecraft.core.Registry; import net.minecraft.core.registries.Registries; import net.minecraft.world.InteractionHand; -import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import sereneseasons.core.SereneSeasons; import sereneseasons.init.ModConfig; import sereneseasons.init.ModFertility; import sereneseasons.init.ModTags; @@ -33,7 +31,7 @@ public static void onCropGrowth(Level level, BlockPos pos, BlockState state, Cal if (!ModConfig.fertility.seasonalCrops || !ModFertility.isCrop(state)) return; - Registry blockRegistry = level.registryAccess().registryOrThrow(Registries.BLOCK); + Registry blockRegistry = level.registryAccess().lookupOrThrow(Registries.BLOCK); boolean isFertile = ModFertility.isCropFertile(blockRegistry.getKey(state.getBlock()).toString(), level, pos); if (!isFertile && !isGlassAboveBlock(level, pos)) @@ -75,7 +73,7 @@ public static void applyBonemeal(PlayerInteractEvent.UseBlock event) BlockPos pos = hitResult.getBlockPos(); BlockState plant = level.getBlockState(pos); Block plantBlock = plant.getBlock(); - Registry blockRegistry = level.registryAccess().registryOrThrow(Registries.BLOCK); + Registry blockRegistry = level.registryAccess().lookupOrThrow(Registries.BLOCK); if (!ModConfig.fertility.seasonalCrops || !ModFertility.isCrop(plant)) return; @@ -89,13 +87,13 @@ public static void applyBonemeal(PlayerInteractEvent.UseBlock event) if (level.getRandom().nextInt(6) != 0) { event.setCancelled(true); - event.setCancelResult(InteractionResultHolder.success(stack)); + event.setCancelResult(InteractionResult.SUCCESS); } } else if (ModConfig.fertility.outOfSeasonCropBehavior == 1) { event.setCancelled(true); - event.setCancelResult(InteractionResultHolder.fail(stack)); + event.setCancelResult(InteractionResult.FAIL); } else if (ModConfig.fertility.outOfSeasonCropBehavior == 2) { @@ -103,7 +101,7 @@ else if (ModConfig.fertility.outOfSeasonCropBehavior == 2) { level.destroyBlock(pos, false); event.setCancelled(true); - event.setCancelResult(InteractionResultHolder.success(stack)); + event.setCancelResult(InteractionResult.SUCCESS); } else { diff --git a/common/src/main/resources/sereneseasons.accesswidener b/common/src/main/resources/sereneseasons.accesswidener index ef13a060..8587fddd 100644 --- a/common/src/main/resources/sereneseasons.accesswidener +++ b/common/src/main/resources/sereneseasons.accesswidener @@ -4,7 +4,7 @@ accessWidener v1 named accessible class net/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier # Biome temperature -accessible method net/minecraft/world/level/biome/Biome getTemperature (Lnet/minecraft/core/BlockPos;)F +accessible method net/minecraft/world/level/biome/Biome getTemperature (Lnet/minecraft/core/BlockPos;I)F # Item property registration accessible method net/minecraft/client/renderer/item/ItemProperties register (Lnet/minecraft/world/item/Item;Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/client/renderer/item/ClampedItemPropertyFunction;)V @@ -24,4 +24,6 @@ accessible method net/minecraft/server/level/ChunkMap anyPlayerCloseEnoughForSpa accessible method net/minecraft/world/level/block/IceBlock melt (Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V # Commands -accessible field net/minecraft/commands/synchronization/ArgumentTypeInfos BY_CLASS Ljava/util/Map; \ No newline at end of file +accessible field net/minecraft/commands/synchronization/ArgumentTypeInfos BY_CLASS Ljava/util/Map; + +accessible method net/minecraft/world/level/block/entity/BlockEntityType (Lnet/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier;Ljava/util/Set;)V \ No newline at end of file diff --git a/common/src/main/resources/sereneseasons.mixins.json b/common/src/main/resources/sereneseasons.mixins.json index 83162a85..6ee0105e 100644 --- a/common/src/main/resources/sereneseasons.mixins.json +++ b/common/src/main/resources/sereneseasons.mixins.json @@ -10,7 +10,7 @@ "MixinServerLevel" ], "client": [ - "client.MixinLevelRenderer", + "client.MixinWeatherEffectRenderer", "client.MixinBiomeClient" ], "injectors": { diff --git a/fabric/build.gradle b/fabric/build.gradle index 4504334a..f90cf86a 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,5 +1,5 @@ plugins { - id "fabric-loom" version "1.6-SNAPSHOT" + id "fabric-loom" version "1.8-SNAPSHOT" id "com.matthewprenger.cursegradle" version "1.4.0" } diff --git a/forge/build.gradle b/forge/build.gradle index 8b727476..1f175b8a 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -7,7 +7,8 @@ plugins { base.archivesName.set("${mod_name}-forge") mixin { - add sourceSets.main, "${mod_id}.refmap.json" + config("${mod_id}.mixins.json") + config("${mod_id}.forge.mixins.json") } // As of 1.20.6 Forge no longer has reobf tasks. This has broken mixins adding configs correctly into the manifest file diff --git a/forge/src/main/resources/META-INF/accesstransformer.cfg b/forge/src/main/resources/META-INF/accesstransformer.cfg index 950a6afd..290a5f0f 100644 --- a/forge/src/main/resources/META-INF/accesstransformer.cfg +++ b/forge/src/main/resources/META-INF/accesstransformer.cfg @@ -9,7 +9,9 @@ public net.minecraft.server.level.ChunkMap m_183879_(Lnet/minecraft/world/level/ public net.minecraft.world.level.block.IceBlock m_54168_(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V #melt # Biome temperature -public net.minecraft.world.level.biome.Biome m_47505_(Lnet/minecraft/core/BlockPos;)F #getTemperature +public net.minecraft.world.level.biome.Biome m_47505_(Lnet/minecraft/core/BlockPos;I)F #getTemperature # Commands -public net.minecraft.commands.synchronization.ArgumentTypeInfos f_235379_ #BY_CLASS \ No newline at end of file +public net.minecraft.commands.synchronization.ArgumentTypeInfos f_235379_ #BY_CLASS + +public net.minecraft.world.level.block.entity.BlockEntityType (Lnet/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier;Ljava/util/Set;)V \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 4f6209bb..3331efd0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,21 +3,21 @@ group=com.github.glitchfiend release_channel=beta # Common -minecraft_version=1.21.1 +minecraft_version=1.21.3 # Forge -forge_version=52.0.8 -forge_version_range=[52.0.8,) -forge_loader_version_range=[52,) +forge_version=53.0.2 +forge_version_range=[53.0.2,) +forge_loader_version_range=[53,) # NeoForge -neoforge_version=21.1.23 -neoforge_version_range=[21.1,) +neoforge_version=21.3.3-beta +neoforge_version_range=[21.3,) neoforge_loader_version_range=[1,) # Fabric -fabric_version=0.102.1+1.21.1 -fabric_loader_version=0.16.2 +fabric_version=0.107.0+1.21.3 +fabric_loader_version=0.16.8 # Mod options mod_id=sereneseasons @@ -40,4 +40,4 @@ org.gradle.daemon=false # Dependencies nightconfig_version=3.6.7 -glitchcore_version=2.1.0.0 +glitchcore_version=2.2.0.2 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4413138..9355b415 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/neoforge/src/main/java/sereneseasons/datagen/DataGenerationHandler.java b/neoforge/src/main/java/sereneseasons/datagen/DataGenerationHandler.java index 9fe52521..c9fea46c 100644 --- a/neoforge/src/main/java/sereneseasons/datagen/DataGenerationHandler.java +++ b/neoforge/src/main/java/sereneseasons/datagen/DataGenerationHandler.java @@ -27,6 +27,6 @@ public static void onGatherData(GatherDataEvent event) generator.addProvider(event.includeClient(), new SSItemModelProvider(output, existingFileHelper)); // Recipes - generator.addProvider(event.includeServer(), new SSRecipeProvider(output, event.getLookupProvider())); + generator.addProvider(event.includeServer(), new SSRecipeProvider.Runner(output, event.getLookupProvider())); } } diff --git a/neoforge/src/main/java/sereneseasons/datagen/provider/SSRecipeProvider.java b/neoforge/src/main/java/sereneseasons/datagen/provider/SSRecipeProvider.java index cd4b8321..d1300ec1 100644 --- a/neoforge/src/main/java/sereneseasons/datagen/provider/SSRecipeProvider.java +++ b/neoforge/src/main/java/sereneseasons/datagen/provider/SSRecipeProvider.java @@ -10,6 +10,7 @@ import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.data.recipes.ShapedRecipeBuilder; +import net.minecraft.data.recipes.packs.VanillaRecipeProvider; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Blocks; import sereneseasons.api.SSBlocks; @@ -19,16 +20,33 @@ public class SSRecipeProvider extends RecipeProvider { - public SSRecipeProvider(PackOutput output, CompletableFuture lookupProvider) + public SSRecipeProvider(HolderLookup.Provider provider, RecipeOutput output) { - super(output, lookupProvider); + super(provider, output); } @Override - protected void buildRecipes(RecipeOutput output) + protected void buildRecipes() { - ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, SSBlocks.SEASON_SENSOR).define('G', Items.GLASS).define('Q', Items.QUARTZ).define('C', SSItems.CALENDAR).define('#', Blocks.COBBLESTONE_SLAB).pattern("GGG").pattern("QCQ").pattern("###").unlockedBy("has_calendar", has(SSItems.CALENDAR)).save(output); - ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, SSItems.CALENDAR).define('P', Items.PAPER).define('C', Items.CLOCK).pattern("PPP").pattern("PCP").pattern("PPP").unlockedBy("has_clock", has(Items.CLOCK)).save(output); + this.shaped(RecipeCategory.REDSTONE, SSBlocks.SEASON_SENSOR).define('G', Items.GLASS).define('Q', Items.QUARTZ).define('C', SSItems.CALENDAR).define('#', Blocks.COBBLESTONE_SLAB).pattern("GGG").pattern("QCQ").pattern("###").unlockedBy("has_calendar", has(SSItems.CALENDAR)).save(output); + this.shaped(RecipeCategory.TOOLS, SSItems.CALENDAR).define('P', Items.PAPER).define('C', Items.CLOCK).pattern("PPP").pattern("PCP").pattern("PPP").unlockedBy("has_clock", has(Items.CLOCK)).save(output); } + public static class Runner extends RecipeProvider.Runner + { + public Runner(PackOutput p_365442_, CompletableFuture p_362168_) { + super(p_365442_, p_362168_); + } + + @Override + protected RecipeProvider createRecipeProvider(HolderLookup.Provider provider, RecipeOutput output) + { + return new SSRecipeProvider(provider, output); + } + + @Override + public String getName() { + return "SS Recipes"; + } + } } diff --git a/neoforge/src/main/resources/META-INF/accesstransformer.cfg b/neoforge/src/main/resources/META-INF/accesstransformer.cfg index d15a0939..736b2da6 100644 --- a/neoforge/src/main/resources/META-INF/accesstransformer.cfg +++ b/neoforge/src/main/resources/META-INF/accesstransformer.cfg @@ -9,7 +9,9 @@ public net.minecraft.server.level.ChunkMap anyPlayerCloseEnoughForSpawning(Lnet/ public net.minecraft.world.level.block.IceBlock melt(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V # Biome temperature -public net.minecraft.world.level.biome.Biome getTemperature(Lnet/minecraft/core/BlockPos;)F +public net.minecraft.world.level.biome.Biome getTemperature(Lnet/minecraft/core/BlockPos;I)F # Commands -public net.minecraft.commands.synchronization.ArgumentTypeInfos BY_CLASS \ No newline at end of file +public net.minecraft.commands.synchronization.ArgumentTypeInfos BY_CLASS + +public net.minecraft.world.level.block.entity.BlockEntityType (Lnet/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier;Ljava/util/Set;)V \ No newline at end of file