9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-21 15:59:26 +00:00

Added explosion proof items (#5)

* Added exposion proof items

* Remove getLevel and use level accessor instead

* Move items configuration section into entity

* Remove extra parentheses in condition

* Remove explosion proof configuration section

* Use an empty list instead of providing a default item

---------

Co-authored-by: Samsuik <40902469+Samsuik@users.noreply.github.com>
This commit is contained in:
Hermelijn15
2023-11-20 20:18:36 +01:00
committed by GitHub
parent 9bf210932a
commit 8240c182d2
4 changed files with 37 additions and 2 deletions

View File

@@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
Date: Sat, 18 Nov 2023 15:12:14 +0000
Subject: [PATCH] Add option to disable entity ai
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 956d05e2ae59978ea9623ca0e167c0afe0b87306..b6293f2f39520145abbd1bc5f8a4f6f762b19f00 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -896,7 +896,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
protected final void serverAiStep() {
++this.noActionTime;
// Paper start - Allow nerfed mobs to jump and float
- if (!this.aware) {
+ if (!this.aware || this.level().sakuraConfig().entity.disableMobAi) { // Sakura
if (goalFloat != null) {
if (goalFloat.canUse()) goalFloat.tick();
this.getJumpControl().tick();