2727import javax .annotation .Nullable ;
2828
2929import net .minecraftforge .common .IPlantable ;
30- import net .minecraftforge .common .ToolType ;
3130
3231import net .minecraft .block .BedBlock ;
3332import net .minecraft .block .Block ;
8382import net .fabricmc .api .EnvType ;
8483import net .fabricmc .api .Environment ;
8584
86- import net .patchworkmc .impl .extensions .block .BlockHarvestManager ;
87- import net .patchworkmc .impl .extensions .block .PatchworkBlock ;
8885import net .patchworkmc .mixin .extensions .block .FireBlockAccessor ;
8986import net .patchworkmc .mixin .extensions .block .PlantBlockAccessor ;
9087
91- public interface IForgeBlock extends PatchworkBlock {
88+ public interface IForgeBlock {
9289 default Block getBlock () {
9390 return (Block ) this ;
9491 }
@@ -207,18 +204,18 @@ default BlockEntity createTileEntity(BlockState state, BlockView world) {
207204 return null ;
208205 }
209206
210- /* TODO IForgeBlock#canHarvestBlock indirectly requires ToolType (via ForgeHooks#canHarvestBlock) */
207+ /* TODO IForgeBlock#canHarvestBlock indirectly requires ToolType (via ForgeHooks#canHarvestBlock)
211208 /**
212209 * Determines if the player can harvest this block, obtaining it's drops when the block is destroyed.
213210 *
214211 * @param world The current world
215212 * @param pos The block's current position
216213 * @param player The player damaging the block
217214 * @return True to spawn the drops
218- */
215+ *
219216 default boolean canHarvestBlock(BlockState state, BlockView world, BlockPos pos, PlayerEntity player) {
220- return BlockHarvestManager .canHarvestBlock (state , player , world , pos );
221- }
217+ return ForgeHooks .canHarvestBlock(state, player, world, pos);
218+ }*/
222219
223220 // TODO Call locations: Patches: ServerPlayerInteractionManager*
224221 /**
@@ -243,7 +240,7 @@ default boolean canHarvestBlock(BlockState state, BlockView world, BlockPos pos,
243240 */
244241 default boolean removedByPlayer (BlockState state , World world , BlockPos pos , PlayerEntity player , boolean willHarvest , FluidState fluid ) {
245242 getBlock ().onBreak (world , pos , state , player );
246- return world .setBlockState (pos , fluid . getBlockState (), world . isClient ? 11 : 3 );
243+ return world .removeBlock (pos , false );
247244 }
248245
249246 // TODO Call locations: Patches: LivingEntity*, PlayerEntity*, Forge classes: ForgeEventFactory (called from LivingEntity patch)
@@ -648,7 +645,6 @@ default boolean isBeaconBase(BlockState state, CollisionView world, BlockPos pos
648645 // TODO Call locations: Forge classes: BreakEvent*
649646 /**
650647 * Gathers how much experience this block drops when broken.
651- * TODO: there's no equivalent callback in Fabric API, so for now Fabric mods should always return 0 here.
652648 *
653649 * @param state The current state
654650 * @param world The world
@@ -782,12 +778,12 @@ default boolean getWeakChanges(BlockState state, CollisionView world, BlockPos p
782778 return false ;
783779 }
784780
785- /* TODO IForgeBlock#getHarvestTool needs ToolType */
781+ /* TODO IForgeBlock#getHarvestTool needs ToolType
786782 /**
787783 * Queries the class of tool required to harvest this block, if null is returned
788784 * we assume that anything can harvest this block.
789- */
790- ToolType getHarvestTool (BlockState state );
785+ *
786+ ToolType getHarvestTool(BlockState state);*/
791787
792788 // TODO Call locations: Patches: PickaxeItem*, Forge classes: ForgeHooks*
793789 /**
@@ -797,18 +793,18 @@ default boolean getWeakChanges(BlockState state, CollisionView world, BlockPos p
797793 */
798794 int getHarvestLevel (BlockState state );
799795
800- /* TODO IForgeBlock#isToolEffective needs ToolType */
796+ /* TODO IForgeBlock#isToolEffective needs ToolType
801797 /**
802798 * Checks if the specified tool type is efficient on this block,
803799 * meaning that it digs at full speed.
804- */
800+ *
805801 default boolean isToolEffective(BlockState state, ToolType tool) {
806802 if (tool == ToolType.PICKAXE && (this.getBlock() == Blocks.REDSTONE_ORE || this.getBlock() == Blocks.REDSTONE_LAMP || this.getBlock() == Blocks.OBSIDIAN)) {
807803 return false;
808804 }
809805
810806 return tool == getHarvestTool(state);
811- }
807+ }*/
812808
813809 // TODO Call locations: Forge classes: ForgeHooksClient
814810 /**
0 commit comments