Tags Helper
This commit is contained in:
parent
1d206295b7
commit
b9962bd6a5
4 changed files with 41 additions and 30 deletions
|
@ -1,18 +1,11 @@
|
|||
package ru.betterend.blocks.complex;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tag.TagRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.tag.SetTag;
|
||||
import net.minecraft.tag.Tag;
|
||||
import net.minecraft.util.Identifier;
|
||||
import ru.betterend.blocks.basis.BlockBarrel;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BlockChest;
|
||||
|
@ -31,6 +24,7 @@ import ru.betterend.blocks.basis.BlockTrapdoor;
|
|||
import ru.betterend.blocks.basis.BlockWoodenButton;
|
||||
import ru.betterend.recipe.RecipeBuilder;
|
||||
import ru.betterend.registry.BlockRegistry;
|
||||
import ru.betterend.util.TagHelper;
|
||||
|
||||
public class WoodenMaterial
|
||||
{
|
||||
|
@ -58,7 +52,6 @@ public class WoodenMaterial
|
|||
public final Block chest;
|
||||
public final Block barrel;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public WoodenMaterial(String name, MaterialColor woodColor, MaterialColor planksColor)
|
||||
{
|
||||
FabricBlockSettings materialPlanks = FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).materialColor(planksColor);
|
||||
|
@ -101,17 +94,7 @@ public class WoodenMaterial
|
|||
RecipeBuilder.make(name + "_chest", chest).setShape("###", "# #", "###").addMaterial('#', planks).setGroup("end_chests").build();
|
||||
RecipeBuilder.make(name + "_barrel", barrel).setShape("#S#", "# #", "#S#").addMaterial('#', planks).addMaterial('S', slab).setGroup("end_barrels").build();
|
||||
|
||||
/*try {
|
||||
Field field = BlockTags.CLIMBABLE.getClass().getDeclaredField("delegate");
|
||||
field.setAccessible(true);
|
||||
SetTag<Block> tag = SetTag.empty();
|
||||
tag = (SetTag<Block>) field.get(tag);
|
||||
System.out.println(tag.getClass());
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}*/
|
||||
//System.out.println(BlockTags.CLIMBABLE.getClass());
|
||||
TagHelper.addTag(TagHelper.CLIMBABLE, name + "_ladder");
|
||||
}
|
||||
|
||||
public boolean isTreeLog(Block block)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue