mirror of
https://github.com/BX-Team/DivineMC.git
synced 2026-01-03 22:16:22 +00:00
and little more
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/server/commands/LocateCommand.java
|
||||
+++ b/net/minecraft/server/commands/LocateCommand.java
|
||||
@@ -200,8 +_,10 @@
|
||||
}
|
||||
|
||||
private static float dist(int x1, int z1, int x2, int z2) {
|
||||
- int i = x2 - x1;
|
||||
- int i1 = z2 - z1;
|
||||
- return Mth.sqrt(i * i + i1 * i1);
|
||||
+ // DivineMC start - Fix MC-177381
|
||||
+ double i = x2 - x1;
|
||||
+ double j = z2 - z1;
|
||||
+ return (float) Math.hypot(i, j);
|
||||
+ // DivineMC end
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2239,6 +_,7 @@
|
||||
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, gameMode.getId()));
|
||||
if (gameMode == GameType.SPECTATOR) {
|
||||
this.removeEntitiesOnShoulder();
|
||||
+ this.stopSleeping(); // DivineMC - Fix MC-119417
|
||||
this.stopRiding();
|
||||
EnchantmentHelper.stopLocationBasedEffects(this);
|
||||
} else {
|
||||
@@ -0,0 +1,21 @@
|
||||
--- a/net/minecraft/util/thread/BlockableEventLoop.java
|
||||
+++ b/net/minecraft/util/thread/BlockableEventLoop.java
|
||||
@@ -22,7 +_,7 @@
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public abstract class BlockableEventLoop<R extends Runnable> implements ProfilerMeasured, TaskScheduler<R>, Executor {
|
||||
- public static final long BLOCK_TIME_NANOS = 100000L;
|
||||
+ public static final long BLOCK_TIME_NANOS = 2000000L; // DivineMC - Fix MC-183518
|
||||
private final String name;
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private final Queue<R> pendingRunnables = Queues.newConcurrentLinkedQueue();
|
||||
@@ -146,8 +_,7 @@
|
||||
}
|
||||
|
||||
protected void waitForTasks() {
|
||||
- Thread.yield();
|
||||
- LockSupport.parkNanos("waiting for tasks", 100000L);
|
||||
+ LockSupport.parkNanos("waiting for tasks", 2000000L); // DivineMC - Fix MC-183518
|
||||
}
|
||||
|
||||
protected void doRunTask(R task) {
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/entity/monster/ZombieVillager.java
|
||||
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java
|
||||
@@ -313,6 +_,12 @@
|
||||
if (!this.isSilent()) {
|
||||
serverLevel.levelEvent(null, 1027, this.blockPosition(), 0);
|
||||
}
|
||||
+
|
||||
+ // DivineMC start - Fix MC-200418
|
||||
+ if (villager.isPassenger() && villager.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && villager.isBaby()) {
|
||||
+ villager.removeVehicle();
|
||||
+ }
|
||||
+ // DivineMC end - Fix MC-200418
|
||||
// CraftBukkit start
|
||||
}, org.bukkit.event.entity.EntityTransformEvent.TransformReason.CURED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CURED // CraftBukkit
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
@@ -99,6 +_,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // DivineMC start - tick minecart hopper without players
|
||||
+ @Override
|
||||
+ public void inactiveTick() {
|
||||
+ this.tick();
|
||||
+ }
|
||||
+ // DivineMC end - tick minecart hopper without players
|
||||
+
|
||||
public boolean suckInItems() {
|
||||
if (HopperBlockEntity.suckInItems(this.level(), this)) {
|
||||
this.immunize(); // Paper
|
||||
@@ -1,5 +1,17 @@
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -115,9 +_,9 @@
|
||||
public static final int TICKS_PER_DAY = 24000;
|
||||
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
||||
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
||||
- public final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList(); // Paper - public
|
||||
+ public final List<TickingBlockEntity> blockEntityTickers = new space.bxteam.divinemc.util.lithium.HashedReferenceList<>(Lists.newArrayList()); // Paper - public // DivineMC - lithium: hashed_list
|
||||
protected final NeighborUpdater neighborUpdater;
|
||||
- private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
||||
+ private final List<TickingBlockEntity> pendingBlockEntityTickers = new space.bxteam.divinemc.util.lithium.HashedReferenceList<>(Lists.newArrayList()); // DivineMC - lithium: hashed_list
|
||||
private boolean tickingBlockEntities;
|
||||
public final Thread thread;
|
||||
private final boolean isDebug;
|
||||
@@ -172,8 +_,6 @@
|
||||
public final io.papermc.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
||||
public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur - Purpur config files
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/world/level/block/Blocks.java
|
||||
+++ b/net/minecraft/world/level/block/Blocks.java
|
||||
@@ -6630,6 +_,7 @@
|
||||
.mapColor(MapColor.COLOR_ORANGE)
|
||||
.instrument(NoteBlockInstrument.BASEDRUM)
|
||||
.requiresCorrectToolForDrops()
|
||||
+ .sound(SoundType.COPPER) // DivineMC - Fix MC-223153
|
||||
.strength(5.0F, 6.0F)
|
||||
);
|
||||
public static final Block RAW_GOLD_BLOCK = register(
|
||||
Reference in New Issue
Block a user