Fancy Furnace, better packet handling, config translations
@@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||
loader_version=0.11.1
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.1.0
|
||||
mod_version = 2.0.0
|
||||
maven_group = eu.midnightdust
|
||||
archives_base_name = visualoverhaul
|
||||
|
||||
|
||||
@@ -5,4 +5,5 @@ import net.minecraft.util.Identifier;
|
||||
public class VisualOverhaul {
|
||||
public static final Identifier UPDATE_POTION_BOTTLES = new Identifier("visualoverhaul", "brewingstand");
|
||||
public static final Identifier UPDATE_RECORD = new Identifier("visualoverhaul", "record");
|
||||
public static final Identifier UPDATE_FURNACE_ITEMS = new Identifier("visualoverhaul", "furnace");
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package eu.midnightdust.visualoverhaul;
|
||||
|
||||
import eu.midnightdust.visualoverhaul.block.JukeboxTop;
|
||||
import eu.midnightdust.visualoverhaul.block.renderer.BrewingStandBlockEntityRenderer;
|
||||
import eu.midnightdust.visualoverhaul.block.renderer.FurnaceBlockEntityRenderer;
|
||||
import eu.midnightdust.visualoverhaul.block.renderer.JukeboxBlockEntityRenderer;
|
||||
import eu.midnightdust.visualoverhaul.config.VOConfig;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
|
||||
@@ -17,6 +18,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.block.entity.BrewingStandBlockEntity;
|
||||
import net.minecraft.block.entity.FurnaceBlockEntity;
|
||||
import net.minecraft.block.entity.JukeboxBlockEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
@@ -27,8 +29,7 @@ import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
import static eu.midnightdust.visualoverhaul.VisualOverhaul.UPDATE_POTION_BOTTLES;
|
||||
import static eu.midnightdust.visualoverhaul.VisualOverhaul.UPDATE_RECORD;
|
||||
import static eu.midnightdust.visualoverhaul.VisualOverhaul.*;
|
||||
|
||||
public class VisualOverhaulClient implements ClientModInitializer {
|
||||
public static VOConfig VO_CONFIG;
|
||||
@@ -45,9 +46,11 @@ public class VisualOverhaulClient implements ClientModInitializer {
|
||||
|
||||
BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.JUKEBOX, RenderLayer.getCutout());
|
||||
BlockRenderLayerMapImpl.INSTANCE.putBlock(JukeBoxTop, RenderLayer.getCutout());
|
||||
BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.FURNACE, RenderLayer.getCutout());
|
||||
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.BREWING_STAND, BrewingStandBlockEntityRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.JUKEBOX, JukeboxBlockEntityRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.FURNACE, FurnaceBlockEntityRenderer::new);
|
||||
|
||||
Registry.ITEM.forEach((item) -> {
|
||||
if(item instanceof MusicDiscItem) {
|
||||
@@ -80,9 +83,24 @@ public class VisualOverhaulClient implements ClientModInitializer {
|
||||
blockEntity.setRecord(record);
|
||||
});
|
||||
});
|
||||
ClientSidePacketRegistryImpl.INSTANCE.register(UPDATE_FURNACE_ITEMS,
|
||||
(packetContext, attachedData) -> {
|
||||
BlockPos pos = attachedData.readBlockPos();
|
||||
DefaultedList<ItemStack> inv = DefaultedList.ofSize(3, ItemStack.EMPTY);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
inv.set(i, attachedData.readItemStack());
|
||||
}
|
||||
packetContext.getTaskQueue().execute(() -> {
|
||||
FurnaceBlockEntity blockEntity = (FurnaceBlockEntity)MinecraftClient.getInstance().world.getBlockEntity(pos);
|
||||
blockEntity.setStack(0,inv.get(0));
|
||||
blockEntity.setStack(1,inv.get(1));
|
||||
blockEntity.setStack(2,inv.get(2));
|
||||
});
|
||||
});
|
||||
|
||||
FabricLoader.getInstance().getModContainer("visualoverhaul").ifPresent(modContainer -> {
|
||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul:nobottles"), "resourcepacks/visualoverhaul", modContainer, true);
|
||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul:nobottles"), "resourcepacks/nobrewingbottles", modContainer, true);
|
||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("visualoverhaul:fancyfurnace"), "resourcepacks/fancyfurnace", modContainer, true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package eu.midnightdust.visualoverhaul.block.renderer;
|
||||
|
||||
import eu.midnightdust.visualoverhaul.VisualOverhaul;
|
||||
import eu.midnightdust.visualoverhaul.VisualOverhaulClient;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package eu.midnightdust.visualoverhaul.block.renderer;
|
||||
|
||||
import eu.midnightdust.visualoverhaul.VisualOverhaulClient;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.FurnaceBlockEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.client.render.VertexConsumer;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.WorldRenderer;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tag.ItemTags;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class FurnaceBlockEntityRenderer extends BlockEntityRenderer<FurnaceBlockEntity> {
|
||||
private static final ModelPart bb_main;
|
||||
private static final ModelPart cube_r1;
|
||||
private static final ModelPart cube_r2;
|
||||
private static final ModelPart cube_r3;
|
||||
|
||||
static {
|
||||
bb_main = new ModelPart(16, 16, 0, 0);
|
||||
bb_main.setPivot(0.0F, 24.0F, 0.0F);
|
||||
|
||||
cube_r1 = new ModelPart(16, 16, 0, 0);
|
||||
cube_r1.setPivot(6.0F, 1.0F, -2.0F);
|
||||
bb_main.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, -0.5672F, 0.0F);
|
||||
cube_r1.setTextureOffset(0, 0).addCuboid(-10.0F, -3.0F, 0.0F, 10.0F, 1.0F, 1.0F, 0.0F, false);
|
||||
|
||||
cube_r2 = new ModelPart(16, 16, 0, 0);
|
||||
cube_r2.setPivot(5.0F, 0.0F, -5.0F);
|
||||
bb_main.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, -0.1309F, 0.0F);
|
||||
cube_r2.setTextureOffset(0, 0).addCuboid(-10.0F, -2.5F, 0.0F, 10.0F, 2.0F, 2.0F, 0.0F, false);
|
||||
|
||||
cube_r3 = new ModelPart(16, 16, 0, 0);
|
||||
cube_r3.setPivot(5.0F, -1.0F, -7.0F);
|
||||
bb_main.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, 0.2618F, 0.0F);
|
||||
cube_r3.setTextureOffset(0, 0).addCuboid(-10.0F, -2.0F, 0.0F, 10.0F, 2.0F, 2.0F, 0.0F, false);
|
||||
}
|
||||
public static void setRotationAngle(ModelPart bone, float x, float y, float z) {
|
||||
bone.pitch = x;
|
||||
bone.yaw = y;
|
||||
bone.roll = z;
|
||||
}
|
||||
|
||||
public FurnaceBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(FurnaceBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
if (VisualOverhaulClient.VO_CONFIG.furnace) {
|
||||
BlockState blockState = blockEntity.getCachedState();
|
||||
int lightAtBlock = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().offset(blockState.get(AbstractFurnaceBlock.FACING)));
|
||||
ItemStack item1 = blockEntity.getStack(0);
|
||||
ItemStack item2 = blockEntity.getStack(1);
|
||||
float angle = (blockState.get(AbstractFurnaceBlock.FACING)).asRotation();
|
||||
|
||||
matrices.push();
|
||||
|
||||
matrices.translate(0.5f, 0.58f, 0.5f);
|
||||
matrices.scale(1f, 1f, 1f);
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle * 3 + 180));
|
||||
matrices.translate(0.0f, 0.0f, -0.4f);
|
||||
matrices.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(item1, ModelTransformation.Mode.GROUND, lightAtBlock, overlay, matrices, vertexConsumers);
|
||||
|
||||
|
||||
matrices.pop();
|
||||
if (!item2.getItem().isIn(ItemTags.LOGS_THAT_BURN) && !item2.getItem().isIn(ItemTags.PLANKS)) {
|
||||
matrices.push();
|
||||
|
||||
matrices.translate(0.5f, 0.08f, 0.5f);
|
||||
matrices.scale(1f, 1f, 1f);
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle * 3 + 180));
|
||||
matrices.translate(0.0f, 0.0f, -0.4f);
|
||||
matrices.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(90));
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(item2, ModelTransformation.Mode.GROUND, lightAtBlock, overlay, matrices, vertexConsumers);
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
if (item2.getItem().isIn(ItemTags.LOGS_THAT_BURN) || item2.getItem().isIn(ItemTags.PLANKS)) {
|
||||
matrices.push();
|
||||
BlockState state = Block.getBlockFromItem(item2.getItem()).getDefaultState();
|
||||
Sprite texture = MinecraftClient.getInstance().getBlockRenderManager().getModel(state).getSprite();
|
||||
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(spriteToTexture(texture)));
|
||||
|
||||
matrices.translate(0.5f, -1.3f, 0.5f);
|
||||
matrices.scale(1f, 1f, 1f);
|
||||
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle * 3 + 180));
|
||||
bb_main.render(matrices, vertexConsumer, lightAtBlock, overlay);
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public static Identifier spriteToTexture(Sprite sprite) {
|
||||
String texture = sprite.getId().getPath();
|
||||
return new Identifier(sprite.getId().getNamespace(), "textures/" + texture + ".png");
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,6 @@ package eu.midnightdust.visualoverhaul.config;
|
||||
|
||||
import me.sargunvohra.mcmods.autoconfig1u.ConfigData;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Config(name = "visualoverhaul")
|
||||
public class VOConfig implements ConfigData {
|
||||
@@ -13,4 +9,5 @@ public class VOConfig implements ConfigData {
|
||||
public boolean brewingstand = true;
|
||||
public boolean jukebox = true;
|
||||
public boolean jukebox_fake_block = true;
|
||||
public boolean furnace = true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package eu.midnightdust.visualoverhaul.mixin;
|
||||
|
||||
import eu.midnightdust.visualoverhaul.VisualOverhaul;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import net.fabricmc.fabric.api.server.PlayerStream;
|
||||
import net.fabricmc.fabric.impl.networking.ServerSidePacketRegistryImpl;
|
||||
import net.minecraft.block.entity.*;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Mixin(AbstractFurnaceBlockEntity.class)
|
||||
public abstract class MixinAbstractFurnaceBlockEntity extends LockableContainerBlockEntity {
|
||||
|
||||
@Shadow protected DefaultedList<ItemStack> inventory;
|
||||
Boolean invUpdate = true;
|
||||
int playerUpdate = -1;
|
||||
|
||||
private MixinAbstractFurnaceBlockEntity(BlockEntityType<?> blockEntityType) {
|
||||
super(blockEntityType);
|
||||
}
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "tick")
|
||||
public void tick(CallbackInfo ci) {
|
||||
if (!this.world.isClient && (invUpdate || world.getPlayers().size() == playerUpdate)) {
|
||||
Stream<PlayerEntity> watchingPlayers = PlayerStream.watching(world, getPos());
|
||||
PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer());
|
||||
passedData.writeBlockPos(pos);
|
||||
passedData.writeItemStack(inventory.get(0));
|
||||
passedData.writeItemStack(inventory.get(1));
|
||||
passedData.writeItemStack(inventory.get(2));
|
||||
|
||||
passedData.writeString(String.valueOf(inventory));
|
||||
watchingPlayers.forEach(player -> ServerSidePacketRegistryImpl.INSTANCE.sendToPlayer(player, VisualOverhaul.UPDATE_FURNACE_ITEMS, passedData));
|
||||
invUpdate = false;
|
||||
}
|
||||
playerUpdate = world.getPlayers().size();
|
||||
}
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "getStack", cancellable = true)
|
||||
public void getStack(int slot, CallbackInfoReturnable cir) {
|
||||
this.invUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -23,25 +23,17 @@ import java.util.stream.Stream;
|
||||
@Mixin(BrewingStandBlockEntity.class)
|
||||
public abstract class MixinBrewingStandBlockEntity extends LockableContainerBlockEntity {
|
||||
|
||||
|
||||
@Shadow private DefaultedList<ItemStack> inventory;
|
||||
public ItemStack item1;
|
||||
public ItemStack item2;
|
||||
public ItemStack item3;
|
||||
Boolean sendData = true;
|
||||
Boolean invUpdate = true;
|
||||
int playerUpdate = -1;
|
||||
|
||||
private MixinBrewingStandBlockEntity(BlockEntityType<?> blockEntityType) {
|
||||
super(blockEntityType);
|
||||
|
||||
}
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "tick")
|
||||
public void tick(CallbackInfo ci) {
|
||||
item1 = inventory.get(0);
|
||||
item2 = inventory.get(1);
|
||||
item3 = inventory.get(2);
|
||||
|
||||
if (!this.world.isClient) {
|
||||
if (!this.world.isClient && (invUpdate || world.getPlayers().size() == playerUpdate)) {
|
||||
Stream<PlayerEntity> watchingPlayers = PlayerStream.watching(world, getPos());
|
||||
PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer());
|
||||
passedData.writeBlockPos(pos);
|
||||
@@ -53,12 +45,13 @@ public abstract class MixinBrewingStandBlockEntity extends LockableContainerBloc
|
||||
|
||||
passedData.writeString(String.valueOf(inventory));
|
||||
watchingPlayers.forEach(player -> ServerSidePacketRegistryImpl.INSTANCE.sendToPlayer(player, VisualOverhaul.UPDATE_POTION_BOTTLES, passedData));
|
||||
sendData = false;
|
||||
invUpdate = false;
|
||||
}
|
||||
playerUpdate = world.getPlayers().size();
|
||||
}
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "getStack", cancellable = true)
|
||||
public void getStack(int slot, CallbackInfoReturnable cir) {
|
||||
this.sendData = true;
|
||||
this.invUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,30 +21,30 @@ import java.util.stream.Stream;
|
||||
@Mixin(JukeboxBlockEntity.class)
|
||||
public abstract class MixinJukeboxBlockEntity extends BlockEntity implements Tickable {
|
||||
|
||||
|
||||
@Shadow private ItemStack record;
|
||||
Boolean sendData = true;
|
||||
Boolean invUpdate = true;
|
||||
int playerUpdate = -1;
|
||||
|
||||
private MixinJukeboxBlockEntity(BlockEntityType<?> blockEntityType) {
|
||||
super(blockEntityType);
|
||||
|
||||
}
|
||||
|
||||
@Unique
|
||||
public void tick() {
|
||||
if (!this.world.isClient) {
|
||||
if (!this.world.isClient && (invUpdate || world.getPlayers().size() == playerUpdate)) {
|
||||
Stream<PlayerEntity> watchingPlayers = PlayerStream.watching(world, getPos());
|
||||
PacketByteBuf passedData = new PacketByteBuf(Unpooled.buffer());
|
||||
passedData.writeBlockPos(pos);
|
||||
passedData.writeItemStack(record);
|
||||
|
||||
watchingPlayers.forEach(player -> ServerSidePacketRegistryImpl.INSTANCE.sendToPlayer(player, VisualOverhaul.UPDATE_RECORD, passedData));
|
||||
sendData = false;
|
||||
invUpdate = false;
|
||||
}
|
||||
playerUpdate = world.getPlayers().size();
|
||||
}
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "getRecord", cancellable = true)
|
||||
public void getRecord(CallbackInfoReturnable cir) {
|
||||
this.sendData = true;
|
||||
this.invUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 12 KiB |
7
src/main/resources/assets/visualoverhaul/lang/en_us.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"text.autoconfig.visualoverhaul.title":"Visual Overhaul Config",
|
||||
"text.autoconfig.visualoverhaul.option.brewingstand":"Enable Brewing Stand Enhancements",
|
||||
"text.autoconfig.visualoverhaul.option.jukebox":"Enable Jukebox Enhancements",
|
||||
"text.autoconfig.visualoverhaul.option.jukebox_fake_block":"Enable fake block on jukebox top",
|
||||
"text.autoconfig.visualoverhaul.option.furnace":"Enable Furnace Enhancements"
|
||||
}
|
||||
@@ -33,6 +33,8 @@
|
||||
],
|
||||
|
||||
"depends": {
|
||||
"fabric": "*"
|
||||
"fabric": ">=0.28.4",
|
||||
"autoconfig1u": "*",
|
||||
"cloth-config2": "*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east,lit=false": {
|
||||
"model": "minecraft:block/furnace",
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,lit=true": {
|
||||
"model": "minecraft:block/furnace_on",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north,lit=false": {
|
||||
"model": "minecraft:block/furnace"
|
||||
},
|
||||
"facing=north,lit=true": {
|
||||
"model": "minecraft:block/furnace_on"
|
||||
},
|
||||
"facing=south,lit=false": {
|
||||
"model": "minecraft:block/furnace",
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,lit=true": {
|
||||
"model": "minecraft:block/furnace_on",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,lit=false": {
|
||||
"model": "minecraft:block/furnace",
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,lit=true": {
|
||||
"model": "minecraft:block/furnace_on",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/furnace_front_on",
|
||||
"material": "canvas:warm_glow"
|
||||
},
|
||||
{
|
||||
"sprite": "minecraft:block/campfire_fire",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"credit": "made by Motschen",
|
||||
"parent": "block/block",
|
||||
"textures": {
|
||||
"0": "block/furnace_front",
|
||||
"1": "block/furnace_side",
|
||||
"2": "block/furnace_top",
|
||||
"3": "block/smooth_stone",
|
||||
"4": "block/furnace_front",
|
||||
"5": "block/campfire_fire",
|
||||
"particle": "block/furnace_front"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 6],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#4"},
|
||||
"east": {"uv": [0, 0, 10, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||
"west": {"uv": [6, 0, 16, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 6, 16, 16], "texture": "#2"},
|
||||
"down": {"uv": [0, 0, 16, 10], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13, 0, 0],
|
||||
"to": [16, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 3, 16], "texture": "#0"},
|
||||
"east": {"uv": [10, 0, 16, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 6, 16], "texture": "#1"},
|
||||
"up": {"uv": [13, 0, 16, 6], "texture": "#2"},
|
||||
"down": {"uv": [13, 10, 16, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [12, 11, 0],
|
||||
"to": [13, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [5, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 0, 4, 5], "texture": "#0"},
|
||||
"west": {"uv": [1, 9, 7, 14], "texture": "#1"},
|
||||
"up": {"uv": [12, 0, 13, 6], "texture": "#2"},
|
||||
"down": {"uv": [12, 10, 13, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 11, 0],
|
||||
"to": [4, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-4, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 0, 4, 5], "texture": "#0"},
|
||||
"east": {"uv": [1, 9, 7, 14], "texture": "#1"},
|
||||
"west": {"uv": [1, 8, 7, 13], "texture": "#1"},
|
||||
"up": {"uv": [12, 0, 13, 6], "texture": "#2"},
|
||||
"down": {"uv": [3, 10, 4, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 12, 0],
|
||||
"to": [12, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [3, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 0, 12, 4], "texture": "#0"},
|
||||
"up": {"uv": [4, 0, 12, 6], "texture": "#2"},
|
||||
"down": {"uv": [4, 10, 12, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [3, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-5, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [13, 0, 16, 16], "texture": "#0"},
|
||||
"east": {"uv": [10, 0, 16, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 6, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 3, 6], "texture": "#2"},
|
||||
"down": {"uv": [0, 10, 3, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [12, 3, 0],
|
||||
"to": [13, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [5, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 7, 4, 13], "texture": "#0"},
|
||||
"west": {"uv": [1, 8, 7, 14], "texture": "#1"},
|
||||
"up": {"uv": [3, 0, 4, 6], "texture": "#2"},
|
||||
"down": {"uv": [3, 10, 4, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 3, 0],
|
||||
"to": [4, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-4, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [12, 7, 13, 13], "texture": "#0"},
|
||||
"east": {"uv": [9, 8, 15, 14], "texture": "#1"},
|
||||
"up": {"uv": [12, 0, 13, 6], "texture": "#2"},
|
||||
"down": {"uv": [12, 10, 13, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [11, 4, 0],
|
||||
"to": [12, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [4, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 7, 5, 12], "texture": "#0"},
|
||||
"west": {"uv": [1, 9, 7, 14], "texture": "#1"},
|
||||
"up": {"uv": [4, 0, 5, 6], "texture": "#2"},
|
||||
"down": {"uv": [4, 10, 5, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 4, 0],
|
||||
"to": [5, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-3, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [11, 7, 12, 12], "texture": "#0"},
|
||||
"east": {"uv": [10, 9, 16, 14], "texture": "#1"},
|
||||
"up": {"uv": [11, 0, 12, 6], "texture": "#2"},
|
||||
"down": {"uv": [11, 10, 12, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [5, 5, 0],
|
||||
"to": [11, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [3, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [5, 7, 11, 11], "texture": "#0"},
|
||||
"up": {"uv": [5, 0, 11, 6], "texture": "#2"},
|
||||
"down": {"uv": [5, 10, 11, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 0, 0],
|
||||
"to": [13, 1, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [5, 5, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 15, 13, 16], "texture": "#0"},
|
||||
"up": {"uv": [3, 0, 13, 6], "texture": "#2"},
|
||||
"down": {"uv": [3, 10, 13, 16], "texture": "#3"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"credit": "made by Motschen",
|
||||
"parent": "block/block",
|
||||
"textures": {
|
||||
"0": "block/furnace_front",
|
||||
"1": "block/furnace_side",
|
||||
"2": "block/furnace_top",
|
||||
"3": "block/smooth_stone",
|
||||
"4": "block/furnace_front_on",
|
||||
"5": "block/campfire_fire",
|
||||
"particle": "block/furnace_front"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 6],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#4"},
|
||||
"east": {"uv": [0, 0, 10, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||
"west": {"uv": [6, 0, 16, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 6, 16, 16], "texture": "#2"},
|
||||
"down": {"uv": [0, 0, 16, 10], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13, 0, 0],
|
||||
"to": [16, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 3, 16], "texture": "#0"},
|
||||
"east": {"uv": [10, 0, 16, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 6, 16], "texture": "#1"},
|
||||
"up": {"uv": [13, 0, 16, 6], "texture": "#2"},
|
||||
"down": {"uv": [13, 10, 16, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [12, 11, 0],
|
||||
"to": [13, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [5, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 0, 4, 5], "texture": "#0"},
|
||||
"west": {"uv": [1, 9, 7, 14], "texture": "#1"},
|
||||
"up": {"uv": [12, 0, 13, 6], "texture": "#2"},
|
||||
"down": {"uv": [12, 10, 13, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 11, 0],
|
||||
"to": [4, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-4, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 0, 4, 5], "texture": "#0"},
|
||||
"east": {"uv": [1, 9, 7, 14], "texture": "#1"},
|
||||
"west": {"uv": [1, 8, 7, 13], "texture": "#1"},
|
||||
"up": {"uv": [12, 0, 13, 6], "texture": "#2"},
|
||||
"down": {"uv": [3, 10, 4, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 12, 0],
|
||||
"to": [12, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [3, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 0, 12, 4], "texture": "#0"},
|
||||
"up": {"uv": [4, 0, 12, 6], "texture": "#2"},
|
||||
"down": {"uv": [4, 10, 12, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [3, 16, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-5, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [13, 0, 16, 16], "texture": "#0"},
|
||||
"east": {"uv": [10, 0, 16, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 6, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 3, 6], "texture": "#2"},
|
||||
"down": {"uv": [0, 10, 3, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [12, 3, 0],
|
||||
"to": [13, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [5, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 7, 4, 13], "texture": "#0"},
|
||||
"west": {"uv": [1, 8, 7, 14], "texture": "#1"},
|
||||
"up": {"uv": [3, 0, 4, 6], "texture": "#2"},
|
||||
"down": {"uv": [3, 10, 4, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 3, 0],
|
||||
"to": [4, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-4, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [12, 7, 13, 13], "texture": "#0"},
|
||||
"east": {"uv": [9, 8, 15, 14], "texture": "#1"},
|
||||
"up": {"uv": [12, 0, 13, 6], "texture": "#2"},
|
||||
"down": {"uv": [12, 10, 13, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [11, 4, 0],
|
||||
"to": [12, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [4, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 7, 5, 12], "texture": "#0"},
|
||||
"west": {"uv": [1, 9, 7, 14], "texture": "#1"},
|
||||
"up": {"uv": [4, 0, 5, 6], "texture": "#2"},
|
||||
"down": {"uv": [4, 10, 5, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 4, 0],
|
||||
"to": [5, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-3, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [11, 7, 12, 12], "texture": "#0"},
|
||||
"east": {"uv": [10, 9, 16, 14], "texture": "#1"},
|
||||
"up": {"uv": [11, 0, 12, 6], "texture": "#2"},
|
||||
"down": {"uv": [11, 10, 12, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [5, 5, 0],
|
||||
"to": [11, 9, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [3, 8, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [5, 7, 11, 11], "texture": "#0"},
|
||||
"up": {"uv": [5, 0, 11, 6], "texture": "#2"},
|
||||
"down": {"uv": [5, 10, 11, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 0, 0],
|
||||
"to": [13, 1, 6],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [5, 5, -2]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 15, 13, 16], "texture": "#0"},
|
||||
"up": {"uv": [3, 0, 13, 6], "texture": "#2"},
|
||||
"down": {"uv": [3, 10, 13, 16], "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 1, 2],
|
||||
"to": [12, 3, 2],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [14, 9, 10]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 0, 12, 2], "texture": "#5"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 6,
|
||||
"description": "§2Changes the model of the furnace to be 3D"
|
||||
}
|
||||
}
|
||||
BIN
src/main/resources/resourcepacks/fancyfurnace/pack.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 710 B |
@@ -4,7 +4,8 @@
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
"MixinBrewingStandBlockEntity",
|
||||
"MixinJukeboxBlockEntity"
|
||||
"MixinJukeboxBlockEntity",
|
||||
"MixinAbstractFurnaceBlockEntity"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
||||