(IBlockSource source, ItemStack stack)
| 133 | BlockDispenser.dispenseBehaviorRegistry.putObject(Items.spawn_egg, new BehaviorDefaultDispenseItem() |
| 134 | { |
| 135 | public ItemStack dispenseStack(IBlockSource source, ItemStack stack) |
| 136 | { |
| 137 | EnumFacing enumfacing = BlockDispenser.getFacing(source.getBlockMetadata()); |
| 138 | double d0 = source.getX() + (double)enumfacing.getFrontOffsetX(); |
| 139 | double d1 = (float)source.getBlockPos().getY() + 0.2F; |
| 140 | double d2 = source.getZ() + (double)enumfacing.getFrontOffsetZ(); |
| 141 | Entity entity = ItemMonsterPlacer.spawnCreature(source.getWorld(), stack.getMetadata(), d0, d1, d2); |
| 142 | |
| 143 | if (entity instanceof EntityLivingBase && stack.hasDisplayName()) |
| 144 | { |
| 145 | entity.setCustomNameTag(stack.getDisplayName()); |
| 146 | } |
| 147 | |
| 148 | stack.splitStack(1); |
| 149 | return stack; |
| 150 | } |
| 151 | }); |
| 152 | BlockDispenser.dispenseBehaviorRegistry.putObject(Items.fireworks, new BehaviorDefaultDispenseItem() |
| 153 | { |
nothing calls this directly
no test coverage detected