Sulphuric rock furnace, shaders, furnaces tag
This commit is contained in:
parent
3d56209653
commit
c5182a4418
22 changed files with 112 additions and 7 deletions
|
@ -18,12 +18,16 @@ import net.minecraft.util.registry.Registry;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.entities.EFurnaceBlockEntity;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class EndFurnaceBlock extends FurnaceBlock implements BlockPatterned {
|
||||
public class EndFurnaceBlock extends FurnaceBlock implements BlockPatterned, IRenderTypeable {
|
||||
public EndFurnaceBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source));
|
||||
super(FabricBlockSettings.copyOf(source).luminance((state) -> {
|
||||
return state.get(LIT) ? 13 : 0;
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,18 +52,28 @@ public class EndFurnaceBlock extends FurnaceBlock implements BlockPatterned {
|
|||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
String add = block.contains("_on") ? "_on" : "";
|
||||
Identifier blockId = Registry.BLOCK.getId(this);
|
||||
Map<String, String> map = Maps.newHashMap();
|
||||
map.put("%top%", blockId.getPath() + "_top");
|
||||
map.put("%front%", blockId.getPath() + "_front" + add);
|
||||
map.put("%side%", blockId.getPath() + "_side");
|
||||
map.put("%bottom%", blockId.getPath() + "_bottom");
|
||||
return Patterns.createJson(Patterns.BLOCK_FURNACE, map);
|
||||
if (block.contains("_on")) {
|
||||
map.put("%front%", blockId.getPath() + "_front_on");
|
||||
map.put("%glow%", blockId.getPath() + "_glow");
|
||||
return Patterns.createJson(Patterns.BLOCK_FURNACE_GLOW, map);
|
||||
}
|
||||
else {
|
||||
map.put("%front%", blockId.getPath() + "_front");
|
||||
return Patterns.createJson(Patterns.BLOCK_FURNACE, map);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier statePatternId() {
|
||||
return Patterns.STATE_FURNACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ERenderLayer getRenderLayer() {
|
||||
return ERenderLayer.CUTOUT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ import ru.betterend.recipe.builders.GridRecipe;
|
|||
import ru.betterend.recipe.builders.SmithingTableRecipe;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.TagHelper;
|
||||
|
||||
public class MetalMaterial {
|
||||
|
@ -198,5 +199,6 @@ public class MetalMaterial {
|
|||
GridRecipe.make(name + "_boots", boots).setShape("# #", "# #").addMaterial('#', ingot).setGroup("end_metal_boots").build();
|
||||
|
||||
TagHelper.addTag(BlockTags.ANVIL, anvil);
|
||||
TagHelper.addTag(EndTags.IRON_INGOTS, ingot);
|
||||
}
|
||||
}
|
|
@ -90,6 +90,7 @@ public class StoneMaterial {
|
|||
TagHelper.addTag(ItemTags.STONE_BRICKS, bricks);
|
||||
TagHelper.addTag(ItemTags.STONE_CRAFTING_MATERIALS, stone);
|
||||
TagHelper.addTag(ItemTags.STONE_TOOL_MATERIALS, stone);
|
||||
TagHelper.addTag(EndTags.FURNACES, furnace);
|
||||
|
||||
// Block Tags //
|
||||
TagHelper.addTag(BlockTags.STONE_BRICKS, bricks);
|
||||
|
|
|
@ -99,6 +99,7 @@ public class Patterns {
|
|||
public final static Identifier BLOCK_CHANDELIER_WALL = BetterEnd.makeID("patterns/block/chandelier_wall.json");
|
||||
public final static Identifier BLOCK_CHANDELIER_CEIL = BetterEnd.makeID("patterns/block/chandelier_ceil.json");
|
||||
public final static Identifier BLOCK_FURNACE = BetterEnd.makeID("patterns/block/furnace.json");
|
||||
public final static Identifier BLOCK_FURNACE_GLOW = BetterEnd.makeID("patterns/block/furnace_glow.json");
|
||||
|
||||
//Models Item
|
||||
public final static Identifier ITEM_WALL = BetterEnd.makeID("patterns/item/pattern_wall.json");
|
||||
|
|
|
@ -40,7 +40,7 @@ public class CraftingRecipes {
|
|||
.setShape("T#T", "V V", "T#T")
|
||||
.addMaterial('#', Blocks.END_STONE_BRICKS)
|
||||
.addMaterial('T', EndBlocks.THALLASIUM.ingot)
|
||||
.addMaterial('V', Items.BUCKET)
|
||||
.addMaterial('V', EndTags.FURNACES)
|
||||
.build();
|
||||
|
||||
registerPedestal("andesite_pedestal", EndBlocks.ANDESITE_PEDESTAL, Blocks.POLISHED_ANDESITE_SLAB, Blocks.POLISHED_ANDESITE);
|
||||
|
|
|
@ -29,6 +29,9 @@ import ru.betterend.mixin.common.ComposterBlockAccessor;
|
|||
import ru.betterend.util.TagHelper;
|
||||
|
||||
public class EndTags {
|
||||
// Table with common (c) tags:
|
||||
// https://fabricmc.net/wiki/tutorial:tags
|
||||
|
||||
// Block Tags
|
||||
public static final Tag.Identified<Block> BOOKSHELVES = makeCommonBlockTag("bookshelves");
|
||||
public static final Tag.Identified<Block> GEN_TERRAIN = makeBlockTag("gen_terrain");
|
||||
|
@ -39,6 +42,8 @@ public class EndTags {
|
|||
|
||||
// Item Tags
|
||||
public static final Tag.Identified<Item> ITEM_CHEST = makeCommonItemTag("chest");
|
||||
public static final Tag.Identified<Item> IRON_INGOTS = makeCommonItemTag("iron_ingots");
|
||||
public static final Tag.Identified<Item> FURNACES = makeCommonItemTag("furnaces");
|
||||
public final static Tag<Item> HAMMERS = registerFabricItemTag("hammers");
|
||||
|
||||
public static Tag.Identified<Block> makeBlockTag(String name) {
|
||||
|
@ -106,6 +111,8 @@ public class EndTags {
|
|||
EndBlocks.TERMINITE.hammer
|
||||
)
|
||||
));
|
||||
|
||||
TagHelper.addTag(FURNACES, Blocks.FURNACE);
|
||||
}
|
||||
|
||||
public static void addSurfaceBlock(Block block) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue