diff --git a/gradle.properties b/gradle.properties index c75577b..d45c1f2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,19 +5,19 @@ org.gradle.parallel = true # Mod Properties maven_group = ru.pinkgoosik archives_base_name = skylands -mod_version = 0.4.0+1.20.2 +mod_version = 0.4.0+1.20.4 # Dependencies | Check these on https://fabricmc.net/develop -minecraft_version = 1.20.2 -yarn_mappings = 1.20.2+build.1 -fabric_loader = 0.14.22 -fabric_api = 0.89.1+1.20.2 +minecraft_version = 1.20.4 +yarn_mappings = 1.20.4+build.2 +fabric_loader = 0.15.1 +fabric_api = 0.91.1+1.20.4 # https://github.com/OnyxStudios/Cardinal-Components-API/releases -cca = 5.3.0 +cca = 5.4.0 # https://github.com/NucleoidMC/fantasy/releases -fantasy = 0.4.11+1.20-rc1 +fantasy = 0.5.0+1.20.4 # https://github.com/Patbox/TextPlaceholderAPI/releases -placeholder_api = 2.2.0+1.20.2 +placeholder_api = 2.3.0+1.20.3 # https://github.com/NucleoidMC/Server-Translations/releases -server_translations_api = 2.1.0+1.20.2-rc2 +server_translations_api = 2.2.0+1.20.3-rc1 diff --git a/src/main/java/skylands/mixin/world/ServerWorldMixin.java b/src/main/java/skylands/mixin/world/ServerWorldMixin.java index 8a9bddd..3690b94 100644 --- a/src/main/java/skylands/mixin/world/ServerWorldMixin.java +++ b/src/main/java/skylands/mixin/world/ServerWorldMixin.java @@ -1,6 +1,7 @@ package skylands.mixin.world; import com.google.common.collect.ImmutableList; +import net.minecraft.block.entity.Spawner; import net.minecraft.entity.Entity; import net.minecraft.registry.DynamicRegistryManager; import net.minecraft.registry.RegistryKey; @@ -30,7 +31,7 @@ import net.minecraft.world.spawner.CatSpawner; import net.minecraft.world.spawner.PatrolSpawner; import net.minecraft.world.spawner.PhantomSpawner; -import net.minecraft.world.spawner.Spawner; +import net.minecraft.world.spawner.SpecialSpawner; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mutable; @@ -52,14 +53,14 @@ public abstract class ServerWorldMixin extends World implements StructureWorldAc @Mutable @Shadow @Final private ServerChunkManager chunkManager; @Shadow @Final private ServerEntityManager entityManager; - @Mutable @Shadow @Final private List spawners; + @Mutable @Shadow @Final private List spawners; protected ServerWorldMixin(MutableWorldProperties properties, RegistryKey registryRef, DynamicRegistryManager registryManager, RegistryEntry dimensionEntry, Supplier profiler, boolean isClient, boolean debugWorld, long biomeAccess, int maxChainedNeighborUpdates) { super(properties, registryRef, registryManager, dimensionEntry, profiler, isClient, debugWorld, biomeAccess, maxChainedNeighborUpdates); } @Inject(method = "", at = @At("TAIL")) - void init(MinecraftServer server, Executor workerExecutor, LevelStorage.Session session, ServerWorldProperties properties, RegistryKey worldKey, DimensionOptions dimensionOptions, WorldGenerationProgressListener worldGenerationProgressListener, boolean debugWorld, long seed, List spawners, boolean shouldTickTime, RandomSequencesState randomSequencesState, CallbackInfo ci) { + void init(MinecraftServer server, Executor workerExecutor, LevelStorage.Session session, ServerWorldProperties properties, RegistryKey worldKey, DimensionOptions dimensionOptions, WorldGenerationProgressListener worldGenerationProgressListener, boolean debugWorld, long seed, List spawners, boolean shouldTickTime, RandomSequencesState randomSequencesState, CallbackInfo ci) { if(worldKey.getValue().getNamespace().equals(SkylandsMod.MOD_ID)) { this.spawners = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new ZombieSiegeManager(), new WanderingTraderManager(properties)); diff --git a/src/main/java/skylands/mixin/world/protection/BoatMixin.java b/src/main/java/skylands/mixin/world/protection/BoatMixin.java deleted file mode 100644 index ec6d29f..0000000 --- a/src/main/java/skylands/mixin/world/protection/BoatMixin.java +++ /dev/null @@ -1,33 +0,0 @@ -package skylands.mixin.world.protection; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityType; -import net.minecraft.entity.damage.DamageSource; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.vehicle.BoatEntity; -import net.minecraft.world.World; -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 skylands.util.SkylandsTexts; -import skylands.util.WorldProtection; - -@Mixin(BoatEntity.class) -public abstract class BoatMixin extends Entity { - - public BoatMixin(EntityType type, World world) { - super(type, world); - } - - @Inject(method = "damage", at = @At("HEAD"), cancellable = true) - void damage(DamageSource source, float amount, CallbackInfoReturnable cir) { - World world = getWorld(); - if(!world.isClient && source.getAttacker() instanceof PlayerEntity attacker) { - if(!WorldProtection.canModify(world, attacker)) { - attacker.sendMessage(SkylandsTexts.prefixed("message.skylands.world_protection.entity_hurt"), true); - cir.setReturnValue(false); - } - } - } -} diff --git a/src/main/java/skylands/mixin/world/protection/MinecartMixin.java b/src/main/java/skylands/mixin/world/protection/MinecartMixin.java index 477301e..dd38a9e 100644 --- a/src/main/java/skylands/mixin/world/protection/MinecartMixin.java +++ b/src/main/java/skylands/mixin/world/protection/MinecartMixin.java @@ -5,6 +5,7 @@ import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.vehicle.AbstractMinecartEntity; +import net.minecraft.entity.vehicle.VehicleEntity; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -13,10 +14,10 @@ import skylands.util.SkylandsTexts; import skylands.util.WorldProtection; -@Mixin(AbstractMinecartEntity.class) -public abstract class MinecartMixin extends Entity { +@Mixin(VehicleEntity.class) +abstract class VehicleEntityMixin extends Entity { - public MinecartMixin(EntityType type, World world) { + public VehicleEntityMixin(EntityType type, World world) { super(type, world); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index b486b5d..01d4adf 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -9,7 +9,8 @@ ], "contributors": [ "KujouMolean", - "Drex" + "Drex", + "Camper_Samu" ], "contact": { "homepage": "https://modrinth.com/mod/skylands", @@ -40,7 +41,7 @@ "depends": { "fabricloader": "*", "fabric": "*", - "minecraft": ">=1.20.2-rc.1 <1.21", + "minecraft": ">=1.20.3 <1.21", "java": ">=17" } } diff --git a/src/main/resources/skylands.mixins.json b/src/main/resources/skylands.mixins.json index d616d31..cbb007b 100644 --- a/src/main/resources/skylands.mixins.json +++ b/src/main/resources/skylands.mixins.json @@ -16,7 +16,6 @@ "world.protection.AxeItemMixin", "world.protection.BarrelBlockMixin", "world.protection.BlockItemMixin", - "world.protection.BoatMixin", "world.protection.BoneMealItemMixin", "world.protection.BucketItemMixin", "world.protection.ButtonMixin", @@ -36,12 +35,12 @@ "world.protection.ItemFrameEntityMixin", "world.protection.LeverMixin", "world.protection.LivingEntityMixin", - "world.protection.MinecartMixin", "world.protection.RedstoneWireMixin", "world.protection.RepeaterMixin", "world.protection.ShovelItemMixin", "world.protection.ShulkerBoxBlockMixin", "world.protection.StorageMinecartMixin", + "world.protection.VehicleEntityMixin", "world.protection.VillagerEntityMixin" ], "injectors": {