Fix mod world to force cast to server world (#121)

* Fix mod world to force cast to server world

* Update forge version to 35.1.29
This commit is contained in:
寒兮 2021-01-08 20:08:38 +08:00 committed by GitHub
parent 18ef0518d0
commit 03401a43b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 11 deletions

View File

@ -6,7 +6,7 @@ A Bukkit server implementation utilizing Mixin.
| Minecraft | Forge | Status | Build |
| :----: | :----: | :---: | :---: |
| 1.16.x | 35.1.28 | ACTIVE | [![1.16 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-16?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-16) |
| 1.16.x | 35.1.29 | ACTIVE | [![1.16 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-16?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-16) |
| 1.15.x | 31.2.47 | ACTIVE | [![1.15 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight-15?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-15) |
| 1.14.x | 28.2.0 | [LEGACY](https://github.com/IzzelAliz/Arclight/releases/tag/1.0.6) | [![1.14 Status](https://img.shields.io/appveyor/build/IzzelAliz/arclight?style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight) |

View File

@ -21,7 +21,7 @@ apply plugin: 'io.izzel.arclight'
ext {
minecraftVersion = '1.16.4'
forgeVersion = '35.1.28'
forgeVersion = '35.1.29'
}
arclight {

View File

@ -1,10 +1,10 @@
package io.izzel.arclight.common.bridge.world.border;
import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.World;
public interface WorldBorderBridge {
ServerWorld bridge$getWorld();
World bridge$getWorld();
void bridge$setWorld(ServerWorld world);
void bridge$setWorld(World world);
}

View File

@ -88,7 +88,7 @@ public abstract class WorldMixin implements WorldBridge {
@Inject(method = "<init>(Lnet/minecraft/world/storage/ISpawnWorldInfo;Lnet/minecraft/util/RegistryKey;Lnet/minecraft/world/DimensionType;Ljava/util/function/Supplier;ZZJ)V", at = @At("RETURN"))
private void arclight$init(ISpawnWorldInfo info, RegistryKey<World> dimension, DimensionType dimType, Supplier<IProfiler> profiler, boolean isRemote, boolean isDebug, long seed, CallbackInfo ci) {
this.spigotConfig = new SpigotWorldConfig(((IServerWorldInfo) info).getWorldName());
((WorldBorderBridge) this.worldBorder).bridge$setWorld((ServerWorld) (Object) this);
((WorldBorderBridge) this.worldBorder).bridge$setWorld((World) (Object) this);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns();
this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns();
this.ticksPerWaterSpawns = this.getServer().getTicksPerWaterSpawns();

View File

@ -2,21 +2,21 @@ package io.izzel.arclight.common.mixin.core.world.border;
import io.izzel.arclight.common.bridge.world.border.WorldBorderBridge;
import net.minecraft.world.border.WorldBorder;
import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(WorldBorder.class)
public class WorldBorderMixin implements WorldBorderBridge {
public ServerWorld world;
public World world;
@Override
public ServerWorld bridge$getWorld() {
public World bridge$getWorld() {
return this.world;
}
@Override
public void bridge$setWorld(ServerWorld world) {
public void bridge$setWorld(World world) {
this.world = world;
}
}

View File

@ -22,7 +22,7 @@ apply plugin: 'maven-publish'
ext {
minecraftVersion = '1.16.4'
forgeVersion = '35.1.28'
forgeVersion = '35.1.29'
}
arclight {