Skip to content

Commit 8d5ffd7

Browse files
author
BastouP411
committed
Switched to 1.16.5, using official mappings. Part 2
1 parent f0a132f commit 8d5ffd7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/fr/bastoup/bperipherals/peripherals/database/TileDatabase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public CompoundNBT serializeNBT() {
128128
return nbt;
129129
}
130130

131-
131+
132132
@Override
133133
public void tick() {
134134
if (this.getLevel() == null)

src/main/java/fr/bastoup/bperipherals/peripherals/magcardreader/PeripheralMagCardReader.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import javax.annotation.Nonnull;
1111
import javax.annotation.Nullable;
1212
import java.nio.ByteBuffer;
13+
import java.util.Optional;
1314

1415
public class PeripheralMagCardReader extends BPeripheral {
1516

@@ -36,11 +37,11 @@ public boolean equals(@Nullable IPeripheral other) {
3637
}
3738

3839
@LuaFunction
39-
public final void write(ByteBuffer bytes, String label) throws LuaException {
40+
public final void write(ByteBuffer bytes, Optional<String> label) throws LuaException {
4041
byte[] data = Util.getByteBufferArray(bytes);
4142
if (data.length > Config.MAX_MAG_CARD_DATA)
4243
throw new LuaException("You can't put more than " + Config.MAX_MAG_CARD_DATA + " characters in a mag card.");
43-
getTile().writeCard(data, label);
44+
getTile().writeCard(data, label.orElse(null));
4445
}
4546

4647
@LuaFunction

0 commit comments

Comments
 (0)