Skip to content

Commit d1956b2

Browse files
committed
fix machines saving all traits to nbt on drop regardless of trait specification
1 parent f2246a2 commit d1956b2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/com/gregtechceu/gtceu/api/machine/MetaMachine.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ public void onMachineDestroyed() {
245245
*/
246246
public void modifyDrops(List<ItemStack> drops) {}
247247

248+
public void saveToItem(ItemStack stack, HolderLookup.Provider registries) {
249+
stack.applyComponents(this.collectComponents());
250+
}
251+
248252
/**
249253
* Applies item stack component data when this machine is placed.
250254
*

0 commit comments

Comments
 (0)