mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
Do not allow Vexes to load chunks
This commit is contained in:
parent
a44dc35353
commit
c569dccd4e
@ -1,6 +1,18 @@
|
||||
--- a/net/minecraft/world/entity/monster/Vex.java
|
||||
+++ b/net/minecraft/world/entity/monster/Vex.java
|
||||
@@ -381,7 +381,7 @@
|
||||
@@ -354,7 +354,10 @@
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
BlockPos blockposition1 = blockposition.offset(Vex.this.random.nextInt(15) - 7, Vex.this.random.nextInt(11) - 5, Vex.this.random.nextInt(15) - 7);
|
||||
|
||||
- if (Vex.this.level().isEmptyBlock(blockposition1)) {
|
||||
+ // Paper start - Don't load chunks
|
||||
+ final net.minecraft.world.level.block.state.BlockState blockState = Vex.this.level().getBlockStateIfLoaded(blockposition1);
|
||||
+ if (blockState != null && blockState.isAir()) {
|
||||
+ // Paper end - Don't load chunks
|
||||
Vex.this.moveControl.setWantedPosition((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.5D, (double) blockposition1.getZ() + 0.5D, 0.25D);
|
||||
if (Vex.this.getTarget() == null) {
|
||||
Vex.this.getLookControl().setLookAt((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.5D, (double) blockposition1.getZ() + 0.5D, 180.0F, 20.0F);
|
||||
@@ -381,7 +384,7 @@
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
|
Loading…
Reference in New Issue
Block a user