fix: workshop -> wokstation + custom model & texture + ao=off
Some checks failed
Build / build (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
This commit is contained in:
parent
8a5d79280c
commit
33e659fa47
13 changed files with 209 additions and 37 deletions
|
@ -2,7 +2,7 @@ package fr.sushi.charmsnfabrics.client;
|
|||
|
||||
import fr.sushi.charmsnfabrics.CharmsAndFabrics;
|
||||
import fr.sushi.charmsnfabrics.client.model.FlowerCrownModel;
|
||||
import fr.sushi.charmsnfabrics.client.renderer.FloralWorkshopRenderer;
|
||||
import fr.sushi.charmsnfabrics.client.renderer.FloralWorkstationRenderer;
|
||||
import fr.sushi.charmsnfabrics.client.renderer.FlowerCrownRenderer;
|
||||
import fr.sushi.charmsnfabrics.common.CharmsAndFabricRegistries;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
|
@ -48,6 +48,6 @@ public class CharmsFabricsClient
|
|||
{
|
||||
event.registerBlockEntityRenderer(
|
||||
CharmsAndFabricRegistries.Entities.FLORAL_BLOCK_ENTITY.get(),
|
||||
FloralWorkshopRenderer::new);
|
||||
FloralWorkstationRenderer::new);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import fr.sushi.charmsnfabrics.CharmsAndFabrics;
|
|||
import fr.sushi.charmsnfabrics.client.CharmsAndFabricsLayers;
|
||||
import fr.sushi.charmsnfabrics.client.model.FlowerCrownModel;
|
||||
import fr.sushi.charmsnfabrics.common.entities.block.FloralWorkshopBlockEntity;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
|
||||
|
@ -14,11 +13,11 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
|||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public class FloralWorkshopRenderer implements BlockEntityRenderer<FloralWorkshopBlockEntity>
|
||||
public class FloralWorkstationRenderer implements BlockEntityRenderer<FloralWorkshopBlockEntity>
|
||||
{
|
||||
private final FlowerCrownModel model;
|
||||
|
||||
public FloralWorkshopRenderer(BlockEntityRendererProvider.Context ctx)
|
||||
public FloralWorkstationRenderer(BlockEntityRendererProvider.Context ctx)
|
||||
{
|
||||
this.model = new FlowerCrownModel(
|
||||
ctx.bakeLayer(CharmsAndFabricsLayers.CROWN_LAYER));
|
|
@ -1,7 +1,7 @@
|
|||
package fr.sushi.charmsnfabrics.common;
|
||||
|
||||
import fr.sushi.charmsnfabrics.CharmsAndFabrics;
|
||||
import fr.sushi.charmsnfabrics.common.block.FloralWorkshop;
|
||||
import fr.sushi.charmsnfabrics.common.block.FloralWorkstation;
|
||||
import fr.sushi.charmsnfabrics.common.entities.block.FloralWorkshopBlockEntity;
|
||||
import fr.sushi.charmsnfabrics.common.item.FlowerCrown;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
|
@ -34,23 +34,24 @@ public class CharmsAndFabricRegistries
|
|||
(properties) -> new FlowerCrown(
|
||||
properties.stacksTo(1)));
|
||||
/* BlockItems */
|
||||
public static final DeferredItem<BlockItem> FLORAL_WORKSHOP =
|
||||
ITEMS.registerItem("floral_workshop",
|
||||
public static final DeferredItem<BlockItem> FLORAL_WORKSTATION =
|
||||
ITEMS.registerItem("floral_workstation",
|
||||
properties -> new BlockItem(
|
||||
Blocks.FLORAL_WORKSHOP.get(), properties));
|
||||
Blocks.FLORAL_WORKSTATION.get(), properties));
|
||||
}
|
||||
|
||||
public static class Blocks
|
||||
{
|
||||
public static final DeferredRegister.Blocks BLOCKS =
|
||||
DeferredRegister.createBlocks(CharmsAndFabrics.MODID);
|
||||
public static final DeferredBlock<Block> FLORAL_WORKSHOP =
|
||||
BLOCKS.register("floral_workshop",
|
||||
registry_name -> new FloralWorkshop(
|
||||
public static final DeferredBlock<Block> FLORAL_WORKSTATION =
|
||||
BLOCKS.register("floral_workstation",
|
||||
registry_name -> new FloralWorkstation(
|
||||
BlockBehaviour.Properties.of()
|
||||
.setId(ResourceKey.create(
|
||||
Registries.BLOCK,
|
||||
registry_name))));
|
||||
registry_name))
|
||||
.noOcclusion()));
|
||||
}
|
||||
|
||||
public static class Tabs
|
||||
|
@ -74,7 +75,7 @@ public class CharmsAndFabricRegistries
|
|||
output.accept(
|
||||
Items.FLOWER_CROWN.get());
|
||||
output.accept(
|
||||
Blocks.FLORAL_WORKSHOP.toStack());
|
||||
Blocks.FLORAL_WORKSTATION.toStack());
|
||||
}).build());
|
||||
}
|
||||
|
||||
|
@ -89,7 +90,7 @@ public class CharmsAndFabricRegistries
|
|||
BLOCK_ENTITY_TYPES.register("floral_block_entity",
|
||||
() -> new BlockEntityType<>(
|
||||
FloralWorkshopBlockEntity::new,
|
||||
Set.of(Blocks.FLORAL_WORKSHOP.get())));
|
||||
Set.of(Blocks.FLORAL_WORKSTATION.get())));
|
||||
}
|
||||
|
||||
public static void register(IEventBus bus)
|
||||
|
|
|
@ -8,9 +8,9 @@ import net.minecraft.world.level.block.entity.BlockEntity;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class FloralWorkshop extends Block implements EntityBlock
|
||||
public class FloralWorkstation extends Block implements EntityBlock
|
||||
{
|
||||
public FloralWorkshop(Properties properties)
|
||||
public FloralWorkstation(Properties properties)
|
||||
{
|
||||
super(properties);
|
||||
}
|
||||
|
@ -20,4 +20,6 @@ public class FloralWorkshop extends Block implements EntityBlock
|
|||
{
|
||||
return new FloralWorkshopBlockEntity(pos, state);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "charmsnfabrics:block/floral_workshop"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "charmsnfabrics:block/floral_workstation"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "charmsnfabrics:block/floral_workshop"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "charmsnfabrics:block/floral_workstation"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"itemGroup.charmsnfabrics": "Charms & Fabrics",
|
||||
"item.charmsnfabrics.flower_crown": "Flower Crown",
|
||||
"item.charmsnfabrics.floral_workshop": "Floral Workshop",
|
||||
"item.charmsnfabrics.floral_workstation": "Floral Workstation",
|
||||
|
||||
"charmsnfabrics.configuration.title": "Charms & Fabrics Configs",
|
||||
"charmsnfabrics.configuration.section.charmsnfabrics.common.toml": "Charms & Fabrics Configs",
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "charmsnfabrics:block/floral_workshop"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,176 @@
|
|||
{
|
||||
"format_version": "1.21.6",
|
||||
"credit": "Made with Blockbench",
|
||||
"texture_size": [64, 64],
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures": {
|
||||
"0": "charmsnfabrics:block/floral_workstation",
|
||||
"particle": "minecraft:block/oak_planks"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [1, 0, 1],
|
||||
"to": [3, 12, 3],
|
||||
"faces": {
|
||||
"north": {"uv": [0.5, 12.5, 1, 15.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 12.5, 0.5, 15.5], "texture": "#0"},
|
||||
"south": {"uv": [1.5, 12.5, 2, 15.5], "texture": "#0"},
|
||||
"west": {"uv": [1, 12.5, 1.5, 15.5], "texture": "#0"},
|
||||
"up": {"uv": [1, 12.5, 0.5, 12], "texture": "#0"},
|
||||
"down": {"uv": [1.5, 12, 1, 12.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [1, 0, 13],
|
||||
"to": [3, 12, 15],
|
||||
"faces": {
|
||||
"north": {"uv": [0.5, 12.5, 1, 15.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 12.5, 0.5, 15.5], "texture": "#0"},
|
||||
"south": {"uv": [1.5, 12.5, 2, 15.5], "texture": "#0"},
|
||||
"west": {"uv": [1, 12.5, 1.5, 15.5], "texture": "#0"},
|
||||
"up": {"uv": [1, 12.5, 0.5, 12], "texture": "#0"},
|
||||
"down": {"uv": [1.5, 12, 1, 12.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13, 0, 13],
|
||||
"to": [15, 12, 15],
|
||||
"faces": {
|
||||
"north": {"uv": [0.5, 12.5, 1, 15.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 12.5, 0.5, 15.5], "texture": "#0"},
|
||||
"south": {"uv": [1.5, 12.5, 2, 15.5], "texture": "#0"},
|
||||
"west": {"uv": [1, 12.5, 1.5, 15.5], "texture": "#0"},
|
||||
"up": {"uv": [1, 12.5, 0.5, 12], "texture": "#0"},
|
||||
"down": {"uv": [1.5, 12, 1, 12.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13, 0, 1],
|
||||
"to": [15, 12, 3],
|
||||
"faces": {
|
||||
"north": {"uv": [0.5, 12.5, 1, 15.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 12.5, 0.5, 15.5], "texture": "#0"},
|
||||
"south": {"uv": [1.5, 12.5, 2, 15.5], "texture": "#0"},
|
||||
"west": {"uv": [1, 12.5, 1.5, 15.5], "texture": "#0"},
|
||||
"up": {"uv": [1, 12.5, 0.5, 12], "texture": "#0"},
|
||||
"down": {"uv": [1.5, 12, 1, 12.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 12, 0],
|
||||
"to": [16, 14, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [4, 15.5, 8, 16], "texture": "#0"},
|
||||
"east": {"uv": [0, 15.5, 4, 16], "texture": "#0"},
|
||||
"south": {"uv": [12, 15.5, 16, 16], "texture": "#0"},
|
||||
"west": {"uv": [8, 15.5, 12, 16], "texture": "#0"},
|
||||
"up": {"uv": [8, 15.5, 4, 11.5], "texture": "#0"},
|
||||
"down": {"uv": [12, 11.5, 8, 15.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2, 2, 2],
|
||||
"to": [14, 3, 14],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 11.25, 6, 11.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 11.25, 3, 11.5], "texture": "#0"},
|
||||
"south": {"uv": [9, 11.25, 12, 11.5], "texture": "#0"},
|
||||
"west": {"uv": [6, 11.25, 9, 11.5], "texture": "#0"},
|
||||
"up": {"uv": [6, 11.25, 3, 8.25], "texture": "#0"},
|
||||
"down": {"uv": [9, 8.25, 6, 11.25], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 14, 3],
|
||||
"to": [13, 15, 13],
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 8, 5, 8.25], "texture": "#0"},
|
||||
"east": {"uv": [0, 8, 2.5, 8.25], "texture": "#0"},
|
||||
"south": {"uv": [7.5, 8, 10, 8.25], "texture": "#0"},
|
||||
"west": {"uv": [5, 8, 7.5, 8.25], "texture": "#0"},
|
||||
"up": {"uv": [5, 8, 2.5, 5.5], "texture": "#0"},
|
||||
"down": {"uv": [7.5, 5.5, 5, 8], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 14.25, 0],
|
||||
"to": [16, 14.25, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [7.5, 8, 11.5, 8], "texture": "#0"},
|
||||
"east": {"uv": [3.5, 8, 7.5, 8], "texture": "#0"},
|
||||
"south": {"uv": [15.5, 8, 19.5, 8], "texture": "#0"},
|
||||
"west": {"uv": [11.5, 8, 15.5, 8], "texture": "#0"},
|
||||
"up": {"uv": [11.5, 8, 7.5, 4], "texture": "#0"},
|
||||
"down": {"uv": [15.5, 4, 11.5, 8], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, -0.25],
|
||||
"to": [8, 14, -0.25],
|
||||
"faces": {
|
||||
"north": {"uv": [12, 8, 14, 11.5], "texture": "#0"},
|
||||
"east": {"uv": [12, 8, 12, 11.5], "texture": "#0"},
|
||||
"south": {"uv": [14, 8, 16, 11.5], "texture": "#0"},
|
||||
"west": {"uv": [14, 8, 14, 11.5], "texture": "#0"},
|
||||
"up": {"uv": [14, 8, 12, 8], "texture": "#0"},
|
||||
"down": {"uv": [16, 8, 14, 8], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [8, 0, 16.25],
|
||||
"to": [16, 14, 16.25],
|
||||
"faces": {
|
||||
"north": {"uv": [12, 11.5, 14, 15], "texture": "#0"},
|
||||
"east": {"uv": [12, 11.5, 12, 15], "texture": "#0"},
|
||||
"south": {"uv": [14, 11.5, 16, 15], "texture": "#0"},
|
||||
"west": {"uv": [14, 11.5, 14, 15], "texture": "#0"},
|
||||
"up": {"uv": [14, 11.5, 12, 11.5], "texture": "#0"},
|
||||
"down": {"uv": [16, 11.5, 14, 11.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 3, 3],
|
||||
"to": [9, 5, 8],
|
||||
"faces": {
|
||||
"north": {"uv": [1.75, 3.5, 3, 4], "texture": "#0"},
|
||||
"east": {"uv": [0.5, 3.5, 1.75, 4], "texture": "#0"},
|
||||
"south": {"uv": [4.25, 3.5, 5.5, 4], "texture": "#0"},
|
||||
"west": {"uv": [3, 3.5, 4.25, 4], "texture": "#0"},
|
||||
"up": {"uv": [3, 3.5, 1.75, 2.25], "texture": "#0"},
|
||||
"down": {"uv": [4.25, 2.25, 3, 3.5], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 3, 9],
|
||||
"to": [12, 5, 13],
|
||||
"faces": {
|
||||
"north": {"uv": [1, 5, 3, 5.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 5, 1, 5.5], "texture": "#0"},
|
||||
"south": {"uv": [4, 5, 6, 5.5], "texture": "#0"},
|
||||
"west": {"uv": [3, 5, 4, 5.5], "texture": "#0"},
|
||||
"up": {"uv": [3, 5, 1, 4], "texture": "#0"},
|
||||
"down": {"uv": [5, 4, 3, 5], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"groups": [
|
||||
{
|
||||
"name": "legs",
|
||||
"origin": [8, 8, 8],
|
||||
"color": 0,
|
||||
"children": [0, 1, 2, 3]
|
||||
},
|
||||
{
|
||||
"name": "station",
|
||||
"origin": [8, 8, 8],
|
||||
"color": 0,
|
||||
"children": [4, 5, 6]
|
||||
},
|
||||
{
|
||||
"name": "decoration",
|
||||
"origin": [8, 8, 8],
|
||||
"color": 0,
|
||||
"children": [7, 8, 9, 10, 11]
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 99 B |
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Loading…
Add table
Add a link
Reference in a new issue