3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 04:50:06 +01:00
Dieser Commit ist enthalten in:
Space Walker 2022-07-13 23:20:26 +02:00 committet von GitHub
Ursprung e4f21e3178
Commit cd215af6eb
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -20,10 +20,10 @@ Just added Bukkit's event system and took a few liberties with dead code and com
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..3e709645f5c35d16beefa4328a0a8e9c95e632aa index 0000000000000000000000000000000000000000..22a2547810d0c029f29685faddf7ac21cde2df0b
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java +++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +1,954 @@ @@ -0,0 +1,957 @@
+package com.destroystokyo.paper.util; +package com.destroystokyo.paper.util;
+ +
+import java.util.List; +import java.util.List;
@ -959,6 +959,9 @@ index 0000000000000000000000000000000000000000..3e709645f5c35d16beefa4328a0a8e9c
+ * redstone wire in an invalid state. + * redstone wire in an invalid state.
+ */ + */
+ public void updateNeighborShapes(Level level, BlockPos pos, BlockState state) { + public void updateNeighborShapes(Level level, BlockPos pos, BlockState state) {
+ // these updates will be added to the stack and processed after the entire network has updated
+ state.updateIndirectNeighbourShapes(level, pos, Block.UPDATE_KNOWN_SHAPE | Block.UPDATE_CLIENTS);
+
+ for (Direction dir : UPDATE_SHAPE_ORDER) { + for (Direction dir : UPDATE_SHAPE_ORDER) {
+ BlockPos neighborPos = pos.relative(dir); + BlockPos neighborPos = pos.relative(dir);
+ BlockState neighborState = level.getBlockState(neighborPos); + BlockState neighborState = level.getBlockState(neighborPos);