mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2025-01-06 22:07:37 +00:00
more
This commit is contained in:
parent
3fa66587c3
commit
4818054bee
@ -414,10 +414,10 @@ index 0000000000000000000000000000000000000000..8cd2848aa6b06c5efbe797ed2d75ff4b
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||||
index ec268189b19b6fa5c4521f96ce211a531db35ec5..343cb72710ef100cf7e4de1e081cfdc2744aab46 100644
|
index 7573c12a77797146c51ef2dfe4b2a636df45e21a..90d9c9cbf730df6ec1800a611fd9103418cce607 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Main.java
|
--- a/src/main/java/net/minecraft/server/Main.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||||
@@ -144,6 +144,7 @@ public class Main {
|
@@ -141,6 +141,7 @@ public class Main {
|
||||||
// Paper start - load config files for access below if needed
|
// Paper start - load config files for access below if needed
|
||||||
org.bukkit.configuration.file.YamlConfiguration bukkitConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("bukkit-settings"));
|
org.bukkit.configuration.file.YamlConfiguration bukkitConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("bukkit-settings"));
|
||||||
org.bukkit.configuration.file.YamlConfiguration spigotConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("spigot-settings"));
|
org.bukkit.configuration.file.YamlConfiguration spigotConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("spigot-settings"));
|
||||||
@ -426,7 +426,7 @@ index ec268189b19b6fa5c4521f96ce211a531db35ec5..343cb72710ef100cf7e4de1e081cfdc2
|
|||||||
|
|
||||||
if (optionset.has("initSettings")) { // CraftBukkit
|
if (optionset.has("initSettings")) { // CraftBukkit
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 1c9742ad81f04052d2c3bc18c7636f45b2fc5160..e2cb86f0323d91fa10ecf6cdf1db2e28405798a8 100644
|
index 58536aabf607015939a1326f80207c0a06eed8ff..34a8c36d88eb17b7574b6766f5e14ef926ec9080 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -222,6 +222,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -222,6 +222,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
@ -447,10 +447,10 @@ index 1c9742ad81f04052d2c3bc18c7636f45b2fc5160..e2cb86f0323d91fa10ecf6cdf1db2e28
|
|||||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||||
this.setMotd(dedicatedserverproperties.motd);
|
this.setMotd(dedicatedserverproperties.motd);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 903df63725faeaa160609edddf9f5c54144945e6..058780b420c9207119f4bb889f602bd94199d7fb 100644
|
index e2743447131111146c28bb4d43e469b58f9af8b9..63b2cbe77b92b91b35fb9f318f96c8c2a4b28496 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1040,6 +1040,7 @@ public final class CraftServer implements Server {
|
@@ -1035,6 +1035,7 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||||
@ -458,7 +458,7 @@ index 903df63725faeaa160609edddf9f5c54144945e6..058780b420c9207119f4bb889f602bd9
|
|||||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||||
for (ServerLevel world : this.console.getAllLevels()) {
|
for (ServerLevel world : this.console.getAllLevels()) {
|
||||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||||
@@ -1071,6 +1072,7 @@ public final class CraftServer implements Server {
|
@@ -1066,6 +1067,7 @@ public final class CraftServer implements Server {
|
||||||
this.reloadData();
|
this.reloadData();
|
||||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||||
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
||||||
@ -466,7 +466,7 @@ index 903df63725faeaa160609edddf9f5c54144945e6..058780b420c9207119f4bb889f602bd9
|
|||||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||||
|
|
||||||
@@ -2978,6 +2980,14 @@ public final class CraftServer implements Server {
|
@@ -3010,6 +3012,14 @@ public final class CraftServer implements Server {
|
||||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,7 +482,7 @@ index 903df63725faeaa160609edddf9f5c54144945e6..058780b420c9207119f4bb889f602bd9
|
|||||||
public void restart() {
|
public void restart() {
|
||||||
org.spigotmc.RestartCommand.restart();
|
org.spigotmc.RestartCommand.restart();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 54891c5d7ca19a4fdab74a8729814a6fecee3fda..05db4799fddfbd8045c967520db99a75ba807697 100644
|
index 924bac84a56d7488251f3288d40b3647b436f2de..d7ab73f4bbf8c3ea288a1a42f810811582d5b35d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -181,6 +181,20 @@ public class Main {
|
@@ -181,6 +181,20 @@ public class Main {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent attributes with invalid namespaces from being applied
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index ed6e5060901c348c4f56a573c23e2000d8f2fb72..5cdf1e6fcdc9e2bd821f40ec9bf95cf03f03179a 100644
|
index 1b5cb36430ea8cb16491c92184051005453ee297..6292c6726a5ccf420cc81fdfa6b22a6d7a69b2b9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -46,6 +46,7 @@ import net.minecraft.nbt.NbtIo;
|
@@ -47,6 +47,7 @@ import net.minecraft.nbt.NbtIo;
|
||||||
import net.minecraft.nbt.StringTag;
|
import net.minecraft.nbt.StringTag;
|
||||||
import net.minecraft.nbt.Tag;
|
import net.minecraft.nbt.Tag;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
@ -17,7 +17,7 @@ index ed6e5060901c348c4f56a573c23e2000d8f2fb72..5cdf1e6fcdc9e2bd821f40ec9bf95cf0
|
|||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import org.apache.commons.lang3.EnumUtils;
|
import org.apache.commons.lang3.EnumUtils;
|
||||||
@@ -487,7 +488,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -488,7 +489,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
|
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
|
||||||
|
|
||||||
String attributeName = CraftAttributeMap.convertIfNeeded(entry.getString(CraftMetaItem.ATTRIBUTES_IDENTIFIER.NBT)); // Paper
|
String attributeName = CraftAttributeMap.convertIfNeeded(entry.getString(CraftMetaItem.ATTRIBUTES_IDENTIFIER.NBT)); // Paper
|
@ -1,38 +1,39 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Video <videogamesm12@gmail.com>
|
From: Telesphoreo <me@telesphoreo.me>
|
||||||
Date: Sat, 9 Apr 2022 13:00:27 -0600
|
Date: Sun, 10 Dec 2023 17:39:52 -0600
|
||||||
Subject: [PATCH] Don't query player data in the `nbt` component
|
Subject: [PATCH] Don't query player data in the `nbt` component
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java b/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java
|
diff --git a/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java b/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java
|
||||||
index 8a6799b50062c1b7b141ee1568dc523f9ee7ecfd..80e7b0889235288b60d813a569daecb7e08e108e 100644
|
index 3bec895fecb3521653fb0b88d4a4854fd3766b46..5fd278ac13c02b9d511be22dba9719cb0cb0e17b 100644
|
||||||
--- a/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java
|
--- a/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java
|
||||||
+++ b/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java
|
+++ b/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -8,12 +8,15 @@ import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||||
package net.minecraft.network.chat.contents;
|
|
||||||
|
|
||||||
+import me.totalfreedom.scissors.ScissorsConfig; // Scissors
|
|
||||||
import com.mojang.brigadier.StringReader;
|
|
||||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -11,6 +12,7 @@ import net.minecraft.commands.arguments.selector.EntitySelector;
|
import java.util.stream.Stream;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
+
|
||||||
|
+import me.totalfreedom.scissors.ScissorsConfig;
|
||||||
|
import net.minecraft.advancements.critereon.NbtPredicate;
|
||||||
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
|
import net.minecraft.commands.arguments.selector.EntitySelector;
|
||||||
import net.minecraft.commands.arguments.selector.EntitySelectorParser;
|
import net.minecraft.commands.arguments.selector.EntitySelectorParser;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
+import net.minecraft.world.entity.player.Player; // Scissors
|
+import net.minecraft.world.entity.player.Player;
|
||||||
|
|
||||||
public record EntityDataSource(String selectorPattern, @Nullable EntitySelector compiledSelector) implements DataSource {
|
public record EntityDataSource(String selectorPattern, @Nullable EntitySelector compiledSelector) implements DataSource {
|
||||||
public EntityDataSource(String rawPath) {
|
public static final MapCodec<EntityDataSource> SUB_CODEC = RecordCodecBuilder.mapCodec((instance) -> {
|
||||||
@@ -31,7 +33,11 @@ public record EntityDataSource(String selectorPattern, @Nullable EntitySelector
|
@@ -39,7 +42,11 @@ public record EntityDataSource(String selectorPattern, @Nullable EntitySelector
|
||||||
public Stream<CompoundTag> getData(CommandSourceStack source) throws CommandSyntaxException {
|
public Stream<CompoundTag> getData(CommandSourceStack source) throws CommandSyntaxException {
|
||||||
if (this.compiledSelector != null) {
|
if (this.compiledSelector != null) {
|
||||||
List<? extends Entity> list = this.compiledSelector.findEntities(source);
|
List<? extends Entity> list = this.compiledSelector.findEntities(source);
|
||||||
- return list.stream().map(NbtPredicate::getEntityTagToCompare);
|
- return list.stream().map(NbtPredicate::getEntityTagToCompare);
|
||||||
+ // Scissors start
|
+ // Scissors start
|
||||||
+ Stream<? extends Entity> stream = list.stream();
|
+ Stream<? extends Entity> stream = list.stream();
|
||||||
+ if (ScissorsConfig.excludePlayersFromNbtComponents) stream = stream.filter((entity) -> !(entity instanceof Player));
|
+ if (ScissorsConfig.excludePlayersFromNbtComponents) stream = stream.filter((entity) -> !(entity instanceof Player));
|
||||||
+ return stream.map(NbtPredicate::getEntityTagToCompare);
|
+ return stream.map(NbtPredicate::getEntityTagToCompare);
|
||||||
+ // Scissors end
|
+ // Scissors end
|
||||||
} else {
|
} else {
|
||||||
return Stream.empty();
|
return Stream.empty();
|
||||||
}
|
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix negative death times
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index b95f88d5e5b4785ee063695fd81935636a0588d1..168b002377e258f84a3bb86dd8e4a5f42060e3e0 100644
|
index 45b1a182acf6b2aef40b714d31ca125d8f74619a..5a11c89e10a9214fddc37f57c9b937494da19c9c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -629,7 +629,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -628,7 +628,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
protected void tickDeath() {
|
protected void tickDeath() {
|
||||||
++this.deathTime;
|
++this.deathTime;
|
@ -6,7 +6,7 @@ Subject: [PATCH] Limit amount of vehicle collision checks to 3 and discard
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||||
index 44a6118d3bd67a95180f750c17967561946e2e87..8aece67eba8d6b558bc2441b8b8e599f86e12e4f 100644
|
index 48b1cddfca671ac8bcb93a1b60518a4ee9e977e2..48a1b0cd306f3c23d7d4049dfa6a2c1be7b5a05f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||||
@@ -8,6 +8,7 @@ import com.mojang.datafixers.util.Pair;
|
@@ -8,6 +8,7 @@ import com.mojang.datafixers.util.Pair;
|
||||||
@ -17,7 +17,7 @@ index 44a6118d3bd67a95180f750c17967561946e2e87..8aece67eba8d6b558bc2441b8b8e599f
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import net.minecraft.BlockUtil;
|
import net.minecraft.BlockUtil;
|
||||||
import net.minecraft.Util;
|
import net.minecraft.Util;
|
||||||
@@ -111,6 +112,7 @@ public abstract class AbstractMinecart extends Entity {
|
@@ -104,6 +105,7 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||||
private double flyingX = 0.949999988079071D; // Paper - restore vanilla precision
|
private double flyingX = 0.949999988079071D; // Paper - restore vanilla precision
|
||||||
private double flyingY = 0.949999988079071D; // Paper - restore vanilla precision
|
private double flyingY = 0.949999988079071D; // Paper - restore vanilla precision
|
||||||
private double flyingZ = 0.949999988079071D; // Paper - restore vanilla precision
|
private double flyingZ = 0.949999988079071D; // Paper - restore vanilla precision
|
||||||
@ -25,7 +25,7 @@ index 44a6118d3bd67a95180f750c17967561946e2e87..8aece67eba8d6b558bc2441b8b8e599f
|
|||||||
public double maxSpeed = 0.4D;
|
public double maxSpeed = 0.4D;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -432,8 +434,8 @@ public abstract class AbstractMinecart extends Entity {
|
@@ -384,8 +386,8 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||||
if (this.getMinecartType() == AbstractMinecart.Type.RIDEABLE && this.getDeltaMovement().horizontalDistanceSqr() > 0.01D) {
|
if (this.getMinecartType() == AbstractMinecart.Type.RIDEABLE && this.getDeltaMovement().horizontalDistanceSqr() > 0.01D) {
|
||||||
List<Entity> list = this.level().getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D), EntitySelector.pushableBy(this));
|
List<Entity> list = this.level().getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D), EntitySelector.pushableBy(this));
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ index 44a6118d3bd67a95180f750c17967561946e2e87..8aece67eba8d6b558bc2441b8b8e599f
|
|||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
@@ -462,6 +464,14 @@ public abstract class AbstractMinecart extends Entity {
|
@@ -414,6 +416,14 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||||
entity.push(this);
|
entity.push(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@ index 44a6118d3bd67a95180f750c17967561946e2e87..8aece67eba8d6b558bc2441b8b8e599f
|
|||||||
} else {
|
} else {
|
||||||
Iterator iterator1 = this.level().getEntities(this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D)).iterator();
|
Iterator iterator1 = this.level().getEntities(this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D)).iterator();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||||
index 5c07da62c82bc70138f6cb5007629d6974be69ac..301a72dffd4ac58333d987e85d22136498d2d82a 100644
|
index c041c0b81be41cfd128c2f5ba56a5329d50b2efc..7dcbdcb30d264cf76fd975489918509e6e589127 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||||
@@ -5,6 +5,7 @@ import com.google.common.collect.UnmodifiableIterator;
|
@@ -5,6 +5,7 @@ import com.google.common.collect.UnmodifiableIterator;
|
||||||
@ -63,7 +63,7 @@ index 5c07da62c82bc70138f6cb5007629d6974be69ac..301a72dffd4ac58333d987e85d221364
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import net.minecraft.BlockUtil;
|
import net.minecraft.BlockUtil;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
@@ -112,6 +113,7 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
|
@@ -108,6 +109,7 @@ public class Boat extends VehicleEntity implements VariantHolder<Boat.Type> {
|
||||||
public double unoccupiedDeceleration = -1;
|
public double unoccupiedDeceleration = -1;
|
||||||
public boolean landBoats = false;
|
public boolean landBoats = false;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -71,7 +71,7 @@ index 5c07da62c82bc70138f6cb5007629d6974be69ac..301a72dffd4ac58333d987e85d221364
|
|||||||
|
|
||||||
public Boat(EntityType<? extends Boat> type, Level world) {
|
public Boat(EntityType<? extends Boat> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
@@ -465,9 +467,9 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
|
@@ -408,9 +410,9 @@ public class Boat extends VehicleEntity implements VariantHolder<Boat.Type> {
|
||||||
this.checkInsideBlocks();
|
this.checkInsideBlocks();
|
||||||
List<Entity> list = this.level().getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, -0.009999999776482582D, 0.20000000298023224D), EntitySelector.pushableBy(this));
|
List<Entity> list = this.level().getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, -0.009999999776482582D, 0.20000000298023224D), EntitySelector.pushableBy(this));
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ index 5c07da62c82bc70138f6cb5007629d6974be69ac..301a72dffd4ac58333d987e85d221364
|
|||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
@@ -480,6 +482,14 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
|
@@ -423,6 +425,14 @@ public class Boat extends VehicleEntity implements VariantHolder<Boat.Type> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -59,10 +59,10 @@ index 4092c7a8c2b0d9d26e6f4d97386735236300d132..04c47cf1a920ae6c356449df801227ee
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index d0f7baa80cb7d0883304abe2ed990c258a0d92b6..bedd53797391005d70dcdd61c5ed6d56a32fee5c 100644
|
index de277d61b718fe07a87d75a2547bb1c7f8553aa1..e2dbfe581717cc107d89206c1ba46014a6965693 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -21,6 +21,7 @@ import java.util.function.Predicate;
|
@@ -23,6 +23,7 @@ import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
@ -70,7 +70,7 @@ index d0f7baa80cb7d0883304abe2ed990c258a0d92b6..bedd53797391005d70dcdd61c5ed6d56
|
|||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.Util;
|
import net.minecraft.Util;
|
||||||
import net.minecraft.advancements.CriteriaTriggers;
|
import net.minecraft.advancements.CriteriaTriggers;
|
||||||
@@ -254,6 +255,12 @@ public final class ItemStack {
|
@@ -277,6 +278,12 @@ public final class ItemStack {
|
||||||
|
|
||||||
// CraftBukkit - break into own method
|
// CraftBukkit - break into own method
|
||||||
private void load(CompoundTag nbttagcompound) {
|
private void load(CompoundTag nbttagcompound) {
|
||||||
@ -83,7 +83,7 @@ index d0f7baa80cb7d0883304abe2ed990c258a0d92b6..bedd53797391005d70dcdd61c5ed6d56
|
|||||||
this.item = (Item) BuiltInRegistries.ITEM.get(new ResourceLocation(nbttagcompound.getString("id")));
|
this.item = (Item) BuiltInRegistries.ITEM.get(new ResourceLocation(nbttagcompound.getString("id")));
|
||||||
this.count = nbttagcompound.getByte("Count");
|
this.count = nbttagcompound.getByte("Count");
|
||||||
if (nbttagcompound.contains("tag", 10)) {
|
if (nbttagcompound.contains("tag", 10)) {
|
||||||
@@ -563,7 +570,11 @@ public final class ItemStack {
|
@@ -584,7 +591,11 @@ public final class ItemStack {
|
||||||
nbt.putString("id", minecraftkey == null ? "minecraft:air" : minecraftkey.toString());
|
nbt.putString("id", minecraftkey == null ? "minecraft:air" : minecraftkey.toString());
|
||||||
nbt.putByte("Count", (byte) this.count);
|
nbt.putByte("Count", (byte) this.count);
|
||||||
if (this.tag != null) {
|
if (this.tag != null) {
|
||||||
@ -96,7 +96,7 @@ index d0f7baa80cb7d0883304abe2ed990c258a0d92b6..bedd53797391005d70dcdd61c5ed6d56
|
|||||||
}
|
}
|
||||||
|
|
||||||
return nbt;
|
return nbt;
|
||||||
@@ -893,6 +904,7 @@ public final class ItemStack {
|
@@ -918,6 +929,7 @@ public final class ItemStack {
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
public void setTag(@Nullable CompoundTag nbt) {
|
public void setTag(@Nullable CompoundTag nbt) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't log invalid teams to console
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 168b002377e258f84a3bb86dd8e4a5f42060e3e0..065d2c1543832190bd8bdcd4b553542115c07e64 100644
|
index 5a11c89e10a9214fddc37f57c9b937494da19c9c..cb6319c539542b5391532cadb71310532a72c2c9 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -861,7 +861,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -860,7 +860,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
boolean flag = scoreboardteam != null && this.level().getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam);
|
boolean flag = scoreboardteam != null && this.level().getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam);
|
||||||
|
|
||||||
if (!flag) {
|
if (!flag) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fixes out of bounds HangingEntity crash exploit
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||||
index 66cf0a6cd1525ecf2615809210a26d55f445d07d..74fb79d4ea11f88f2c0de65b492a5fecc49684f1 100644
|
index 5f4c42c4ba44923cabb873bfad33abc2b1362e73..6608c98d1a517c307e16669e536dda6eb9f1e082 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||||
@@ -270,6 +270,13 @@ public abstract class HangingEntity extends Entity {
|
@@ -279,6 +279,13 @@ public abstract class HangingEntity extends Entity {
|
||||||
public void readAdditionalSaveData(CompoundTag nbt) {
|
public void readAdditionalSaveData(CompoundTag nbt) {
|
||||||
BlockPos blockposition = new BlockPos(nbt.getInt("TileX"), nbt.getInt("TileY"), nbt.getInt("TileZ"));
|
BlockPos blockposition = new BlockPos(nbt.getInt("TileX"), nbt.getInt("TileY"), nbt.getInt("TileZ"));
|
||||||
|
|
@ -1,35 +1,35 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Allink <arclicious@vivaldi.net>
|
From: Telesphoreo <me@telesphoreo.me>
|
||||||
Date: Mon, 4 Jul 2022 22:12:19 +0100
|
Date: Sun, 10 Dec 2023 18:11:55 -0600
|
||||||
Subject: [PATCH] Add MasterBlockFireEvent
|
Subject: [PATCH] Add MasterBlockFireEvent
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/CommandBlock.java b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/CommandBlock.java b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
||||||
index 2e7c03b00bc941b86df6a7f1b2b188c9f0aede22..0ae03d3934ad7b2b38afa45a65c7753dcbe796d2 100644
|
index 7ef14e4441a329c680a5dfe4bfb5033ffcb8f9d5..eff5bdf00b0aa7a9925ff59a62ead72509dc67b8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -4,6 +4,7 @@ import com.mojang.logging.LogUtils;
|
||||||
package net.minecraft.world.level.block;
|
import com.mojang.serialization.Codec;
|
||||||
|
import com.mojang.serialization.MapCodec;
|
||||||
+import me.totalfreedom.scissors.event.block.MasterBlockFireEvent; // Scissors
|
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
||||||
import com.mojang.logging.LogUtils;
|
+import me.totalfreedom.scissors.event.block.MasterBlockFireEvent;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
@@ -25,6 +26,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
@@ -28,6 +29,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
||||||
import net.minecraft.world.phys.BlockHitResult;
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
+import org.bukkit.Location; // Scissors
|
+import org.bukkit.Location;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
||||||
@@ -117,6 +119,15 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock {
|
@@ -130,6 +132,14 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void execute(BlockState state, Level world, BlockPos pos, BaseCommandBlock executor, boolean hasCommand) {
|
private void execute(BlockState state, Level world, BlockPos pos, BaseCommandBlock executor, boolean hasCommand) {
|
||||||
+ // Scissors start - Add master block fire event
|
+ // Scissors start - Add master block fire event
|
||||||
+ final MasterBlockFireEvent event = new MasterBlockFireEvent(new Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ()));
|
+ final MasterBlockFireEvent event = new MasterBlockFireEvent(new Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ()));
|
||||||
+
|
|
||||||
+ if (!event.callEvent())
|
+ if (!event.callEvent())
|
||||||
+ {
|
+ {
|
||||||
+ return;
|
+ return;
|
||||||
@ -40,26 +40,27 @@ index 2e7c03b00bc941b86df6a7f1b2b188c9f0aede22..0ae03d3934ad7b2b38afa45a65c7753d
|
|||||||
executor.performCommand(world);
|
executor.performCommand(world);
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
|
||||||
index 182e16c1d968707a11329150d71b7d01df6c6e52..8582a9369cffe0eebeb82a81fc413d0bf4ad28ed 100644
|
index 3a210e138b6ae065fd32e1b1e0e49999e20c4667..183c47a6fbf5201c38d5eb182049643862ca0964 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
|
||||||
@@ -2,6 +2,7 @@ package net.minecraft.world.level.block.entity;
|
@@ -2,6 +2,8 @@ package net.minecraft.world.level.block.entity;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
+import me.totalfreedom.scissors.event.block.MasterBlockFireEvent; // Scissors
|
+
|
||||||
|
+import me.totalfreedom.scissors.event.block.MasterBlockFireEvent;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Holder;
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
@@ -17,6 +18,7 @@ import net.minecraft.world.level.block.JigsawBlock;
|
@@ -17,6 +19,7 @@ import net.minecraft.world.level.block.JigsawBlock;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.levelgen.structure.pools.JigsawPlacement;
|
import net.minecraft.world.level.levelgen.structure.pools.JigsawPlacement;
|
||||||
import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
|
import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
|
||||||
+import org.bukkit.Location; // Scissors
|
+import org.bukkit.Location;
|
||||||
|
|
||||||
public class JigsawBlockEntity extends BlockEntity {
|
public class JigsawBlockEntity extends BlockEntity {
|
||||||
public static final String TARGET = "target";
|
public static final String TARGET = "target";
|
||||||
@@ -107,6 +109,16 @@ public class JigsawBlockEntity extends BlockEntity {
|
@@ -131,6 +134,16 @@ public class JigsawBlockEntity extends BlockEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void generate(ServerLevel world, int maxDepth, boolean keepJigsaws) {
|
public void generate(ServerLevel world, int maxDepth, boolean keepJigsaws) {
|
||||||
@ -77,26 +78,27 @@ index 182e16c1d968707a11329150d71b7d01df6c6e52..8582a9369cffe0eebeb82a81fc413d0b
|
|||||||
Registry<StructureTemplatePool> registry = world.registryAccess().registryOrThrow(Registries.TEMPLATE_POOL);
|
Registry<StructureTemplatePool> registry = world.registryAccess().registryOrThrow(Registries.TEMPLATE_POOL);
|
||||||
// Paper start - Replace getHolderOrThrow with a null check
|
// Paper start - Replace getHolderOrThrow with a null check
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
|
||||||
index e8ecced687261861953899a3bea162dbc03977b4..30720203173b23ccdbb0789f7e2adbbe180c7c69 100644
|
index 60c941bd67dc899ea923f8ee49412de01ce199db..9bcd07f8b5d266c39034e5c021da9ffb7262b474 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
|
||||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
@@ -5,6 +5,8 @@ import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
+import me.totalfreedom.scissors.event.block.MasterBlockFireEvent; // Scissors
|
+
|
||||||
|
+import me.totalfreedom.scissors.event.block.MasterBlockFireEvent;
|
||||||
import net.minecraft.ResourceLocationException;
|
import net.minecraft.ResourceLocationException;
|
||||||
import net.minecraft.Util;
|
import net.minecraft.Util;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
@@ -29,6 +30,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.BlockRotProce
|
@@ -29,6 +31,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.BlockRotProce
|
||||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
|
import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
|
||||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
||||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
|
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
|
||||||
+import org.bukkit.Location; // Scissors
|
+import org.bukkit.Location;
|
||||||
|
|
||||||
public class StructureBlockEntity extends BlockEntity {
|
public class StructureBlockEntity extends BlockEntity {
|
||||||
private static final int SCAN_CORNER_BLOCKS_RANGE = 5;
|
private static final int SCAN_CORNER_BLOCKS_RANGE = 5;
|
||||||
@@ -264,7 +266,7 @@ public class StructureBlockEntity extends BlockEntity {
|
@@ -261,7 +264,7 @@ public class StructureBlockEntity extends BlockEntity {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
BlockPos blockPos = this.getBlockPos();
|
BlockPos blockPos = this.getBlockPos();
|
||||||
@ -105,10 +107,10 @@ index e8ecced687261861953899a3bea162dbc03977b4..30720203173b23ccdbb0789f7e2adbbe
|
|||||||
BlockPos blockPos2 = new BlockPos(blockPos.getX() - 80, this.level.getMinBuildHeight(), blockPos.getZ() - 80);
|
BlockPos blockPos2 = new BlockPos(blockPos.getX() - 80, this.level.getMinBuildHeight(), blockPos.getZ() - 80);
|
||||||
BlockPos blockPos3 = new BlockPos(blockPos.getX() + 80, this.level.getMaxBuildHeight() - 1, blockPos.getZ() + 80);
|
BlockPos blockPos3 = new BlockPos(blockPos.getX() + 80, this.level.getMaxBuildHeight() - 1, blockPos.getZ() + 80);
|
||||||
Stream<BlockPos> stream = this.getRelatedCorners(blockPos2, blockPos3);
|
Stream<BlockPos> stream = this.getRelatedCorners(blockPos2, blockPos3);
|
||||||
@@ -321,6 +323,16 @@ public class StructureBlockEntity extends BlockEntity {
|
@@ -320,6 +323,16 @@ public class StructureBlockEntity extends BlockEntity {
|
||||||
|
if (this.structureName == null) {
|
||||||
public boolean saveStructure(boolean interactive) {
|
return false;
|
||||||
if (this.mode == StructureMode.SAVE && !this.level.isClientSide && this.structureName != null) {
|
} else {
|
||||||
+ // Scissors start - Add master block fire event
|
+ // Scissors start - Add master block fire event
|
||||||
+ final BlockPos pos = this.getBlockPos();
|
+ final BlockPos pos = this.getBlockPos();
|
||||||
+ final MasterBlockFireEvent event = new MasterBlockFireEvent(new Location(this.getLevel().getWorld(), pos.getX(), pos.getY(), pos.getZ()));
|
+ final MasterBlockFireEvent event = new MasterBlockFireEvent(new Location(this.getLevel().getWorld(), pos.getX(), pos.getY(), pos.getZ()));
|
||||||
@ -122,10 +124,10 @@ index e8ecced687261861953899a3bea162dbc03977b4..30720203173b23ccdbb0789f7e2adbbe
|
|||||||
BlockPos blockPos = this.getBlockPos().offset(this.structurePos);
|
BlockPos blockPos = this.getBlockPos().offset(this.structurePos);
|
||||||
ServerLevel serverLevel = (ServerLevel)this.level;
|
ServerLevel serverLevel = (ServerLevel)this.level;
|
||||||
StructureTemplateManager structureTemplateManager = serverLevel.getStructureManager();
|
StructureTemplateManager structureTemplateManager = serverLevel.getStructureManager();
|
||||||
@@ -358,6 +370,16 @@ public class StructureBlockEntity extends BlockEntity {
|
@@ -371,6 +384,16 @@ public class StructureBlockEntity extends BlockEntity {
|
||||||
|
if (structureTemplate == null) {
|
||||||
public boolean loadStructure(ServerLevel world, boolean interactive) {
|
return false;
|
||||||
if (this.mode == StructureMode.LOAD && this.structureName != null) {
|
} else {
|
||||||
+ // Scissors start - Add master block fire event
|
+ // Scissors start - Add master block fire event
|
||||||
+ final BlockPos blockPos = this.getBlockPos();
|
+ final BlockPos blockPos = this.getBlockPos();
|
||||||
+ final MasterBlockFireEvent event = new MasterBlockFireEvent(new Location(this.getLevel().getWorld(), blockPos.getX(), blockPos.getY(), blockPos.getZ()));
|
+ final MasterBlockFireEvent event = new MasterBlockFireEvent(new Location(this.getLevel().getWorld(), blockPos.getX(), blockPos.getY(), blockPos.getZ()));
|
||||||
@ -136,10 +138,10 @@ index e8ecced687261861953899a3bea162dbc03977b4..30720203173b23ccdbb0789f7e2adbbe
|
|||||||
+ }
|
+ }
|
||||||
+ // Scissors end
|
+ // Scissors end
|
||||||
+
|
+
|
||||||
StructureTemplateManager structureTemplateManager = world.getStructureManager();
|
this.loadStructureInfo(structureTemplate);
|
||||||
|
return true;
|
||||||
Optional<StructureTemplate> optional;
|
}
|
||||||
@@ -403,6 +425,16 @@ public class StructureBlockEntity extends BlockEntity {
|
@@ -407,6 +430,15 @@ public class StructureBlockEntity extends BlockEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unloadStructure() {
|
public void unloadStructure() {
|
||||||
@ -152,7 +154,6 @@ index e8ecced687261861953899a3bea162dbc03977b4..30720203173b23ccdbb0789f7e2adbbe
|
|||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Scissors end
|
+ // Scissors end
|
||||||
+
|
|
||||||
if (this.structureName != null) {
|
if (this.structureName != null) {
|
||||||
ServerLevel serverLevel = (ServerLevel)this.level;
|
ServerLevel serverLevel = (ServerLevel)this.level;
|
||||||
StructureTemplateManager structureTemplateManager = serverLevel.getStructureManager();
|
StructureTemplateManager structureTemplateManager = serverLevel.getStructureManager();
|
Loading…
Reference in New Issue
Block a user