mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-25 12:25:22 +01:00
fixed NPE
This commit is contained in:
parent
193281823e
commit
1e66320771
@ -4,7 +4,9 @@ public class IdlePacketExecutor {
|
||||
private static Runnable skipIdlePacketExecute;
|
||||
|
||||
public static void skipIdlePacket() {
|
||||
skipIdlePacketExecute.run();
|
||||
if (skipIdlePacketExecute != null) {
|
||||
skipIdlePacketExecute.run();
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerIdlePacketSkipExecute(final Runnable runnable) {
|
||||
|
@ -29,8 +29,9 @@ public class MixinSoulSandBlock extends Block {
|
||||
|
||||
@Override
|
||||
public float getVelocityMultiplier() {
|
||||
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_14_4))
|
||||
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(ProtocolVersion.v1_14_4)) {
|
||||
return 1.0F;
|
||||
}
|
||||
return super.getVelocityMultiplier();
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class ProtocolSelectionScreen extends Screen {
|
||||
protected void init() {
|
||||
super.init();
|
||||
|
||||
this.addDrawableChild(new SlotList(this.client, width, height, 3 + 3 /* start offset */ + (textRenderer.fontHeight + 2) * 3 /* title is 2 */, height + 5, textRenderer.fontHeight + 4));
|
||||
this.addDrawableChild(new SlotList(this.client, width, height, 3 + 3 /* start offset */ + (textRenderer.fontHeight + 2) * 3 /* title is 2 */, height + 5, textRenderer.fontHeight + 2));
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal("<-"), button -> this.close()).position(0, height - 20).size(20, 20).build());
|
||||
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal("Values"), button -> ValuesScreen.open(this)).position(0, 0).size(98, 20).build());
|
||||
|
Loading…
Reference in New Issue
Block a user