1.16-pre1
This commit is contained in:
1 parent
4528e7ac41
commit
6c01ae6807
7 files changed
+35
-41
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import net.minecraft.entity.LightningEntity;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
@@ -18,10 +19,13 @@ public class ServerWorld_scarpetEventMixin
|
||||
{
|
||||
@Inject(method = "tickChunk", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/world/ServerWorld;addLightning(Lnet/minecraft/entity/LightningEntity;)V"
|
||||
target = "Lnet/minecraft/server/world/ServerWorld;spawnEntity(Lnet/minecraft/entity/Entity;)Z",
|
||||
shift = At.Shift.BEFORE,
|
||||
ordinal = 1
|
||||
))
|
||||
private void onNaturalLightinig(WorldChunk chunk, int randomTickSpeed, CallbackInfo ci,
|
||||
ChunkPos chunkPos, boolean bl, int i, int j, Profiler profiler, BlockPos blockPos, boolean bl2)
|
||||
//ChunkPos chunkPos, boolean bl, int i, int j, Profiler profiler, BlockPos blockPos, boolean bl2)
|
||||
ChunkPos chunkPos, boolean bl, int i, int j, Profiler profiler, BlockPos blockPos, boolean bl2, LightningEntity lightningEntity)
|
||||
{
|
||||
if (LIGHTNING.isNeeded()) LIGHTNING.onWorldEventFlag((ServerWorld) (Object)this, blockPos, bl2?1:0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user