@@ -192,11 +192,7 @@ public void nbtChange(EntityPlayer player, int mode, EnumHand hand) {
192192 if (item .getTagCompound ().hasKey ("cache" )) {
193193 NBTTagList cache = item .getTagCompound ().getCompoundTag ("cache" ).getTagList (String .valueOf (mode ), 10 );
194194 if (cache .tagCount () != 0 ) {
195- if (mode < 6 ) {
196- item .getTagCompound ().getCompoundTag ("craftingGrid" ).setTag ("Items" , cache );
197- } else if (mode < 10 ){
198- item .getTagCompound ().setTag ("crafting" , cache );
199- }
195+ item .getTagCompound ().getCompoundTag ("craftingGrid" ).setTag ("Items" , cache );
200196 item .getTagCompound ().getCompoundTag ("cache" ).removeTag (String .valueOf (mode ));
201197 } else {
202198 item .getTagCompound ().getCompoundTag ("cache" ).removeTag (String .valueOf (mode ));
@@ -212,16 +208,12 @@ public void nbtChange(EntityPlayer player, int mode) {
212208 if (item .getTagCompound () != null && item .getItem () == RegistryItems .WIRELESS_UNIVERSAL_TERMINAL ) {
213209 item .getTagCompound ().setInteger ("mode" , mode );
214210 item .getTagCompound ().setInteger ("craft" , 1 );
215- if (mode != 0 && mode != 2 && mode != 5 ) {
211+ if (mode != 0 && mode != 2 ) {
216212 List <Integer > list = Arrays .stream (item .getTagCompound ().getIntArray ("modes" )).boxed ().collect (Collectors .toList ());
217213 if (list .contains (mode )) {
218214 NBTTagList cache = item .getTagCompound ().getCompoundTag ("cache" ).getTagList (String .valueOf (mode ), 10 );
219215 if (cache .tagCount () != 0 ) {
220- if (mode < 6 ) {
221- item .getTagCompound ().getCompoundTag ("craftingGrid" ).setTag ("Items" , cache );
222- } else if (mode < 10 ){
223- item .getTagCompound ().setTag ("crafting" , cache );
224- }
216+ item .getTagCompound ().getCompoundTag ("craftingGrid" ).setTag ("Items" , cache );
225217 item .getTagCompound ().getCompoundTag ("cache" ).removeTag (String .valueOf (mode ));
226218 } else {
227219 item .getTagCompound ().getCompoundTag ("cache" ).removeTag (String .valueOf (mode ));
@@ -241,11 +233,7 @@ public void nbtChange(EntityPlayer player, int mode) {
241233 if (list .contains (mode )) {
242234 NBTTagList cache = item .getTagCompound ().getCompoundTag ("cache" ).getTagList (String .valueOf (mode ), 10 );
243235 if (cache .tagCount () != 0 ) {
244- if (mode < 6 ) {
245- item .getTagCompound ().getCompoundTag ("craftingGrid" ).setTag ("Items" , cache );
246- } else if (mode < 10 ){
247- item .getTagCompound ().setTag ("crafting" , cache );
248- }
236+ item .getTagCompound ().getCompoundTag ("craftingGrid" ).setTag ("Items" , cache );
249237 item .getTagCompound ().getCompoundTag ("cache" ).removeTag (String .valueOf (mode ));
250238 } else {
251239 item .getTagCompound ().getCompoundTag ("cache" ).removeTag (String .valueOf (mode ));
@@ -342,9 +330,10 @@ public void nbtChangeB(EntityPlayer player) {
342330 }
343331 if (items .tagCount () != 0 ) {
344332 item .getTagCompound ().getCompoundTag ("cache" ).setTag (String .valueOf (mode ), items );
333+ item .getTagCompound ().getCompoundTag ("craftingGrid" ).removeTag ("Items" );
334+ } else {
335+ item .getTagCompound ().getCompoundTag ("craftingGrid" ).removeTag ("Items" );
345336 }
346- item .getTagCompound ().getCompoundTag ("craftingGrid" ).removeTag ("Items" );
347- item .getTagCompound ().removeTag ("crafting" );
348337 }
349338 }
350339 }
0 commit comments