@@ -51,11 +51,6 @@ public BlockCompactMachine(EnumMachineSize size, AbstractBlock.Properties props)
5151 this .size = size ;
5252 }
5353
54- @ Override
55- public void entityInside (BlockState p_196262_1_ , World p_196262_2_ , BlockPos p_196262_3_ , Entity p_196262_4_ ) {
56- super .entityInside (p_196262_1_ , p_196262_2_ , p_196262_3_ , p_196262_4_ );
57- }
58-
5954 @ Override
6055 public float getDestroyProgress (BlockState state , PlayerEntity player , IBlockReader worldIn , BlockPos pos ) {
6156 CompactMachineTile tile = (CompactMachineTile ) worldIn .getBlockEntity (pos );
@@ -238,13 +233,6 @@ public ItemStack getPickBlock(BlockState state, RayTraceResult target, IBlockRea
238233 return stack ;
239234 }
240235
241-
242- // @Override
243- // public String getSpecialName(ItemStack stack) {
244- // return this.getStateFromMeta(stack.getItemDamage()).getValue(SIZE).getName();
245- // }
246-
247-
248236 @ Override
249237 public boolean hasTileEntity (BlockState state ) {
250238 return true ;
@@ -256,27 +244,6 @@ public TileEntity createTileEntity(BlockState state, IBlockReader world) {
256244 return new CompactMachineTile ();
257245 }
258246
259- @ Override
260- public void destroy (IWorld world , BlockPos pos , BlockState state ) {
261- if (world .isClientSide ()) {
262- super .destroy (world , pos , state );
263- return ;
264- }
265-
266- if (!(world .getBlockEntity (pos ) instanceof CompactMachineTile )) {
267- return ;
268- }
269-
270- CompactMachineTile te = (CompactMachineTile ) world .getBlockEntity (pos );
271- // WorldSavedDataMachines.INSTANCE.removeMachinePosition(te.coords);
272- //
273- // BlockMachine.spawnItemWithNBT(world, pos, state.get(BlockMachine.SIZE), te);
274- //
275- // ChunkLoadingMachines.unforceChunk(te.coords);
276-
277- super .destroy (world , pos , state );
278- }
279-
280247 @ Override
281248 public void setPlacedBy (World worldIn , BlockPos pos , BlockState state , @ Nullable LivingEntity placer , ItemStack stack ) {
282249
@@ -315,7 +282,6 @@ public void setPlacedBy(World worldIn, BlockPos pos, BlockState state, @Nullable
315282 }
316283
317284 tile .doPostPlaced ();
318- tile .setChanged ();
319285 }
320286
321287 @ Override
@@ -350,46 +316,4 @@ public EnumMachineSize getSize() {
350316 public void addProbeData (IProbeData data , PlayerEntity player , World world , BlockState state ) {
351317 CompactMachineProvider .exec (data , world );
352318 }
353-
354- // 1.12.1 code
355- // @Override
356- // public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
357- // if(player.isSneaking()) {
358- // return false;
359- // }
360- //
361- // if(world.isRemote || !(player instanceof EntityPlayerMP)) {
362- // return true;
363- // }
364- //
365- // if(!(world.getTileEntity(pos) instanceof TileEntityMachine)) {
366- // return false;
367- // }
368- //
369- // TileEntityMachine machine = (TileEntityMachine)world.getTileEntity(pos);
370- // ItemStack playerStack = player.getHeldItemMainhand();
371- // if(ShrinkingDeviceUtils.isShrinkingDevice(playerStack)) {
372- // TeleportationTools.tryToEnterMachine(player, machine);
373- // return true;
374- // }
375- //
376- // player.openGui(compactmachines.instance, GuiIds.MACHINE_VIEW.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
377- // PackageHandler.instance.sendTo(new MessageMachineContent(machine.coords), (EntityPlayerMP)player);
378- // PackageHandler.instance.sendTo(new MessageMachineChunk(machine.coords), (EntityPlayerMP)player);
379- //
380- // return true;
381- // }
382-
383- // TOP code
384- // @Override
385- // public String getID() {
386- // return CompactMachines.MODID + ":" + "machine";
387- // }
388- //
389- // @Override
390- // public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player, World world, BlockState blockState, IProbeHitData data) {
391- // String size = this.size.getName();
392- // probeInfo.text(new TranslationTextComponent("machines.sizes." + size));
393- //
394- // }
395319}
0 commit comments