Skip to content

Commit

Permalink
Serialize item & tab with id/index.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yesterday17 committed Jan 13, 2019
1 parent eeb50a9 commit 27e94cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: "maven"

version = "0.1.14"
version = "0.1.15"
group = "cn.yesterday17"
archivesBaseName = "probe"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public JsonElement serialize(Item src, Type typeOfSrc, JsonSerializationContext
item.addProperty("hasSubtypes", src.getHasSubtypes());
item.addProperty("canRepair", src.isRepairable());

item.add("containerItem", context.serialize(src.getContainerItem() == null ? null : src.getContainerItem().getRegistryName()));
item.add("tabToDisplayOn", context.serialize(src.getCreativeTab()));
item.addProperty("containerItem", src.getContainerItem() == null ? null : Item.getIdFromItem(src.getContainerItem()));
item.add("tabToDisplayOn", context.serialize(src.getCreativeTab() == null ? null : src.getCreativeTab().getTabIndex()));

return item;
}
Expand Down

0 comments on commit 27e94cd

Please sign in to comment.