Expose furnace minecart push values

Adds methods for getting and setting a furnace minecart's push values
This commit is contained in:
EpicKnarvik97 2022-03-05 20:58:46 +01:00
parent 4a5a684c14
commit 70809f7640

View File

@ -27,6 +27,30 @@ public class CraftMinecartFurnace extends CraftMinecart implements PoweredMineca
this.getHandle().fuel = fuel;
}
// Paper start
@Override
public double getPushX() {
return getHandle().push.x;
}
@Override
public double getPushZ() {
return getHandle().push.z;
}
@Override
public void setPushX(double xPush) {
final net.minecraft.world.phys.Vec3 push = getHandle().push;
getHandle().push = new net.minecraft.world.phys.Vec3(xPush, push.y, push.z);
}
@Override
public void setPushZ(double zPush) {
final net.minecraft.world.phys.Vec3 push = getHandle().push;
getHandle().push = new net.minecraft.world.phys.Vec3(push.x, push.y, zPush);
}
// Paper end
@Override
public String toString() {
return "CraftMinecartFurnace";