Update BlockController.java
Can try it like this, just edited on the webpage editor so not tested, but since the controller dont have a inventory to drop there should not be a need to use a list and drop inventory content, above should work for silktouch and not silk
This commit is contained in:
		| @@ -106,42 +106,20 @@ public class BlockController extends BlockBase { | |||||||
|         player.addStat(StatList.func_188055_a(this)); |         player.addStat(StatList.func_188055_a(this)); | ||||||
|         player.addExhaustion(0.025F); |         player.addExhaustion(0.025F); | ||||||
|  |  | ||||||
|         if (this.canSilkHarvest(worldIn, pos, state, player) && EnchantmentHelper.getEnchantmentLevel(Enchantments.silkTouch, stack) > 0) |         harvesters.set(player); | ||||||
|         { |         int i = EnchantmentHelper.getEnchantmentLevel(Enchantments.fortune, stack); | ||||||
|             java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>(); |         if ((te instanceof TileController)) { | ||||||
|             ItemStack itemstack = this.createStackedBlock(state); |             TileController controller = (TileController) te; | ||||||
|  |             ItemStack item = new ItemStack(getItemDropped(state, null, 0), 1, damageDropped(state)); | ||||||
|             if (itemstack != null) |             NBTTagCompound tag = new NBTTagCompound(); | ||||||
|             { |             controller.writeItemToNBT(tag); | ||||||
|                 items.add(itemstack); |             item.setTagCompound(tag); | ||||||
|             } |             if (!worldIn.isRemote && !worldIn.restoringBlockSnapshots) | ||||||
|  |  | ||||||
|             net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, worldIn, pos, state, 0, 1.0f, true, player); |  | ||||||
|             for (ItemStack item : items) |  | ||||||
|             { |             { | ||||||
|                 spawnAsEntity(worldIn, pos, item); |                 spawnAsEntity(worldIn, pos, item); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         else |         harvesters.set(null); | ||||||
|         { |  | ||||||
|             harvesters.set(player); |  | ||||||
|             int i = EnchantmentHelper.getEnchantmentLevel(Enchantments.fortune, stack); |  | ||||||
|             if ((te instanceof TileController)) { |  | ||||||
|                 List<ItemStack> ls = new ArrayList<ItemStack>(); |  | ||||||
|  |  | ||||||
|                 TileController controller = (TileController) te; |  | ||||||
|                 ItemStack item = new ItemStack(getItemDropped(state, null, 0), 1, damageDropped(state)); |  | ||||||
|                 NBTTagCompound tag = new NBTTagCompound(); |  | ||||||
|                 controller.writeItemToNBT(tag); |  | ||||||
|                 item.setTagCompound(tag); |  | ||||||
|                 if (!worldIn.isRemote && !worldIn.restoringBlockSnapshots) |  | ||||||
|                 { |  | ||||||
|                     spawnAsEntity(worldIn, pos, item); |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|                 //this.dropBlockAsItem(worldIn, pos, state, i); |  | ||||||
|             harvesters.set(null); |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 tomevoll
					tomevoll