Skip to content

Commit de332d9

Browse files
committed
Fix machine pick-block and en_us lang for tooltip
1 parent ad656de commit de332d9

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/main/java/com/robotgryphon/compactmachines/block/BlockCompactMachine.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,14 @@ public ItemStack getPickBlock(BlockState state, RayTraceResult target, IBlockRea
159159
Block given = CompactMachineUtil.getMachineBlockBySize(this.size);
160160
ItemStack stack = new ItemStack(given, 1);
161161

162-
CompoundNBT nbt = stack.getOrCreateTag();
162+
CompoundNBT nbt = stack.getOrCreateChildTag("cm");
163163
nbt.putString("size", this.size.getName());
164164

165165
CompactMachineTile tileEntity = (CompactMachineTile) world.getTileEntity(pos);
166166
if (tileEntity != null) {
167167
nbt.putInt("coords", tileEntity.machineId);
168168
}
169169

170-
stack.setTag(nbt);
171-
172170
return stack;
173171
}
174172

src/main/java/com/robotgryphon/compactmachines/item/ItemBlockMachine.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextC
4747
if (machineData.contains("coords")) {
4848
int coords = machineData.getInt("coords");
4949
if (coords > -1) {
50-
IFormattableTextComponent coordsTC = new TranslationTextComponent("tooltip.compactmachines.machine.coords")
51-
.append(new StringTextComponent(" #" + coords));
52-
50+
IFormattableTextComponent coordsTC = new TranslationTextComponent("tooltip.compactmachines.machine_id", coords);
5351
tooltip.add(coordsTC);
5452
}
5553
}

src/main/resources/assets/compactmachines/lang/en_us.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"itemGroup.compactmachines": "Compact Machines",
33

4-
"tooltip.compactmachines.machine_id": "Machine: %s",
4+
"tooltip.compactmachines.machine_id": "Machine ID: %s",
55
"tooltip.compactmachines.owner": "Owner: %s",
66
"tooltip.compactmachines.unknown_player": "Unknown Player",
77
"tooltip.compactmachines.machine.size": "Size: %1$sx%1$sx%1$s",

0 commit comments

Comments
 (0)