mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix minecarts on rails not properly slowing down in water (#9033)
This commit is contained in:
1 parent
b0caea8e20
commit
ecd8f1e54d
1 file changed
+7
-22
@@ -110,7 +110,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -390,7 +_,8 @@
|
||||
@@ -390,18 +_,19 @@
|
||||
d1 = (double)p_38156_.m_123342_();
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
@@ -120,7 +120,11 @@
|
||||
flag = p_38157_.m_61143_(PoweredRailBlock.f_55215_);
|
||||
flag1 = !flag;
|
||||
}
|
||||
@@ -401,22 +_,22 @@
|
||||
|
||||
- double d3 = 0.0078125D;
|
||||
+ double d3 = getSlopeAdjustment();
|
||||
if (this.m_20069_()) {
|
||||
d3 *= 0.2D;
|
||||
}
|
||||
|
||||
Vec3 vec31 = this.m_20184_();
|
||||
@@ -128,26 +132,7 @@
|
||||
+ RailShape railshape = ((BaseRailBlock)p_38157_.m_60734_()).getRailDirection(p_38157_, this.f_19853_, p_38156_, this);
|
||||
switch (railshape) {
|
||||
case ASCENDING_EAST:
|
||||
- this.m_20256_(vec31.m_82520_(-d3, 0.0D, 0.0D));
|
||||
+ this.m_20256_(vec31.m_82520_(-1 * getSlopeAdjustment(), 0.0D, 0.0D));
|
||||
++d1;
|
||||
break;
|
||||
case ASCENDING_WEST:
|
||||
- this.m_20256_(vec31.m_82520_(d3, 0.0D, 0.0D));
|
||||
+ this.m_20256_(vec31.m_82520_(getSlopeAdjustment(), 0.0D, 0.0D));
|
||||
++d1;
|
||||
break;
|
||||
case ASCENDING_NORTH:
|
||||
- this.m_20256_(vec31.m_82520_(0.0D, 0.0D, d3));
|
||||
+ this.m_20256_(vec31.m_82520_(0.0D, 0.0D, getSlopeAdjustment()));
|
||||
++d1;
|
||||
break;
|
||||
case ASCENDING_SOUTH:
|
||||
- this.m_20256_(vec31.m_82520_(0.0D, 0.0D, -d3));
|
||||
+ this.m_20256_(vec31.m_82520_(0.0D, 0.0D, -1 * getSlopeAdjustment()));
|
||||
++d1;
|
||||
}
|
||||
|
||||
this.m_20256_(vec31.m_82520_(-d3, 0.0D, 0.0D));
|
||||
@@ -447,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user