Compare commits

..
2 Commits
Author SHA1 Message Date
Martin Robertz 4c619fd3b2 update 2025-10-01 18:48:17 +02:00
Glease 341fea50ba fix batched updates does not call window and machine packet listeners (#74) 2025-09-28 10:52:47 +02:00
2 changed files with 7 additions and 9 deletions

No files matched your search

+2 -2
View File
@@ -2,9 +2,9 @@
dependencies {
api('com.github.GTNewHorizons:ForestryMC:4.10.17:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.6.40:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.7.0:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.7.91-GTNH:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.0-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.44:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
@@ -76,14 +76,12 @@ public class TileEntityMetadata extends TileEntity {
}
public static ItemStack getItemStack(Block block, int damage) {
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("meta", damage);
ItemStack item = new ItemStack(block, 1, 0);
if (0 <= damage && damage < Short.MAX_VALUE) {
item.setItemDamage(damage);
} else {
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("meta", damage);
item.setTagCompound(tag);
}
item.setItemDamage(Math.min(damage, 16387));
item.setTagCompound(tag);
return item;
}