9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-28 11:19:08 +00:00

It compiles

This commit is contained in:
Samsuik
2025-01-17 11:47:26 +00:00
parent ca83d33506
commit 1a4ad041b5
12 changed files with 63 additions and 72 deletions

View File

@@ -12,8 +12,8 @@
}
public FallingBlockEntity(Level level, double x, double y, double z, BlockState state) {
@@ -138,6 +_,13 @@
return !this.isRemoved();
@@ -85,6 +_,13 @@
this.setStartPos(this.blockPosition());
}
+ // Sakura start - falling block height parity api
@@ -23,9 +23,9 @@
+ }
+ // Sakura end - falling block height parity api
+
@Override
protected double getDefaultGravity() {
return 0.04;
public static FallingBlockEntity fall(Level level, BlockPos pos, BlockState blockState) {
FallingBlockEntity fallingBlockEntity = new FallingBlockEntity(
level,
@@ -165,7 +_,7 @@
this.handlePortal();
if (this.level() instanceof ServerLevel serverLevel && (this.isAlive() || this.forceTickAfterTeleportToDuplicate)) {

View File

@@ -1,22 +1,18 @@
--- a/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/net/minecraft/world/entity/item/PrimedTnt.java
@@ -73,6 +_,12 @@
@@ -73,7 +_,28 @@
this.yo = y;
this.zo = z;
this.owner = owner;
- }
+ // Sakura start - configure cannon mechanics
+ switch (level.sakuraConfig().cannons.mechanics.tntSpread) {
+ case NONE -> this.setDeltaMovement(0.0, 0.0, 0.0);
+ case Y -> this.setDeltaMovement(this.getDeltaMovement().multiply(0.0, 1.0, 0.0));
+ }
+ // Sakura end - configure cannon mechanics
}
@Override
@@ -91,6 +_,21 @@
return !this.isRemoved();
}
+ }
+
+ // Sakura start - optimise tnt fluid state
+ @Override
+ protected boolean updateInWaterStateAndDoFluidPushing() {
@@ -31,10 +27,9 @@
+ }
+ }
+ // Sakura end - optimise tnt fluid state
+
@Override
protected double getDefaultGravity() {
return 0.04;
protected void defineSynchedData(SynchedEntityData.Builder builder) {
@@ -98,7 +_,7 @@
@Override