Sulphuric rock furnace, shaders, furnaces tag

This commit is contained in:
paulevsGitch 2021-02-12 17:40:15 +03:00
parent 3d56209653
commit c5182a4418
22 changed files with 112 additions and 7 deletions

View file

@ -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");
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;
}
}

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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");

View file

@ -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);

View file

@ -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) {

View file

@ -0,0 +1,10 @@
{
"defaultMap": {
"spriteMap": [
{
"sprite": "betterend:block/flavolite_furnace_glow",
"material": "betterend:glow_all"
}
]
}
}

View file

@ -0,0 +1,10 @@
{
"defaultMap": {
"spriteMap": [
{
"sprite": "betterend:block/sulphuric_rock_furnace_glow",
"material": "betterend:glow_all"
}
]
}
}

View file

@ -0,0 +1,10 @@
{
"defaultMap": {
"spriteMap": [
{
"sprite": "betterend:block/violecite_furnace_glow",
"material": "betterend:glow_all"
}
]
}
}

View file

@ -0,0 +1,38 @@
{
"parent": "block/block",
"textures": {
"top": "betterend:block/%top%",
"front": "betterend:block/%front%",
"side": "betterend:block/%side%",
"glow": "betterend:block/%glow%"
},
"display": {
"firstperson_righthand": {
"rotation": [ 0, 135, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 0.40, 0.40, 0.40 ]
}
},
"elements": [
{
"from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"down": { "texture": "#top", "cullface": "down" },
"up": { "texture": "#top", "cullface": "up" },
"north": { "texture": "#front", "cullface": "north" },
"south": { "texture": "#side", "cullface": "south" },
"west": { "texture": "#side", "cullface": "west" },
"east": { "texture": "#side", "cullface": "east" }
}
},
{
"from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"shade": false,
"faces": {
"north": { "texture": "#glow", "cullface": "north" }
}
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -0,0 +1,12 @@
{
"animation": {
"interpolate": true,
"frametime": 8,
"frames": [
0,
1,
2,
3
]
}
}