[Change] Output Blocks that are missing minable tags when runnig DataGen
This commit is contained in:
parent
b2395022d6
commit
eaf01c1ed1
9 changed files with 25 additions and 7 deletions
|
@ -22,6 +22,7 @@ import org.betterx.worlds.together.tag.v3.*;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.core.dispenser.ShearsDispenseItemBehavior;
|
import net.minecraft.core.dispenser.ShearsDispenseItemBehavior;
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.tags.BlockTags;
|
import net.minecraft.tags.BlockTags;
|
||||||
import net.minecraft.tags.ItemTags;
|
import net.minecraft.tags.ItemTags;
|
||||||
import net.minecraft.tags.TagKey;
|
import net.minecraft.tags.TagKey;
|
||||||
|
@ -252,5 +253,14 @@ public class PostInitAPI {
|
||||||
if (block instanceof Fuel fl) {
|
if (block instanceof Fuel fl) {
|
||||||
FuelRegistry.INSTANCE.add(block, fl.getFuelTime());
|
FuelRegistry.INSTANCE.add(block, fl.getFuelTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BCLib.isDatagen()) {
|
||||||
|
final ResourceLocation location = BuiltInRegistries.BLOCK.getKey(block);
|
||||||
|
if (!location.getNamespace().equals("minecraft")) {
|
||||||
|
if (!(block instanceof HasMinableBehaviour)) {
|
||||||
|
BCLib.LOGGER.warning("Block " + block + " has no minable behaviour!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.betterx.bclib.interfaces.tools;
|
package org.betterx.bclib.interfaces.tools;
|
||||||
|
|
||||||
public interface AddMineableAxe {
|
public interface AddMineableAxe extends HasMinableBehaviour {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.betterx.bclib.interfaces.tools;
|
package org.betterx.bclib.interfaces.tools;
|
||||||
|
|
||||||
public interface AddMineableHammer {
|
public interface AddMineableHammer extends HasMinableBehaviour {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.betterx.bclib.interfaces.tools;
|
package org.betterx.bclib.interfaces.tools;
|
||||||
|
|
||||||
public interface AddMineableHoe {
|
public interface AddMineableHoe extends HasMinableBehaviour {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.betterx.bclib.interfaces.tools;
|
package org.betterx.bclib.interfaces.tools;
|
||||||
|
|
||||||
public interface AddMineablePickaxe {
|
public interface AddMineablePickaxe extends HasMinableBehaviour {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.betterx.bclib.interfaces.tools;
|
package org.betterx.bclib.interfaces.tools;
|
||||||
|
|
||||||
public interface AddMineableShears {
|
public interface AddMineableShears extends HasMinableBehaviour {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.betterx.bclib.interfaces.tools;
|
package org.betterx.bclib.interfaces.tools;
|
||||||
|
|
||||||
public interface AddMineableShovel {
|
public interface AddMineableShovel extends HasMinableBehaviour {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.betterx.bclib.interfaces.tools;
|
package org.betterx.bclib.interfaces.tools;
|
||||||
|
|
||||||
public interface AddMineableSword {
|
public interface AddMineableSword extends HasMinableBehaviour {
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
package org.betterx.bclib.interfaces.tools;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
|
|
||||||
|
@ApiStatus.Internal
|
||||||
|
public interface HasMinableBehaviour {
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue