From 35420de93770d42b075b6d11f46f9de44bab33e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ales=CC=8C=20Fabia=CC=81nek?= <fabianek.ales@gmail.com> Date: Tue, 27 Dec 2022 15:33:33 +0100 Subject: [PATCH] Fixes, bumped versions --- .github/versions.json | 6 +- CHANGELOG.md | 6 + .../MoobloomFlowerFeatureRenderer.java | 3 +- .../friendsandfoes/entity/MoobloomEntity.java | 10 +- .../FriendsAndFoesPointOfInterestTypes.java | 147 ++++++------------ .../mixin/LightningEntityMixin.java | 4 +- .../mixin/ServerWorldMixin.java | 31 +++- .../tag/FriendsAndFoesTags.java | 6 + .../lightning_rods.json | 12 ++ .../friendsandfoes-common.mixins.json | 4 +- gradle.properties | 2 +- 11 files changed, 116 insertions(+), 115 deletions(-) create mode 100644 common/src/main/resources/data/friendsandfoes/tags/point_of_interest_type/lightning_rods.json diff --git a/.github/versions.json b/.github/versions.json index fb0a877d9..f6e862163 100644 --- a/.github/versions.json +++ b/.github/versions.json @@ -1,7 +1,7 @@ { - "1.19.2": "1.6.5", - "1.19.1": "1.6.5", - "1.19": "1.6.5", + "1.19.2": "1.6.6", + "1.19.1": "1.6.6", + "1.19": "1.6.6", "1.18.2": "1.4.6", "1.18.1": "1.2.5", "1.18": "1.2.5" diff --git a/CHANGELOG.md b/CHANGELOG.md index c007441a7..5494544a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## mc1.19.2-1.6.6, December 27, 2022 + +- Fixed custom lightning rods not working as the vanilla one +- Fixed moobloom child having random variant +- Fixed zombie horse trap thunderstorm spawn event + ## mc1.19.2-1.6.5, December 22, 2022 - Fixed moobloom transform sound diff --git a/common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/feature/MoobloomFlowerFeatureRenderer.java b/common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/feature/MoobloomFlowerFeatureRenderer.java index 6b65aa565..802df1a02 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/feature/MoobloomFlowerFeatureRenderer.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/client/render/entity/feature/MoobloomFlowerFeatureRenderer.java @@ -5,7 +5,6 @@ import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.block.PlantBlock; -import net.minecraft.block.TallFlowerBlock; import net.minecraft.block.TallPlantBlock; import net.minecraft.block.enums.DoubleBlockHalf; import net.minecraft.client.MinecraftClient; @@ -55,7 +54,7 @@ public void render( float scaleFactor = 0.8F; float yOffset = -0.5F; - if(flower instanceof TallPlantBlock) { + if (flower instanceof TallPlantBlock) { scaleFactor = 0.6F; yOffset = -0.666F; } diff --git a/common/src/main/java/com/faboslav/friendsandfoes/entity/MoobloomEntity.java b/common/src/main/java/com/faboslav/friendsandfoes/entity/MoobloomEntity.java index 5fcc8ab1d..66863e4dc 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/entity/MoobloomEntity.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/entity/MoobloomEntity.java @@ -200,7 +200,15 @@ public MoobloomEntity createChild( ServerWorld serverWorld, PassiveEntity entity ) { - return FriendsAndFoesEntityTypes.MOOBLOOM.get().create(serverWorld); + MoobloomVariant moobloomVariant = this.getVariant(); + if (RandomGenerator.generateInt(0, 1) == 0) { + moobloomVariant = ((MoobloomEntity) entity).getVariant(); + } + + MoobloomEntity moobloom = FriendsAndFoesEntityTypes.MOOBLOOM.get().create(serverWorld); + moobloom.setVariant(moobloomVariant); + + return moobloom; } @Override diff --git a/common/src/main/java/com/faboslav/friendsandfoes/init/FriendsAndFoesPointOfInterestTypes.java b/common/src/main/java/com/faboslav/friendsandfoes/init/FriendsAndFoesPointOfInterestTypes.java index 1ab2ca343..5f65ac641 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/init/FriendsAndFoesPointOfInterestTypes.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/init/FriendsAndFoesPointOfInterestTypes.java @@ -2,11 +2,13 @@ import com.faboslav.friendsandfoes.FriendsAndFoes; import com.faboslav.friendsandfoes.platform.RegistryHelper; +import net.minecraft.block.Block; import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.RegistryKey; import net.minecraft.world.poi.PointOfInterestType; import net.minecraft.world.poi.PointOfInterestTypes; +import java.util.HashMap; import java.util.function.Supplier; /** @@ -14,6 +16,8 @@ */ public final class FriendsAndFoesPointOfInterestTypes { + private static final HashMap<String, Supplier<PointOfInterestType>> REGISTERED_POINT_OF_INTEREST_TYPES; + public final static Supplier<PointOfInterestType> ACACIA_BEEHIVE; public final static Supplier<PointOfInterestType> BIRCH_BEEHIVE; public final static Supplier<PointOfInterestType> CRIMSON_BEEHIVE; @@ -22,16 +26,31 @@ public final class FriendsAndFoesPointOfInterestTypes public final static Supplier<PointOfInterestType> MANGROVE_BEEHIVE; public final static Supplier<PointOfInterestType> SPRUCE_BEEHIVE; public final static Supplier<PointOfInterestType> WARPED_BEEHIVE; + public static final Supplier<PointOfInterestType> EXPOSED_LIGHTNING_ROD; + public static final Supplier<PointOfInterestType> WEATHERED_LIGHTNING_ROD; + public static final Supplier<PointOfInterestType> OXIDIZED_LIGHTNING_ROD; + public static final Supplier<PointOfInterestType> WAXED_LIGHTNING_ROD; + public static final Supplier<PointOfInterestType> WAXED_EXPOSED_LIGHTNING_ROD; + public static final Supplier<PointOfInterestType> WAXED_WEATHERED_LIGHTNING_ROD; + public static final Supplier<PointOfInterestType> WAXED_OXIDIZED_LIGHTNING_ROD; static { - ACACIA_BEEHIVE = RegistryHelper.registerPointOfInterestType("acacia_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.ACACIA_BEEHIVE.get()), 1, 1)); - BIRCH_BEEHIVE = RegistryHelper.registerPointOfInterestType("birch_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.BIRCH_BEEHIVE.get()), 1, 1)); - CRIMSON_BEEHIVE = RegistryHelper.registerPointOfInterestType("crimson_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.CRIMSON_BEEHIVE.get()), 1, 1)); - DARK_OAK_BEEHIVE = RegistryHelper.registerPointOfInterestType("dark_oak_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.DARK_OAK_BEEHIVE.get()), 1, 1)); - JUNGLE_BEEHIVE = RegistryHelper.registerPointOfInterestType("jungle_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.JUNGLE_BEEHIVE.get()), 1, 1)); - MANGROVE_BEEHIVE = RegistryHelper.registerPointOfInterestType("mangrove_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.MANGROVE_BEEHIVE.get()), 1, 1)); - SPRUCE_BEEHIVE = RegistryHelper.registerPointOfInterestType("spruce_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.SPRUCE_BEEHIVE.get()), 1, 1)); - WARPED_BEEHIVE = RegistryHelper.registerPointOfInterestType("warped_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.WARPED_BEEHIVE.get()), 1, 1)); + REGISTERED_POINT_OF_INTEREST_TYPES = new HashMap<>(); + ACACIA_BEEHIVE = registerPointOfInterest("acacia_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.ACACIA_BEEHIVE.get()), 1, 1)); + BIRCH_BEEHIVE = registerPointOfInterest("birch_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.BIRCH_BEEHIVE.get()), 1, 1)); + CRIMSON_BEEHIVE = registerPointOfInterest("crimson_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.CRIMSON_BEEHIVE.get()), 1, 1)); + DARK_OAK_BEEHIVE = registerPointOfInterest("dark_oak_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.DARK_OAK_BEEHIVE.get()), 1, 1)); + JUNGLE_BEEHIVE = registerPointOfInterest("jungle_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.JUNGLE_BEEHIVE.get()), 1, 1)); + MANGROVE_BEEHIVE = registerPointOfInterest("mangrove_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.MANGROVE_BEEHIVE.get()), 1, 1)); + SPRUCE_BEEHIVE = registerPointOfInterest("spruce_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.SPRUCE_BEEHIVE.get()), 1, 1)); + WARPED_BEEHIVE = registerPointOfInterest("warped_beehive", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.WARPED_BEEHIVE.get()), 1, 1)); + EXPOSED_LIGHTNING_ROD = registerPointOfInterest("exposed_lightning_rod", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.EXPOSED_LIGHTNING_ROD.get()), 0, 1)); + WEATHERED_LIGHTNING_ROD = registerPointOfInterest("weathered_lightning_rod", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.WEATHERED_LIGHTNING_ROD.get()), 0, 1)); + OXIDIZED_LIGHTNING_ROD = registerPointOfInterest("oxidized_lightning_rod", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.OXIDIZED_LIGHTNING_ROD.get()), 0, 1)); + WAXED_LIGHTNING_ROD = registerPointOfInterest("waxed_lightning_rod", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.WAXED_LIGHTNING_ROD.get()), 0, 1)); + WAXED_EXPOSED_LIGHTNING_ROD = registerPointOfInterest("waxed_exposed_lightning_rod", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.WAXED_EXPOSED_LIGHTNING_ROD.get()), 0, 1)); + WAXED_WEATHERED_LIGHTNING_ROD = registerPointOfInterest("waxed_weathered_lightning_rod", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.WAXED_WEATHERED_LIGHTNING_ROD.get()), 0, 1)); + WAXED_OXIDIZED_LIGHTNING_ROD = registerPointOfInterest("waxed_oxidized_lightning_rod", () -> new PointOfInterestType(PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.WAXED_OXIDIZED_LIGHTNING_ROD.get()), 0, 1)); } public static void init() { @@ -41,106 +60,32 @@ public static void postInit() { fillMissingPointOfInterestMapValues(); } - private static void fillMissingPointOfInterestMapValues() { - var acaciaBeehiveStates = PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.ACACIA_BEEHIVE.get()); - PointOfInterestTypes.POI_STATES.addAll(acaciaBeehiveStates); - acaciaBeehiveStates.forEach((state) -> { - PointOfInterestTypes.POI_STATES_TO_TYPE.put( - state, - Registry.POINT_OF_INTEREST_TYPE.getEntry( - RegistryKey.of( - Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID("acacia_beehive") - ) - ).get() - ); - }); - - var birchBeehiveStates = PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.BIRCH_BEEHIVE.get()); - PointOfInterestTypes.POI_STATES.addAll(birchBeehiveStates); - birchBeehiveStates.forEach((state) -> { - PointOfInterestTypes.POI_STATES_TO_TYPE.put( - state, - Registry.POINT_OF_INTEREST_TYPE.getEntry( - RegistryKey.of( - Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID("birch_beehive") - ) - ).get() - ); - }); - - var crimsonBeehiveStates = PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.CRIMSON_BEEHIVE.get()); - PointOfInterestTypes.POI_STATES.addAll(crimsonBeehiveStates); - crimsonBeehiveStates.forEach((state) -> { - PointOfInterestTypes.POI_STATES_TO_TYPE.put( - state, - Registry.POINT_OF_INTEREST_TYPE.getEntry( - RegistryKey.of( - Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID("crimson_beehive") - ) - ).get() - ); - }); - - var darkOakBeehiveStates = PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.DARK_OAK_BEEHIVE.get()); - PointOfInterestTypes.POI_STATES.addAll(darkOakBeehiveStates); - darkOakBeehiveStates.forEach((state) -> { - PointOfInterestTypes.POI_STATES_TO_TYPE.put( - state, - Registry.POINT_OF_INTEREST_TYPE.getEntry( - RegistryKey.of( - Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID("dark_oak_beehive") - ) - ).get() - ); - }); - - var jungleBeehiveStates = PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.JUNGLE_BEEHIVE.get()); - PointOfInterestTypes.POI_STATES.addAll(jungleBeehiveStates); - jungleBeehiveStates.forEach((state) -> { - PointOfInterestTypes.POI_STATES_TO_TYPE.put( - state, - Registry.POINT_OF_INTEREST_TYPE.getEntry( - RegistryKey.of( - Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID("jungle_beehive") - ) - ).get() - ); - }); - - var mangroveBeehiveStates = PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.MANGROVE_BEEHIVE.get()); - PointOfInterestTypes.POI_STATES.addAll(mangroveBeehiveStates); - mangroveBeehiveStates.forEach((state) -> { - PointOfInterestTypes.POI_STATES_TO_TYPE.put( - state, - Registry.POINT_OF_INTEREST_TYPE.getEntry( - RegistryKey.of( - Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID("mangrove_beehive") - ) - ).get() - ); - }); + private static Supplier<PointOfInterestType> registerPointOfInterest( + String name, + Supplier<PointOfInterestType> pointOfInterestType + ) { + REGISTERED_POINT_OF_INTEREST_TYPES.put(name, pointOfInterestType); + return RegistryHelper.registerPointOfInterestType(name, pointOfInterestType); + } - var spruceBeehiveStates = PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.SPRUCE_BEEHIVE.get()); - PointOfInterestTypes.POI_STATES.addAll(spruceBeehiveStates); - spruceBeehiveStates.forEach((state) -> { - PointOfInterestTypes.POI_STATES_TO_TYPE.put( - state, - Registry.POINT_OF_INTEREST_TYPE.getEntry( - RegistryKey.of( - Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID("spruce_beehive") - ) - ).get() - ); + private static void fillMissingPointOfInterestMapValues() { + REGISTERED_POINT_OF_INTEREST_TYPES.forEach((name, pointOfInterestType) -> { + fillMissingPointOfInterestMapValueForBlock(name, pointOfInterestType.get().blockStates().iterator().next().getBlock()); }); + } - var warpedBeehiveStates = PointOfInterestTypes.getStatesOfBlock(FriendsAndFoesBlocks.WARPED_BEEHIVE.get()); - PointOfInterestTypes.POI_STATES.addAll(warpedBeehiveStates); - warpedBeehiveStates.forEach((state) -> { + private static void fillMissingPointOfInterestMapValueForBlock( + String name, + Block pointOfInterestBlock + ) { + var blockStates = PointOfInterestTypes.getStatesOfBlock(pointOfInterestBlock); + PointOfInterestTypes.POI_STATES.addAll(blockStates); + blockStates.forEach((state) -> { PointOfInterestTypes.POI_STATES_TO_TYPE.put( state, Registry.POINT_OF_INTEREST_TYPE.getEntry( RegistryKey.of( - Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID("warped_beehive") + Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID(name) ) ).get() ); diff --git a/common/src/main/java/com/faboslav/friendsandfoes/mixin/LightningEntityMixin.java b/common/src/main/java/com/faboslav/friendsandfoes/mixin/LightningEntityMixin.java index de6361aff..25d14794e 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/mixin/LightningEntityMixin.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/mixin/LightningEntityMixin.java @@ -51,7 +51,7 @@ private boolean friendsandfoes_expandPowerLightningRodIsLightningRodCondition(bo ordinal = 0, shift = At.Shift.AFTER ), - method = "Lnet/minecraft/entity/LightningEntity;tick()V" + method = "tick()V" ) private void friendsandfoes_cleanLightningRodOxidation(CallbackInfo ci) { BlockPos blockPos = this.getAffectedBlockPos(); @@ -89,7 +89,7 @@ private static boolean friendsandfoes_expandCleanOxidationRodIsLightningRodCondi ordinal = 0, shift = At.Shift.AFTER ), - method = "Lnet/minecraft/entity/LightningEntity;cleanOxidationAround(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Ljava/util/Optional;", + method = "cleanOxidationAround(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Ljava/util/Optional;", locals = LocalCapture.CAPTURE_FAILSOFT ) private static void friendsandfoes_decreaseCustomOxidationStates( diff --git a/common/src/main/java/com/faboslav/friendsandfoes/mixin/ServerWorldMixin.java b/common/src/main/java/com/faboslav/friendsandfoes/mixin/ServerWorldMixin.java index 8682371b0..c210b4d60 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/mixin/ServerWorldMixin.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/mixin/ServerWorldMixin.java @@ -16,12 +16,15 @@ import net.minecraft.world.*; import net.minecraft.world.chunk.WorldChunk; import net.minecraft.world.dimension.DimensionType; +import net.minecraft.world.poi.PointOfInterestStorage; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import java.util.Optional; import java.util.function.Supplier; @Mixin(ServerWorld.class) @@ -45,8 +48,7 @@ protected ServerWorldMixin( @Inject( method = "tickChunk", - at = @At("TAIL"), - cancellable = true + at = @At("TAIL") ) public void friendsandfoes_addZombieHorseSpawnEvent( WorldChunk chunk, int randomTickSpeed, CallbackInfo ci @@ -83,4 +85,29 @@ public void friendsandfoes_addZombieHorseSpawnEvent( } } } + + @Inject( + method = "getLightningRodPos", + at = @At("TAIL"), + cancellable = true + ) + public void friendsandfoes_getLightningRodPos( + BlockPos pos, + CallbackInfoReturnable<Optional<BlockPos>> cir + ) { + if (cir.getReturnValue().isEmpty()) { + ServerWorld serverWorld = (ServerWorld) (Object) this; + + Optional<BlockPos> optional = serverWorld.getPointOfInterestStorage().getNearestPosition((registryEntry) -> { + return registryEntry.isIn(FriendsAndFoesTags.LIGHTNING_ROD_POI); + }, (posx) -> { + return posx.getY() == this.getTopY(Heightmap.Type.WORLD_SURFACE, posx.getX(), posx.getZ()) - 1; + }, pos, 128, PointOfInterestStorage.OccupationStatus.ANY); + + + if (optional.isPresent()) { + cir.setReturnValue(optional.map((posx) -> posx.up(1))); + } + } + } } diff --git a/common/src/main/java/com/faboslav/friendsandfoes/tag/FriendsAndFoesTags.java b/common/src/main/java/com/faboslav/friendsandfoes/tag/FriendsAndFoesTags.java index 2a6733b40..844020f16 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/tag/FriendsAndFoesTags.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/tag/FriendsAndFoesTags.java @@ -8,6 +8,7 @@ import net.minecraft.tag.TagKey; import net.minecraft.util.registry.Registry; import net.minecraft.world.biome.Biome; +import net.minecraft.world.poi.PointOfInterestType; /** * @see BlockTags @@ -16,6 +17,7 @@ public final class FriendsAndFoesTags { public static final TagKey<Block> COPPER_BUTTONS = blockTag("copper_buttons"); public static final TagKey<Block> LIGHTNING_RODS = blockTag("lightning_rods"); + public static final TagKey<PointOfInterestType> LIGHTNING_ROD_POI = pointOfInterestTypeTag("lightning_rods"); public static final TagKey<Block> GLARES_SPAWNABLE_ON = blockTag("glares_spawnable_on"); public static final TagKey<Block> MAULERS_SPAWNABLE_ON = blockTag("maulers_spawnable_on"); public static final TagKey<Item> GLARE_FOOD_ITEMS = itemTag("glare_food_items"); @@ -46,4 +48,8 @@ private static TagKey<EntityType<?>> entityTypeTag(String name) { private static TagKey<Biome> biomeTag(String name) { return TagKey.of(Registry.BIOME_KEY, FriendsAndFoes.makeID(name)); } + + private static TagKey<PointOfInterestType> pointOfInterestTypeTag(String name) { + return TagKey.of(Registry.POINT_OF_INTEREST_TYPE_KEY, FriendsAndFoes.makeID(name)); + } } diff --git a/common/src/main/resources/data/friendsandfoes/tags/point_of_interest_type/lightning_rods.json b/common/src/main/resources/data/friendsandfoes/tags/point_of_interest_type/lightning_rods.json new file mode 100644 index 000000000..2880bdb6d --- /dev/null +++ b/common/src/main/resources/data/friendsandfoes/tags/point_of_interest_type/lightning_rods.json @@ -0,0 +1,12 @@ +{ + "replace": false, + "values": [ + "friendsandfoes:exposed_lightning_rod", + "friendsandfoes:weathered_lightning_rod", + "friendsandfoes:oxidized_lightning_rod", + "friendsandfoes:waxed_lightning_rod", + "friendsandfoes:waxed_exposed_lightning_rod", + "friendsandfoes:waxed_oxidized_lightning_rod", + "friendsandfoes:waxed_weathered_lightning_rod" + ] +} \ No newline at end of file diff --git a/common/src/main/resources/friendsandfoes-common.mixins.json b/common/src/main/resources/friendsandfoes-common.mixins.json index 042b6141b..8ecec5969 100644 --- a/common/src/main/resources/friendsandfoes-common.mixins.json +++ b/common/src/main/resources/friendsandfoes-common.mixins.json @@ -27,6 +27,7 @@ "RaidMemberMixin", "RaidMixin", "ServerWorldAccessor", + "ServerWorldMixin", "SpawnRestrictionAccessor", "StructurePoolMixin", "VillagerEntityMixin", @@ -38,8 +39,5 @@ "ClientPlayNetworkHandlerMixin", "IllusionerEntityRendererMixin", "ModelPartAccessor" - ], - "server": [ - "ServerWorldMixin" ] } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f3e1c2849..0c8444da7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.configureondemand=false # Mod mod_name=Friends&Foes mod_id=friendsandfoes -mod_version=1.6.5 +mod_version=1.6.6 mod_author=Faboslav mod_description=Adds outvoted and forgotten mobs from the mob votes in a believable vanilla plus style. maven_group=com.faboslav.friendsandfoes