mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
add tag for non-harvestable blocks
This commit is contained in:
parent
ac20501426
commit
97aa549307
5 changed files with 391 additions and 378 deletions
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"values": [
|
||||
"minecraft:fire"
|
||||
]
|
||||
}
|
|
@ -113,6 +113,7 @@ public class AllTags {
|
|||
FALLBACK_MOUNTED_STORAGE_BLACKLIST,
|
||||
ROOTS,
|
||||
SUGAR_CANE_VARIANTS,
|
||||
NOT_HARVESTABLE,
|
||||
|
||||
CORALS,
|
||||
|
||||
|
|
|
@ -57,12 +57,15 @@ public class HarvesterMovementBehaviour implements MovementBehaviour {
|
|||
@Override
|
||||
public void visitNewPosition(MovementContext context, BlockPos pos) {
|
||||
Level world = context.world;
|
||||
BlockState stateVisited = world.getBlockState(pos);
|
||||
boolean notCropButCuttable = false;
|
||||
|
||||
if (world.isClientSide)
|
||||
return;
|
||||
|
||||
BlockState stateVisited = world.getBlockState(pos);
|
||||
if (stateVisited.isAir() || AllBlockTags.NOT_HARVESTABLE.matches(stateVisited))
|
||||
return;
|
||||
|
||||
boolean notCropButCuttable = false;
|
||||
|
||||
if (!isValidCrop(world, pos, stateVisited)) {
|
||||
if (isValidOther(world, pos, stateVisited))
|
||||
notCropButCuttable = true;
|
||||
|
|
|
@ -127,6 +127,9 @@ public class CreateRegistrateTags {
|
|||
prov.tag(AllBlockTags.SUGAR_CANE_VARIANTS.tag)
|
||||
.add(Blocks.SUGAR_CANE);
|
||||
|
||||
prov.tag(AllBlockTags.NOT_HARVESTABLE.tag)
|
||||
.add(Blocks.FIRE);
|
||||
|
||||
prov.tag(AllBlockTags.CORALS.tag)
|
||||
.add(Blocks.DEAD_TUBE_CORAL, Blocks.DEAD_BRAIN_CORAL, Blocks.DEAD_BUBBLE_CORAL, Blocks.DEAD_FIRE_CORAL,
|
||||
Blocks.DEAD_HORN_CORAL, Blocks.TUBE_CORAL, Blocks.BRAIN_CORAL, Blocks.BUBBLE_CORAL,
|
||||
|
|
Loading…
Add table
Reference in a new issue