Adding absorption and xp API, and weather control (#540)
* fixes #537 * fixes #547
This commit is contained in:
1 parent
8acb322747
commit
42e67f27b7
9 files changed
+184
-20
No files matched your search
+9
-1
@@ -1,6 +1,7 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import carpet.fakes.ServerWorldInterface;
|
||||
import carpet.script.CarpetEventServer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LightningEntity;
|
||||
@@ -9,7 +10,9 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.profiler.Profiler;
|
||||
import net.minecraft.world.chunk.WorldChunk;
|
||||
import net.minecraft.world.level.ServerWorldProperties;
|
||||
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;
|
||||
@@ -19,7 +22,7 @@ import static carpet.script.CarpetEventServer.Event.ENTITY_LOAD;
|
||||
import static carpet.script.CarpetEventServer.Event.LIGHTNING;
|
||||
|
||||
@Mixin(ServerWorld.class)
|
||||
public class ServerWorld_scarpetEventMixin
|
||||
public class ServerWorld_scarpetMixin implements ServerWorldInterface
|
||||
{
|
||||
@Inject(method = "tickChunk", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(
|
||||
value = "INVOKE",
|
||||
@@ -54,4 +57,9 @@ public class ServerWorld_scarpetEventMixin
|
||||
}
|
||||
}
|
||||
|
||||
@Shadow
|
||||
private ServerWorldProperties worldProperties;
|
||||
public ServerWorldProperties getWorldPropertiesCM(){
|
||||
return worldProperties;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user