Added mining tags
This commit is contained in:
parent
11d8ee407a
commit
c15bdc006e
|
@ -126,5 +126,7 @@ d6b02c345edd356b8e4b7421bdd453f454c6ed7f data/functionalstorage/recipes/storage_
|
||||||
bcb281904eac23183c45786e3d703d24bba92be6 data/functionalstorage/recipes/warped_1.json
|
bcb281904eac23183c45786e3d703d24bba92be6 data/functionalstorage/recipes/warped_1.json
|
||||||
8fc3f76a2c57eb4d80ce86947fabebe48fa6f692 data/functionalstorage/recipes/warped_2.json
|
8fc3f76a2c57eb4d80ce86947fabebe48fa6f692 data/functionalstorage/recipes/warped_2.json
|
||||||
7510a8ca1f1e3bb63f4c4f4add0bb6b713feaa0b data/functionalstorage/recipes/warped_4.json
|
7510a8ca1f1e3bb63f4c4f4add0bb6b713feaa0b data/functionalstorage/recipes/warped_4.json
|
||||||
db0122948639b122cb0c1df7530996e9784356b0 data/functionalstorage/tags/items/drawer.json
|
f37e620a26ceb158507c607cee6ba3b51f14c6d6 data/functionalstorage/tags/items/drawer.json
|
||||||
12ec935226bf5a6a1493d353ef6dc6c224c256dd data/functionalstorage/tags/items/ignore_crafting_check.json
|
12ec935226bf5a6a1493d353ef6dc6c224c256dd data/functionalstorage/tags/items/ignore_crafting_check.json
|
||||||
|
f37e620a26ceb158507c607cee6ba3b51f14c6d6 data/minecraft/tags/blocks/mineable/axe.json
|
||||||
|
158e42ebbf51726de4367ac4c2df824e2f119199 data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"functionalstorage:oak_1",
|
"functionalstorage:oak_2",
|
||||||
"functionalstorage:spruce_1",
|
"functionalstorage:spruce_2",
|
||||||
"functionalstorage:birch_1",
|
"functionalstorage:birch_2",
|
||||||
"functionalstorage:jungle_1",
|
"functionalstorage:jungle_2",
|
||||||
"functionalstorage:acacia_1",
|
"functionalstorage:acacia_2",
|
||||||
"functionalstorage:dark_oak_1",
|
"functionalstorage:dark_oak_2",
|
||||||
"functionalstorage:crimson_1",
|
"functionalstorage:crimson_2",
|
||||||
"functionalstorage:warped_1",
|
"functionalstorage:warped_2",
|
||||||
"functionalstorage:oak_4",
|
"functionalstorage:oak_4",
|
||||||
"functionalstorage:spruce_4",
|
"functionalstorage:spruce_4",
|
||||||
"functionalstorage:birch_4",
|
"functionalstorage:birch_4",
|
||||||
|
@ -17,13 +17,13 @@
|
||||||
"functionalstorage:dark_oak_4",
|
"functionalstorage:dark_oak_4",
|
||||||
"functionalstorage:crimson_4",
|
"functionalstorage:crimson_4",
|
||||||
"functionalstorage:warped_4",
|
"functionalstorage:warped_4",
|
||||||
"functionalstorage:oak_2",
|
"functionalstorage:oak_1",
|
||||||
"functionalstorage:spruce_2",
|
"functionalstorage:spruce_1",
|
||||||
"functionalstorage:birch_2",
|
"functionalstorage:birch_1",
|
||||||
"functionalstorage:jungle_2",
|
"functionalstorage:jungle_1",
|
||||||
"functionalstorage:acacia_2",
|
"functionalstorage:acacia_1",
|
||||||
"functionalstorage:dark_oak_2",
|
"functionalstorage:dark_oak_1",
|
||||||
"functionalstorage:crimson_2",
|
"functionalstorage:crimson_1",
|
||||||
"functionalstorage:warped_2"
|
"functionalstorage:warped_1"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"functionalstorage:oak_2",
|
||||||
|
"functionalstorage:spruce_2",
|
||||||
|
"functionalstorage:birch_2",
|
||||||
|
"functionalstorage:jungle_2",
|
||||||
|
"functionalstorage:acacia_2",
|
||||||
|
"functionalstorage:dark_oak_2",
|
||||||
|
"functionalstorage:crimson_2",
|
||||||
|
"functionalstorage:warped_2",
|
||||||
|
"functionalstorage:oak_4",
|
||||||
|
"functionalstorage:spruce_4",
|
||||||
|
"functionalstorage:birch_4",
|
||||||
|
"functionalstorage:jungle_4",
|
||||||
|
"functionalstorage:acacia_4",
|
||||||
|
"functionalstorage:dark_oak_4",
|
||||||
|
"functionalstorage:crimson_4",
|
||||||
|
"functionalstorage:warped_4",
|
||||||
|
"functionalstorage:oak_1",
|
||||||
|
"functionalstorage:spruce_1",
|
||||||
|
"functionalstorage:birch_1",
|
||||||
|
"functionalstorage:jungle_1",
|
||||||
|
"functionalstorage:acacia_1",
|
||||||
|
"functionalstorage:dark_oak_1",
|
||||||
|
"functionalstorage:crimson_1",
|
||||||
|
"functionalstorage:warped_1"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"functionalstorage:compacting_drawer",
|
||||||
|
"functionalstorage:storage_controller",
|
||||||
|
"functionalstorage:armory_cabinet"
|
||||||
|
]
|
||||||
|
}
|
|
@ -7,9 +7,10 @@ import com.buuz135.functionalstorage.block.DrawerControllerBlock;
|
||||||
import com.buuz135.functionalstorage.client.CompactingDrawerRenderer;
|
import com.buuz135.functionalstorage.client.CompactingDrawerRenderer;
|
||||||
import com.buuz135.functionalstorage.client.ControllerRenderer;
|
import com.buuz135.functionalstorage.client.ControllerRenderer;
|
||||||
import com.buuz135.functionalstorage.client.DrawerRenderer;
|
import com.buuz135.functionalstorage.client.DrawerRenderer;
|
||||||
|
import com.buuz135.functionalstorage.data.FunctionalStorageBlockTagsProvider;
|
||||||
import com.buuz135.functionalstorage.data.FunctionalStorageBlockstateProvider;
|
import com.buuz135.functionalstorage.data.FunctionalStorageBlockstateProvider;
|
||||||
import com.buuz135.functionalstorage.data.FunctionalStorageLangProvider;
|
import com.buuz135.functionalstorage.data.FunctionalStorageLangProvider;
|
||||||
import com.buuz135.functionalstorage.data.FunctionalStorageTagsProvider;
|
import com.buuz135.functionalstorage.data.FunctionalStorageItemTagsProvider;
|
||||||
import com.buuz135.functionalstorage.item.ConfigurationToolItem;
|
import com.buuz135.functionalstorage.item.ConfigurationToolItem;
|
||||||
import com.buuz135.functionalstorage.item.LinkingToolItem;
|
import com.buuz135.functionalstorage.item.LinkingToolItem;
|
||||||
import com.buuz135.functionalstorage.item.StorageUpgradeItem;
|
import com.buuz135.functionalstorage.item.StorageUpgradeItem;
|
||||||
|
@ -28,7 +29,6 @@ import com.hrznstudio.titanium.recipe.generator.TitaniumShapedRecipeBuilder;
|
||||||
import com.hrznstudio.titanium.tab.AdvancedTitaniumTab;
|
import com.hrznstudio.titanium.tab.AdvancedTitaniumTab;
|
||||||
import net.minecraft.client.renderer.ItemBlockRenderTypes;
|
import net.minecraft.client.renderer.ItemBlockRenderTypes;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.core.Direction;
|
|
||||||
import net.minecraft.data.recipes.FinishedRecipe;
|
import net.minecraft.data.recipes.FinishedRecipe;
|
||||||
import net.minecraft.data.recipes.UpgradeRecipeBuilder;
|
import net.minecraft.data.recipes.UpgradeRecipeBuilder;
|
||||||
import net.minecraft.data.tags.BlockTagsProvider;
|
import net.minecraft.data.tags.BlockTagsProvider;
|
||||||
|
@ -43,10 +43,8 @@ import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.client.event.ColorHandlerEvent;
|
import net.minecraftforge.client.event.ColorHandlerEvent;
|
||||||
import net.minecraftforge.client.event.EntityRenderersEvent;
|
import net.minecraftforge.client.event.EntityRenderersEvent;
|
||||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
|
||||||
import net.minecraftforge.client.model.generators.BlockModelProvider;
|
import net.minecraftforge.client.model.generators.BlockModelProvider;
|
||||||
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
||||||
import net.minecraftforge.client.model.generators.ModelProvider;
|
|
||||||
import net.minecraftforge.common.Tags;
|
import net.minecraftforge.common.Tags;
|
||||||
import net.minecraftforge.common.util.NonNullLazy;
|
import net.minecraftforge.common.util.NonNullLazy;
|
||||||
import net.minecraftforge.fml.DistExecutor;
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
@ -300,8 +298,9 @@ public class FunctionalStorage extends ModuleController {
|
||||||
.save(consumer);
|
.save(consumer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
event.getGenerator().addProvider(new FunctionalStorageTagsProvider(event.getGenerator(),new BlockTagsProvider(event.getGenerator()), MOD_ID, event.getExistingFileHelper()));
|
event.getGenerator().addProvider(new FunctionalStorageItemTagsProvider(event.getGenerator(),new BlockTagsProvider(event.getGenerator()), MOD_ID, event.getExistingFileHelper()));
|
||||||
event.getGenerator().addProvider(new FunctionalStorageLangProvider(event.getGenerator(), MOD_ID, "en_us"));
|
event.getGenerator().addProvider(new FunctionalStorageLangProvider(event.getGenerator(), MOD_ID, "en_us"));
|
||||||
|
event.getGenerator().addProvider(new FunctionalStorageBlockTagsProvider(event.getGenerator(), MOD_ID, event.getExistingFileHelper()));
|
||||||
event.getGenerator().addProvider(new ItemModelProvider(event.getGenerator(), MOD_ID, event.getExistingFileHelper()) {
|
event.getGenerator().addProvider(new ItemModelProvider(event.getGenerator(), MOD_ID, event.getExistingFileHelper()) {
|
||||||
@Override
|
@Override
|
||||||
protected void registerModels() {
|
protected void registerModels() {
|
||||||
|
|
|
@ -75,7 +75,6 @@ public class DrawerBlock extends RotatableBlock<DrawerTile> {
|
||||||
put(direction, Shapes.box(bounding.minX, 9/16D, bounding.minZ ,bounding.maxX, bounding.maxY, bounding.maxZ));
|
put(direction, Shapes.box(bounding.minX, 9/16D, bounding.minZ ,bounding.maxX, bounding.maxY, bounding.maxZ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//TODO Fix 4x4 they are backwards
|
|
||||||
for (Direction direction : CACHED_SHAPES.get(FunctionalStorage.DrawerType.X_2).keySet()) {
|
for (Direction direction : CACHED_SHAPES.get(FunctionalStorage.DrawerType.X_2).keySet()) {
|
||||||
for (VoxelShape voxelShape : CACHED_SHAPES.get(FunctionalStorage.DrawerType.X_2).get(direction)) {
|
for (VoxelShape voxelShape : CACHED_SHAPES.get(FunctionalStorage.DrawerType.X_2).get(direction)) {
|
||||||
AABB bounding = voxelShape.toAabbs().get(0);
|
AABB bounding = voxelShape.toAabbs().get(0);
|
||||||
|
|
|
@ -20,6 +20,7 @@ import javax.annotation.Nullable;
|
||||||
public class ArmoryCabinetTile extends ActiveTile<ArmoryCabinetTile> {
|
public class ArmoryCabinetTile extends ActiveTile<ArmoryCabinetTile> {
|
||||||
|
|
||||||
//TODO Not sync nbt
|
//TODO Not sync nbt
|
||||||
|
//TODO Tool Efficiency
|
||||||
|
|
||||||
@Save
|
@Save
|
||||||
public ArmoryCabinetInventoryHandler handler;
|
public ArmoryCabinetInventoryHandler handler;
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.buuz135.functionalstorage.data;
|
||||||
|
|
||||||
|
import com.buuz135.functionalstorage.FunctionalStorage;
|
||||||
|
import com.buuz135.functionalstorage.util.StorageTags;
|
||||||
|
import net.minecraft.data.DataGenerator;
|
||||||
|
import net.minecraft.data.tags.BlockTagsProvider;
|
||||||
|
import net.minecraft.data.tags.ItemTagsProvider;
|
||||||
|
import net.minecraft.tags.BlockTags;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||||
|
import net.minecraftforge.registries.RegistryObject;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
public class FunctionalStorageBlockTagsProvider extends BlockTagsProvider {
|
||||||
|
|
||||||
|
public FunctionalStorageBlockTagsProvider(DataGenerator p_126530_, String modId, @Nullable ExistingFileHelper existingFileHelper) {
|
||||||
|
super(p_126530_, modId, existingFileHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void addTags() {
|
||||||
|
TagAppender<Block> tTagAppender = this.tag(BlockTags.MINEABLE_WITH_AXE);
|
||||||
|
for (FunctionalStorage.DrawerType drawerType : FunctionalStorage.DRAWER_TYPES.keySet()) {
|
||||||
|
for (RegistryObject<Block> blockRegistryObject : FunctionalStorage.DRAWER_TYPES.get(drawerType)) {
|
||||||
|
tTagAppender.add(blockRegistryObject.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.tag(BlockTags.MINEABLE_WITH_PICKAXE).add(FunctionalStorage.COMPACTING_DRAWER.get()).add(FunctionalStorage.DRAWER_CONTROLLER.get()).add(FunctionalStorage.ARMORY_CABINET.get());
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,18 +7,21 @@ import net.minecraft.data.tags.BlockTagsProvider;
|
||||||
import net.minecraft.data.tags.ItemTagsProvider;
|
import net.minecraft.data.tags.ItemTagsProvider;
|
||||||
import net.minecraft.data.tags.TagsProvider;
|
import net.minecraft.data.tags.TagsProvider;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.tags.BlockTags;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.Items;
|
import net.minecraft.world.item.Items;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraftforge.common.ForgeTier;
|
||||||
|
import net.minecraftforge.common.Tags;
|
||||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||||
import net.minecraftforge.registries.RegistryObject;
|
import net.minecraftforge.registries.RegistryObject;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
public class FunctionalStorageTagsProvider extends ItemTagsProvider {
|
public class FunctionalStorageItemTagsProvider extends ItemTagsProvider {
|
||||||
|
|
||||||
public FunctionalStorageTagsProvider(DataGenerator p_126530_, BlockTagsProvider p_126531_, String modId, @Nullable ExistingFileHelper existingFileHelper) {
|
public FunctionalStorageItemTagsProvider(DataGenerator p_126530_, BlockTagsProvider p_126531_, String modId, @Nullable ExistingFileHelper existingFileHelper) {
|
||||||
super(p_126530_, p_126531_, modId, existingFileHelper);
|
super(p_126530_, p_126531_, modId, existingFileHelper);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user