You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
event.blockList().forEach(block -> block.setType(Material.AIR)); // Setzt die zerstörten Blöcke auf Luft, um die Zerstörung durch Explosion zu simulieren
110
+
}
111
+
}
112
+
106
113
@EventHandler
107
114
publicvoidonMobDeath(EntityDeathEventevent) {
108
115
if (isLevelRandomizerActive) {
@@ -112,13 +119,15 @@ public void onMobDeath(EntityDeathEvent event) {
112
119
113
120
@EventHandler
114
121
publicvoidonChunkLoad(ChunkLoadEventevent) {
115
-
for (intx = 0; x < 16; x++) {
116
-
for (intz = 0; z < 16; z++) {
117
-
for (inty = 0; y < event.getWorld().getMaxHeight(); y++) {
118
-
Blockblock = event.getChunk().getBlock(x, y, z);
119
-
if (block.getType() == Material.CHEST) {
120
-
Chestchest = (Chest) block.getState();
121
-
chest.getInventory().clear();
122
+
if (isLevelRandomizerActive) {
123
+
for (intx = 0; x < 16; x++) {
124
+
for (intz = 0; z < 16; z++) {
125
+
for (inty = 0; y < event.getWorld().getMaxHeight(); y++) {
126
+
Blockblock = event.getChunk().getBlock(x, y, z);
127
+
if (block.getType() == Material.CHEST) {
128
+
Chestchest = (Chest) block.getState();
129
+
chest.getInventory().clear(); // Leere den Inhalt der generierten Truhe
0 commit comments