mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Fixed model setting and client synchronisation
This commit is contained in:
1 parent
34cc0fecdf
commit
ed3028561b
2 files changed
+11
-2
No files matched your search
@@ -36,7 +36,15 @@ public class BlockScriptedWrapper extends ScriptBlock implements IBlockScripted{
|
||||
tile.setItemModel(null, null);
|
||||
else{
|
||||
Block block = Block.getBlockFromName(name);
|
||||
tile.setItemModel(new ItemStack(Item.getItemFromBlock(block)), block);
|
||||
if(block!=null) {
|
||||
tile.setItemModel(new ItemStack(Item.getItemFromBlock(block)), block);
|
||||
}else{
|
||||
if(Item.itemRegistry.containsKey(name)) {
|
||||
tile.setItemModel(new ItemStack((Item) Item.itemRegistry.getObject(name)), null);
|
||||
}else{
|
||||
tile.setItemModel(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user