Skip to content

Commit 5fd6ba3

Browse files
feat: Aggressive world borders
1 parent d068832 commit 5fd6ba3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/net/modfest/fireblanket/mixin/entity_ticking/MixinLivingEntity.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,11 @@ public MixinLivingEntity(EntityType<?> type, World world) {
4343
public void setNoMovement(boolean noMovement) {
4444
this.fireblanket$movementless = noMovement;
4545
}
46+
47+
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/border/WorldBorder;getDamagePerBlock()D"), method = "baseTick")
48+
private void doNotLeaveTheWorldBorderPlease(CallbackInfo ci, @Local ServerWorld serverWorld) {
49+
this.kill(serverWorld);
50+
this.setVelocity(Vec3d.ZERO);
51+
this.scheduleVelocityUpdate();
52+
}
4653
}

0 commit comments

Comments
 (0)