mirror of
https://github.com/TeamMidnightDust/Decorative.git
synced 2025-12-15 12:35:10 +01:00
Decorative 4.0.0 - Clock Update
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,6 +1,11 @@
|
||||
# gradle
|
||||
|
||||
.gradle/
|
||||
build/classes/
|
||||
build/generated/
|
||||
build/libs/
|
||||
build/resources/
|
||||
build/tmp/
|
||||
out/
|
||||
classes/
|
||||
|
||||
|
||||
19
build.gradle
19
build.gradle
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.4-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.5-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ minecraft {
|
||||
repositories {
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url "https://maven.blamejared.com" }
|
||||
maven { url "https://maven.terraformersmc.com/releases" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -27,9 +28,19 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
modCompile("vazkii.patchouli:Patchouli:${project.patchouli_version}")
|
||||
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
|
||||
// You may need to force-disable transitiveness on them.
|
||||
modCompile("vazkii.patchouli:Patchouli:${project.patchouli_version}"){
|
||||
exclude module: "fabric-api"
|
||||
}
|
||||
|
||||
modImplementation ("me.sargunvohra.mcmods:autoconfig1u:${project.auto_config_version}"){
|
||||
exclude module: "fabric-api"
|
||||
}
|
||||
modImplementation ("me.shedaniel.cloth:config-2:${project.cloth_config_version}"){
|
||||
exclude module: "fabric-api"
|
||||
}
|
||||
modImplementation ("com.terraformersmc:modmenu:${project.mod_menu_version}"){
|
||||
exclude module: "fabric-api"
|
||||
}
|
||||
|
||||
modImplementation "eu.midnightdust:midnight-hats:${midnighthats_version}"
|
||||
include "eu.midnightdust:midnight-hats:${midnighthats_version}"
|
||||
|
||||
Binary file not shown.
BIN
build/loom-cache/midnight-hats-2.0.1.jar
Normal file
BIN
build/loom-cache/midnight-hats-2.0.1.jar
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
v1 named intermediary
|
||||
@@ -0,0 +1 @@
|
||||
v1 named intermediary
|
||||
@@ -1,19 +1,23 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.16.2
|
||||
yarn_mappings=1.16.2+build.6
|
||||
loader_version=0.9.1+build.205
|
||||
minecraft_version=1.16.4
|
||||
yarn_mappings=1.16.4+build.9
|
||||
loader_version=0.10.8
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 3.0.0
|
||||
mod_version = 4.0.0
|
||||
maven_group = eu.midnightdust.motschen
|
||||
archives_base_name = decorative
|
||||
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
fabric_version=0.17.2+build.396-1.16
|
||||
patchouli_version=1.16-40-FABRIC
|
||||
midnighthats_version=1.0.2
|
||||
fabric_version=0.30.0+1.16
|
||||
patchouli_version=1.16.4-48-FABRIC
|
||||
midnighthats_version=2.0.1
|
||||
|
||||
auto_config_version = 3.3.1
|
||||
cloth_config_version = 4.8.3
|
||||
mod_menu_version = 1.16.5
|
||||
|
||||
@@ -64,17 +64,15 @@ public class DecorativeClient implements ClientModInitializer {
|
||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.ChristmasTree);
|
||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.CeilingFan);
|
||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.SlidingDoor);
|
||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(),DecorativeMain.WallClock);
|
||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getTranslucent(),DecorativeMain.BirdBath);
|
||||
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.CeilingFanBlockEntity, CeilingFanRenderer::new);
|
||||
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.OakChoppingLogBlockEntity, OakChoppingLogBlockEntityRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.SpruceChoppingLogBlockEntity, SpruceChoppingLogBlockEntityRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.BirchChoppingLogBlockEntity, BirchChoppingLogBlockEntityRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.AcaciaChoppingLogBlockEntity, AcaciaChoppingLogBlockEntityRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.JungleChoppingLogBlockEntity, JungleChoppingLogBlockEntityRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.DarkOakChoppingLogBlockEntity, DarkOakChoppingLogBlockEntityRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.ChoppingLogBlockEntity, ChoppingLogBlockEntityRenderer::new);
|
||||
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.WallClockBlockEntity, WallClockRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(BlockEntities.DigitalClockBlockEntity, DigitalClockRenderer::new);
|
||||
}
|
||||
public void registerBlockColor(Block block, Block templateBlock) {
|
||||
ColorProviderRegistry.BLOCK.register((type, pos, world, layer) -> {
|
||||
|
||||
@@ -5,9 +5,13 @@ import eu.midnightdust.motschen.decorative.blockstates.CeilingFanStage;
|
||||
import eu.midnightdust.motschen.decorative.blockstates.Part;
|
||||
import eu.midnightdust.motschen.decorative.blockstates.PoolShape;
|
||||
import eu.midnightdust.motschen.decorative.blockstates.Program;
|
||||
import eu.midnightdust.motschen.decorative.config.DecorativeConfig;
|
||||
import eu.midnightdust.motschen.decorative.init.*;
|
||||
import eu.midnightdust.motschen.decorative.sound.DecorativeSoundEvents;
|
||||
import eu.midnightdust.motschen.decorative.world.OreFeatureInjector;
|
||||
import eu.midnightdust.motschen.decorative.world.OreFeatures;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.serializer.JanksonConfigSerializer;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
@@ -20,6 +24,7 @@ import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class DecorativeMain implements ModInitializer {
|
||||
public static final String MOD_ID = "decorative";
|
||||
public static DecorativeConfig DECORATIVE_CONFIG;
|
||||
|
||||
public static final ItemGroup IndoorGroup = FabricItemGroupBuilder.build(new Identifier(MOD_ID, "indoor"), () -> new ItemStack(DecorativeMain.Television));
|
||||
public static final ItemGroup TrafficGroup = FabricItemGroupBuilder.build(new Identifier(MOD_ID, "traffic"), () -> new ItemStack(DecorativeMain.TrafficCone));
|
||||
@@ -47,9 +52,14 @@ public class DecorativeMain implements ModInitializer {
|
||||
public static Block ChristmasTree = new ChristmasTree();
|
||||
public static Block ChristmasLights = new ChristmasLights();
|
||||
public static Block ShowerHead = new ShowerHead();
|
||||
public static Block WallClock = new WallClock();
|
||||
public static Block StonePath = new StonePath();
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
AutoConfig.register(DecorativeConfig.class, JanksonConfigSerializer::new);
|
||||
DECORATIVE_CONFIG = AutoConfig.getConfigHolder(DecorativeConfig.class).getConfig();
|
||||
|
||||
BlockEntities.init();
|
||||
// Traffic //
|
||||
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"rocky_asphalt"), RockyAsphalt);
|
||||
@@ -71,6 +81,8 @@ public class DecorativeMain implements ModInitializer {
|
||||
Signs.init();
|
||||
|
||||
//Garden//
|
||||
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"stone_path"), StonePath);
|
||||
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"stone_path"), new BlockItem(StonePath, new Item.Settings().group(DecorativeMain.GardenGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"bird_bath"), BirdBath);
|
||||
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"bird_bath"), new BlockItem(BirdBath, new Item.Settings().group(DecorativeMain.GardenGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"water_pump"), WaterPump);
|
||||
@@ -81,6 +93,8 @@ public class DecorativeMain implements ModInitializer {
|
||||
//Furniture//
|
||||
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"kitchen_tiles"), KitchenTiles);
|
||||
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"kitchen_tiles"), new BlockItem(KitchenTiles, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"wall_clock"), WallClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"wall_clock"), new BlockItem(WallClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"television"), Television);
|
||||
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"television"), new BlockItem(Television, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"old_television"), OldTelevision);
|
||||
@@ -98,7 +112,9 @@ public class DecorativeMain implements ModInitializer {
|
||||
|
||||
Lamps.init();
|
||||
DoubleLamps.init();
|
||||
Clocks.init();
|
||||
OreFeatures.init();
|
||||
OreFeatureInjector.init();
|
||||
new DecorativeSoundEvents();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.AcaciaChoppingLogBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class AcaciaChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
|
||||
public AcaciaChoppingLog() {
|
||||
super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
.with(FACING, itemPlacementContext.getPlayerFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) {
|
||||
return !worldView.isAir(pos.down());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView view) {
|
||||
return new AcaciaChoppingLogBlockEntity();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.BirchChoppingLogBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class BirchChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
|
||||
public BirchChoppingLog() {
|
||||
super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
.with(FACING, itemPlacementContext.getPlayerFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) {
|
||||
return !worldView.isAir(pos.down());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView view) {
|
||||
return new BirchChoppingLogBlockEntity();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.OakChoppingLogBlockEntity;
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.ChoppingLogBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
@@ -12,9 +12,9 @@ import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class OakChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
public class ChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
|
||||
public OakChoppingLog() {
|
||||
public ChoppingLog() {
|
||||
super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class OakChoppingLog extends HorizontalFacingBlock implements BlockEntity
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView view) {
|
||||
return new OakChoppingLogBlockEntity();
|
||||
return new ChoppingLogBlockEntity();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.DarkOakChoppingLogBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class DarkOakChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
|
||||
public DarkOakChoppingLog() {
|
||||
super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
.with(FACING, itemPlacementContext.getPlayerFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) {
|
||||
return !worldView.isAir(pos.down());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView view) {
|
||||
return new DarkOakChoppingLogBlockEntity();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.DigitalClockBlockEntity;
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.WallClockBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
public class DigitalClock extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
private static final VoxelShape NORTH_SHAPE;
|
||||
private static final VoxelShape EAST_SHAPE;
|
||||
private static final VoxelShape SOUTH_SHAPE;
|
||||
private static final VoxelShape WEST_SHAPE;
|
||||
|
||||
public DigitalClock() {
|
||||
super(FabricBlockSettings.copy(Blocks.SMOOTH_QUARTZ).nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView view) {
|
||||
return new DigitalClockBlockEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
.with(FACING, itemPlacementContext.getPlayerFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
case NORTH: return NORTH_SHAPE;
|
||||
case EAST: return EAST_SHAPE;
|
||||
case SOUTH: return SOUTH_SHAPE;
|
||||
case WEST: return WEST_SHAPE;
|
||||
default: return super.getOutlineShape(state, view, pos, context);
|
||||
}
|
||||
}
|
||||
static {
|
||||
VoxelShape shape = createCuboidShape(1, 0, 5, 15, 8, 13);
|
||||
|
||||
NORTH_SHAPE = shape;
|
||||
WEST_SHAPE = rotate(Direction.EAST, Direction.NORTH, shape);
|
||||
EAST_SHAPE = rotate(Direction.EAST, Direction.SOUTH, shape);
|
||||
SOUTH_SHAPE = rotate(Direction.EAST, Direction.WEST, shape);
|
||||
}
|
||||
private static VoxelShape rotate(Direction from, Direction to, VoxelShape shape) {
|
||||
VoxelShape[] buffer = new VoxelShape[]{ shape, VoxelShapes.empty() };
|
||||
|
||||
int times = (to.getHorizontal() - from.getHorizontal() + 4) % 4;
|
||||
for (int i = 0; i < times; i++) {
|
||||
buffer[0].forEachBox((minX, minY, minZ, maxX, maxY, maxZ) -> buffer[1] = VoxelShapes.union(buffer[1], VoxelShapes.cuboid(1-maxZ, minY, minX, 1-minZ, maxY, maxX)));
|
||||
buffer[0] = buffer[1];
|
||||
buffer[1] = VoxelShapes.empty();
|
||||
}
|
||||
|
||||
return buffer[0];
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.JungleChoppingLogBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class JungleChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
|
||||
public JungleChoppingLog() {
|
||||
super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
.with(FACING, itemPlacementContext.getPlayerFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) {
|
||||
return !worldView.isAir(pos.down());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView view) {
|
||||
return new JungleChoppingLogBlockEntity();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public class OldTelevision extends HorizontalFacingBlock {
|
||||
private static final EnumProperty<Program> PROGRAM = DecorativeMain.PROGRAM;
|
||||
|
||||
public OldTelevision() {
|
||||
super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE).lightLevel(createLightLevelFromBlockState(15)));
|
||||
super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE).luminance(createLightLevelFromBlockState()));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH).with(PROGRAM, Program.OFF));
|
||||
}
|
||||
|
||||
@@ -45,10 +45,10 @@ public class OldTelevision extends HorizontalFacingBlock {
|
||||
case NYANCAT: world.setBlockState(pos, state.with(PROGRAM, Program.CREEPER));
|
||||
world.playSound(player, pos, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.2f, 1.5f);
|
||||
return ActionResult.SUCCESS;
|
||||
case CREEPER: world.setBlockState(pos, state.with(PROGRAM, Program.WOODYS));
|
||||
case CREEPER: world.setBlockState(pos, state.with(PROGRAM, Program.CRABRAVE));
|
||||
world.playSound(player, pos, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.2f, 1.5f);
|
||||
return ActionResult.SUCCESS;
|
||||
case WOODYS: world.setBlockState(pos, state.with(PROGRAM, Program.TATER));
|
||||
case CRABRAVE: world.setBlockState(pos, state.with(PROGRAM, Program.TATER));
|
||||
world.playSound(player, pos, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.2f, 1.5f);
|
||||
return ActionResult.SUCCESS;
|
||||
case TATER: world.setBlockState(pos, state.with(PROGRAM, Program.OFF));
|
||||
@@ -104,7 +104,7 @@ public class OldTelevision extends HorizontalFacingBlock {
|
||||
return !worldView.isAir(pos.down());
|
||||
}
|
||||
|
||||
private static ToIntFunction<BlockState> createLightLevelFromBlockState(int litLevel) {
|
||||
private static ToIntFunction<BlockState> createLightLevelFromBlockState() {
|
||||
return (blockState) -> {
|
||||
if (blockState.get(PROGRAM) == Program.OFF) {
|
||||
return 0;
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.SpruceChoppingLogBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class SpruceChoppingLog extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
|
||||
public SpruceChoppingLog() {
|
||||
super(FabricBlockSettings.copy(Blocks.OAK_PLANKS).nonOpaque().sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
.with(FACING, itemPlacementContext.getPlayerFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) {
|
||||
return !worldView.isAir(pos.down());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView view) {
|
||||
return new SpruceChoppingLogBlockEntity();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class StonePath extends Block {
|
||||
private static final VoxelShape SHAPE;
|
||||
|
||||
public StonePath() {
|
||||
super(FabricBlockSettings.copy(Blocks.STONE).nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) {
|
||||
return SHAPE;
|
||||
}
|
||||
static {
|
||||
VoxelShape shape = createCuboidShape(0, 0, 0, 16, 1, 16);
|
||||
|
||||
SHAPE = shape;
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView worldView, BlockPos pos) {
|
||||
return worldView.getBlockState(pos.down()).isSideSolidFullSquare(worldView,pos,Direction.UP);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class Television extends HorizontalFacingBlock {
|
||||
private static final EnumProperty<Program> PROGRAM = DecorativeMain.PROGRAM;
|
||||
|
||||
public Television() {
|
||||
super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE).lightLevel(createLightLevelFromBlockState(15)));
|
||||
super(FabricBlockSettings.copy(Blocks.BLACK_CONCRETE).nonOpaque().sounds(BlockSoundGroup.STONE).luminance(createLightLevelFromBlockState()));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH).with(PROGRAM, Program.OFF));
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ public class Television extends HorizontalFacingBlock {
|
||||
case NYANCAT: world.setBlockState(pos, state.with(PROGRAM, Program.CREEPER));
|
||||
world.playSound(player, pos, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.2f, 1.5f);
|
||||
return ActionResult.SUCCESS;
|
||||
case CREEPER: world.setBlockState(pos, state.with(PROGRAM, Program.WOODYS));
|
||||
case CREEPER: world.setBlockState(pos, state.with(PROGRAM, Program.CRABRAVE));
|
||||
world.playSound(player, pos, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.2f, 1.5f);
|
||||
return ActionResult.SUCCESS;
|
||||
case WOODYS: world.setBlockState(pos, state.with(PROGRAM, Program.TATER));
|
||||
case CRABRAVE: world.setBlockState(pos, state.with(PROGRAM, Program.TATER));
|
||||
world.playSound(player, pos, SoundEvents.BLOCK_STONE_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.2f, 1.5f);
|
||||
return ActionResult.SUCCESS;
|
||||
case TATER: world.setBlockState(pos, state.with(PROGRAM, Program.OFF));
|
||||
@@ -105,7 +105,7 @@ public class Television extends HorizontalFacingBlock {
|
||||
return !worldView.isAir(pos.down());
|
||||
}
|
||||
|
||||
private static ToIntFunction<BlockState> createLightLevelFromBlockState(int litLevel) {
|
||||
private static ToIntFunction<BlockState> createLightLevelFromBlockState() {
|
||||
return (blockState) -> {
|
||||
if (blockState.get(PROGRAM) == Program.OFF) {
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package eu.midnightdust.motschen.decorative.block;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.WallClockBlockEntity;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
public class WallClock extends HorizontalFacingBlock implements BlockEntityProvider {
|
||||
private static final VoxelShape NORTH_SHAPE;
|
||||
private static final VoxelShape EAST_SHAPE;
|
||||
private static final VoxelShape SOUTH_SHAPE;
|
||||
private static final VoxelShape WEST_SHAPE;
|
||||
|
||||
public WallClock() {
|
||||
super(FabricBlockSettings.copy(Blocks.SMOOTH_QUARTZ).nonOpaque().sounds(BlockSoundGroup.STONE));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockView view) {
|
||||
return new WallClockBlockEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
.with(FACING, itemPlacementContext.getPlayerFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) {
|
||||
switch (state.get(FACING)) {
|
||||
case NORTH: return NORTH_SHAPE;
|
||||
case EAST: return EAST_SHAPE;
|
||||
case SOUTH: return SOUTH_SHAPE;
|
||||
case WEST: return WEST_SHAPE;
|
||||
default: return super.getOutlineShape(state, view, pos, context);
|
||||
}
|
||||
}
|
||||
static {
|
||||
VoxelShape shape = createCuboidShape(0, 0, 15, 16, 16, 16);
|
||||
|
||||
NORTH_SHAPE = shape;
|
||||
WEST_SHAPE = rotate(Direction.EAST, Direction.NORTH, shape);
|
||||
EAST_SHAPE = rotate(Direction.EAST, Direction.SOUTH, shape);
|
||||
SOUTH_SHAPE = rotate(Direction.EAST, Direction.WEST, shape);
|
||||
}
|
||||
private static VoxelShape rotate(Direction from, Direction to, VoxelShape shape) {
|
||||
VoxelShape[] buffer = new VoxelShape[]{ shape, VoxelShapes.empty() };
|
||||
|
||||
int times = (to.getHorizontal() - from.getHorizontal() + 4) % 4;
|
||||
for (int i = 0; i < times; i++) {
|
||||
buffer[0].forEachBox((minX, minY, minZ, maxX, maxY, maxZ) -> buffer[1] = VoxelShapes.union(buffer[1], VoxelShapes.cuboid(1-maxZ, minY, minX, 1-minZ, maxY, maxX)));
|
||||
buffer[0] = buffer[1];
|
||||
buffer[1] = VoxelShapes.empty();
|
||||
}
|
||||
|
||||
return buffer[0];
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,11 @@ import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class CeilingFanBlockEntity extends BlockEntity implements Tickable {
|
||||
private int rot;
|
||||
private int second;
|
||||
|
||||
public CeilingFanBlockEntity() {
|
||||
super(BlockEntities.CeilingFanBlockEntity);
|
||||
@@ -25,22 +28,31 @@ public class CeilingFanBlockEntity extends BlockEntity implements Tickable {
|
||||
BlockPos pos = this.pos;
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
if (world != null && state.get(DecorativeMain.STAGE) == CeilingFanStage.LEVEL_1) {
|
||||
world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.1f, 1.0f);
|
||||
if (LocalTime.now().getSecond() != second) {
|
||||
second = LocalTime.now().getSecond();
|
||||
world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.1f, 1.0f);
|
||||
}
|
||||
rot = rot + 6;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(DecorativeMain.STAGE) == CeilingFanStage.LEVEL_2) {
|
||||
world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.2f, 1.0f);
|
||||
if (LocalTime.now().getSecond() != second) {
|
||||
second = LocalTime.now().getSecond();
|
||||
world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.2f, 1.0f);
|
||||
}
|
||||
rot = rot + 10;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(DecorativeMain.STAGE) == CeilingFanStage.LEVEL_3) {
|
||||
world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.3f, 1.0f);
|
||||
if (LocalTime.now().getSecond() != second) {
|
||||
second = LocalTime.now().getSecond();
|
||||
world.playSound(null,pos, DecorativeSoundEvents.CEILINGFAN_AMBIENT, SoundCategory.BLOCKS, 0.3f, 1.0f);
|
||||
}
|
||||
|
||||
rot = rot + 14;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
rot = rot;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@ import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
public class OakChoppingLogBlockEntity extends BlockEntity implements Tickable {
|
||||
public class ChoppingLogBlockEntity extends BlockEntity implements Tickable {
|
||||
private int facing;
|
||||
private double axe_x;
|
||||
private double axe_z;
|
||||
|
||||
public OakChoppingLogBlockEntity() {
|
||||
super(BlockEntities.OakChoppingLogBlockEntity);
|
||||
public ChoppingLogBlockEntity() {
|
||||
super(BlockEntities.ChoppingLogBlockEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1,61 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block.blockentity;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.init.BlockEntities;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.HorizontalFacingBlock;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
public class DarkOakChoppingLogBlockEntity extends BlockEntity implements Tickable {
|
||||
private int facing;
|
||||
private double axe_x;
|
||||
private double axe_z;
|
||||
|
||||
public DarkOakChoppingLogBlockEntity() {
|
||||
super(BlockEntities.DarkOakChoppingLogBlockEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
BlockPos pos = this.pos;
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) {
|
||||
facing = 180;
|
||||
axe_x = 0.2D;
|
||||
axe_z = 0.5D;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) {
|
||||
facing = 90;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.2D;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) {
|
||||
facing = 0;
|
||||
axe_x = 0.8D;
|
||||
axe_z = 0.5D;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
facing = 270;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.8D;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public int getFacing() {
|
||||
return facing;
|
||||
}
|
||||
public double getAxeX() {
|
||||
return axe_x;
|
||||
}
|
||||
public double getAxeZ() {
|
||||
return axe_z;
|
||||
}
|
||||
}
|
||||
@@ -8,54 +8,61 @@ import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
public class AcaciaChoppingLogBlockEntity extends BlockEntity implements Tickable {
|
||||
private int facing;
|
||||
private double axe_x;
|
||||
private double axe_z;
|
||||
import java.time.LocalTime;
|
||||
|
||||
public AcaciaChoppingLogBlockEntity() {
|
||||
super(BlockEntities.AcaciaChoppingLogBlockEntity);
|
||||
public class DigitalClockBlockEntity extends BlockEntity implements Tickable {
|
||||
private int facing;
|
||||
private double x;
|
||||
private double z;
|
||||
private int second;
|
||||
|
||||
public DigitalClockBlockEntity() {
|
||||
super(BlockEntities.DigitalClockBlockEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (LocalTime.now().getSecond() != second) {
|
||||
second = LocalTime.now().getSecond();
|
||||
}
|
||||
|
||||
BlockPos pos = this.pos;
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
|
||||
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) {
|
||||
facing = 180;
|
||||
axe_x = 0.2D;
|
||||
axe_z = 0.5D;
|
||||
facing = 270;
|
||||
x = 0.626;
|
||||
z = 0.825;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) {
|
||||
facing = 90;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.2D;
|
||||
facing = 180;
|
||||
x = 0.175;
|
||||
z = 0.626;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) {
|
||||
facing = 0;
|
||||
axe_x = 0.8D;
|
||||
axe_z = 0.5D;
|
||||
facing = 90;
|
||||
x = 0.374;
|
||||
z = 0.175;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
facing = 270;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.8D;
|
||||
facing = 0;
|
||||
x = 0.825;
|
||||
z = 0.374;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public int getFacing() {
|
||||
return facing;
|
||||
}
|
||||
public double getAxeX() {
|
||||
return axe_x;
|
||||
public double getX() {
|
||||
return x;
|
||||
}
|
||||
public double getAxeZ() {
|
||||
return axe_z;
|
||||
public double getZ() {
|
||||
return z;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block.blockentity;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.init.BlockEntities;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.HorizontalFacingBlock;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
public class JungleChoppingLogBlockEntity extends BlockEntity implements Tickable {
|
||||
private int facing;
|
||||
private double axe_x;
|
||||
private double axe_z;
|
||||
|
||||
public JungleChoppingLogBlockEntity() {
|
||||
super(BlockEntities.JungleChoppingLogBlockEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
BlockPos pos = this.pos;
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) {
|
||||
facing = 180;
|
||||
axe_x = 0.2D;
|
||||
axe_z = 0.5D;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) {
|
||||
facing = 90;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.2D;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) {
|
||||
facing = 0;
|
||||
axe_x = 0.8D;
|
||||
axe_z = 0.5D;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
facing = 270;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.8D;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public int getFacing() {
|
||||
return facing;
|
||||
}
|
||||
public double getAxeX() {
|
||||
return axe_x;
|
||||
}
|
||||
public double getAxeZ() {
|
||||
return axe_z;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package eu.midnightdust.motschen.decorative.block.blockentity;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.PoolSprinkler;
|
||||
import eu.midnightdust.motschen.decorative.init.BlockEntities;
|
||||
import eu.midnightdust.motschen.decorative.init.Pool;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
@@ -18,14 +17,25 @@ public class PoolSprinklerBlockEntity extends BlockEntity implements Tickable {
|
||||
@Override
|
||||
public void tick() {
|
||||
BlockPos pos = this.pos;
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
if (world != null && state.get(PoolSprinkler.POWERED) == true) {
|
||||
switch (state.get(PoolSprinkler.FACING)) {
|
||||
case NORTH: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.5,pos.getY()+0.5,pos.getZ()-0.34,1,1,1); return;
|
||||
case EAST: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+1.34,pos.getY()+0.5,pos.getZ()+0.5,1,1,1); return;
|
||||
case SOUTH: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+1.34,1,1,1); return;
|
||||
case WEST: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()-0.34,pos.getY()+0.5,pos.getZ()+0.5,1,1,1); return;
|
||||
default: return;
|
||||
if (world != null) {
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
if (state.get(PoolSprinkler.POWERED)) {
|
||||
switch (state.get(PoolSprinkler.FACING)) {
|
||||
case NORTH:
|
||||
world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() - 0.34, 1, 1, 1);
|
||||
return;
|
||||
case EAST:
|
||||
world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 1.34, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 1, 1);
|
||||
return;
|
||||
case SOUTH:
|
||||
world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 1.34, 1, 1, 1);
|
||||
return;
|
||||
case WEST:
|
||||
world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() - 0.34, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 1, 1);
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package eu.midnightdust.motschen.decorative.block.blockentity;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.PoolSprinkler;
|
||||
import eu.midnightdust.motschen.decorative.init.BlockEntities;
|
||||
import eu.midnightdust.motschen.decorative.init.Pool;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
@@ -18,14 +17,25 @@ public class ShowerHeadBlockEntity extends BlockEntity implements Tickable {
|
||||
@Override
|
||||
public void tick() {
|
||||
BlockPos pos = this.pos;
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
if (world != null && state.get(PoolSprinkler.POWERED) == true) {
|
||||
switch (state.get(PoolSprinkler.FACING)) {
|
||||
case NORTH: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+0.625,1,1,1); return;
|
||||
case EAST: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.375,pos.getY()+0.5,pos.getZ()+0.5,1,1,1); return;
|
||||
case SOUTH: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.5,pos.getY()+0.5,pos.getZ()+0.375,1,1,1); return;
|
||||
case WEST: world.addParticle(ParticleTypes.DRIPPING_WATER,pos.getX()+0.625,pos.getY()+0.5,pos.getZ()+0.5,1,1,1); return;
|
||||
default: return;
|
||||
if (world != null) {
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
if (state.get(PoolSprinkler.POWERED) == true) {
|
||||
switch (state.get(PoolSprinkler.FACING)) {
|
||||
case NORTH:
|
||||
world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.625, 1, 1, 1);
|
||||
return;
|
||||
case EAST:
|
||||
world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.375, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 1, 1);
|
||||
return;
|
||||
case SOUTH:
|
||||
world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.375, 1, 1, 1);
|
||||
return;
|
||||
case WEST:
|
||||
world.addParticle(ParticleTypes.DRIPPING_WATER, pos.getX() + 0.625, pos.getY() + 0.5, pos.getZ() + 0.5, 1, 1, 1);
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block.blockentity;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.init.BlockEntities;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.HorizontalFacingBlock;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
public class SpruceChoppingLogBlockEntity extends BlockEntity implements Tickable {
|
||||
private int facing;
|
||||
private double axe_x;
|
||||
private double axe_z;
|
||||
|
||||
public SpruceChoppingLogBlockEntity() {
|
||||
super(BlockEntities.SpruceChoppingLogBlockEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
BlockPos pos = this.pos;
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) {
|
||||
facing = 180;
|
||||
axe_x = 0.2D;
|
||||
axe_z = 0.5D;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) {
|
||||
facing = 90;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.2D;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) {
|
||||
facing = 0;
|
||||
axe_x = 0.8D;
|
||||
axe_z = 0.5D;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
facing = 270;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.8D;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public int getFacing() {
|
||||
return facing;
|
||||
}
|
||||
public double getAxeX() {
|
||||
return axe_x;
|
||||
}
|
||||
public double getAxeZ() {
|
||||
return axe_z;
|
||||
}
|
||||
}
|
||||
@@ -4,58 +4,68 @@ import eu.midnightdust.motschen.decorative.init.BlockEntities;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.HorizontalFacingBlock;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.util.Tickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
public class BirchChoppingLogBlockEntity extends BlockEntity implements Tickable {
|
||||
private int facing;
|
||||
private double axe_x;
|
||||
private double axe_z;
|
||||
import java.time.LocalTime;
|
||||
|
||||
public BirchChoppingLogBlockEntity() {
|
||||
super(BlockEntities.BirchChoppingLogBlockEntity);
|
||||
public class WallClockBlockEntity extends BlockEntity implements Tickable {
|
||||
private int facing;
|
||||
private double x;
|
||||
private double z;
|
||||
private int second;
|
||||
|
||||
public WallClockBlockEntity() {
|
||||
super(BlockEntities.WallClockBlockEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (LocalTime.now().getSecond() != second) {
|
||||
second = LocalTime.now().getSecond();
|
||||
world.playSound(null, pos, SoundEvents.BLOCK_WOODEN_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.004f, 1f);
|
||||
}
|
||||
|
||||
BlockPos pos = this.pos;
|
||||
BlockState state = this.world.getBlockState(pos);
|
||||
|
||||
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.EAST) {
|
||||
facing = 180;
|
||||
axe_x = 0.2D;
|
||||
axe_z = 0.5D;
|
||||
facing = 270;
|
||||
x = 0.05;
|
||||
z = 0.5;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.SOUTH) {
|
||||
facing = 90;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.2D;
|
||||
facing = 180;
|
||||
x = 0.5;
|
||||
z = 0.05;
|
||||
return;
|
||||
}
|
||||
if (world != null && state.get(HorizontalFacingBlock.FACING) == Direction.WEST) {
|
||||
facing = 0;
|
||||
axe_x = 0.8D;
|
||||
axe_z = 0.5D;
|
||||
facing = 90;
|
||||
x = 0.95;
|
||||
z = 0.5;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
facing = 270;
|
||||
axe_x = 0.5D;
|
||||
axe_z = 0.8D;
|
||||
facing = 0;
|
||||
x = 0.5;
|
||||
z = 0.95;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public int getFacing() {
|
||||
return facing;
|
||||
}
|
||||
public double getAxeX() {
|
||||
return axe_x;
|
||||
public double getX() {
|
||||
return x;
|
||||
}
|
||||
public double getAxeZ() {
|
||||
return axe_z;
|
||||
public double getZ() {
|
||||
return z;
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block.render;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.AcaciaChoppingLogBlockEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
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.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class AcaciaChoppingLogBlockEntityRenderer extends BlockEntityRenderer<AcaciaChoppingLogBlockEntity> {
|
||||
|
||||
public AcaciaChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rendersOutsideBoundingBox(AcaciaChoppingLogBlockEntity blockEntity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(AcaciaChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
BlockPos pos = blockEntity.getPos();
|
||||
BlockState state = blockEntity.getWorld().getBlockState(pos);
|
||||
|
||||
matrices.push();
|
||||
int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up());
|
||||
|
||||
matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ());
|
||||
matrices.scale(2.5f,2.5f,2.5f);
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160));
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE),
|
||||
ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers);
|
||||
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block.render;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.BirchChoppingLogBlockEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
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.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class BirchChoppingLogBlockEntityRenderer extends BlockEntityRenderer<BirchChoppingLogBlockEntity> {
|
||||
|
||||
public BirchChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rendersOutsideBoundingBox(BirchChoppingLogBlockEntity blockEntity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(BirchChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
BlockPos pos = blockEntity.getPos();
|
||||
BlockState state = blockEntity.getWorld().getBlockState(pos);
|
||||
|
||||
matrices.push();
|
||||
int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up());
|
||||
|
||||
matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ());
|
||||
matrices.scale(2.5f,2.5f,2.5f);
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160));
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE),
|
||||
ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers);
|
||||
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,11 @@ package eu.midnightdust.motschen.decorative.block.render;
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.CeilingFanBlockEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.DoorBlock;
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
import net.minecraft.client.render.OverlayTexture;
|
||||
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.util.math.MatrixStack;
|
||||
@@ -18,7 +16,6 @@ import net.minecraft.util.Identifier;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class CeilingFanRenderer extends BlockEntityRenderer<CeilingFanBlockEntity> {
|
||||
private static int rot;
|
||||
private final ModelPart blades;
|
||||
private final ModelPart point;
|
||||
|
||||
@@ -43,16 +40,11 @@ public class CeilingFanRenderer extends BlockEntityRenderer<CeilingFanBlockEntit
|
||||
|
||||
@Override
|
||||
public void render(CeilingFanBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
|
||||
matrices.push();
|
||||
int lightAtBlock = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos());
|
||||
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("decorative:textures/block/ceilingfan.png")));
|
||||
matrices.translate(0.5,0.31,0.5);
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getRot()));
|
||||
|
||||
|
||||
blades.render(matrices, vertexConsumer, lightAtBlock, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
blades.render(matrices, vertexConsumer, light, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package eu.midnightdust.motschen.decorative.block.render;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.OakChoppingLogBlockEntity;
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.ChoppingLogBlockEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.render.*;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
||||
@@ -13,39 +12,29 @@ import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class OakChoppingLogBlockEntityRenderer extends BlockEntityRenderer<OakChoppingLogBlockEntity> {
|
||||
public class ChoppingLogBlockEntityRenderer extends BlockEntityRenderer<ChoppingLogBlockEntity> {
|
||||
|
||||
public OakChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
public ChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rendersOutsideBoundingBox(OakChoppingLogBlockEntity blockEntity) {
|
||||
public boolean rendersOutsideBoundingBox(ChoppingLogBlockEntity blockEntity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(OakChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
BlockPos pos = blockEntity.getPos();
|
||||
BlockState state = blockEntity.getWorld().getBlockState(pos);
|
||||
|
||||
public void render(ChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
matrices.push();
|
||||
int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up());
|
||||
|
||||
matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ());
|
||||
matrices.scale(2.5f,2.5f,2.5f);
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160));
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE),
|
||||
ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers);
|
||||
|
||||
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE), ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers);
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block.render;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.DarkOakChoppingLogBlockEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
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.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class DarkOakChoppingLogBlockEntityRenderer extends BlockEntityRenderer<DarkOakChoppingLogBlockEntity> {
|
||||
|
||||
public DarkOakChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rendersOutsideBoundingBox(DarkOakChoppingLogBlockEntity blockEntity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(DarkOakChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
BlockPos pos = blockEntity.getPos();
|
||||
BlockState state = blockEntity.getWorld().getBlockState(pos);
|
||||
|
||||
matrices.push();
|
||||
int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up());
|
||||
|
||||
matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ());
|
||||
matrices.scale(2.5f,2.5f,2.5f);
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160));
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE),
|
||||
ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers);
|
||||
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package eu.midnightdust.motschen.decorative.block.render;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.DecorativeMain;
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.DigitalClockBlockEntity;
|
||||
import eu.midnightdust.motschen.decorative.config.DecorativeConfig;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
import net.minecraft.client.render.*;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class DigitalClockRenderer extends BlockEntityRenderer<DigitalClockBlockEntity> {
|
||||
|
||||
public DigitalClockRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
}
|
||||
|
||||
private int getHour12hFormat() {
|
||||
int hour;
|
||||
hour = LocalTime.now().getHour();
|
||||
if (hour > 12) {
|
||||
hour = hour - 12;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
private String getTime() {
|
||||
String hour;
|
||||
String minute;
|
||||
|
||||
// Hour
|
||||
if (DecorativeMain.DECORATIVE_CONFIG.timeFormat.equals(DecorativeConfig.TimeFormat.h12)) {
|
||||
if (getHour12hFormat() <= 9) {
|
||||
hour = "0" + getHour12hFormat();
|
||||
} else {
|
||||
hour = "" + getHour12hFormat();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (LocalTime.now().getHour() <= 9) {
|
||||
hour = "0" + LocalTime.now().getHour();
|
||||
} else {
|
||||
hour = "" + LocalTime.now().getHour();
|
||||
}
|
||||
}
|
||||
|
||||
// Minute
|
||||
if (LocalTime.now().getMinute() <= 9) {
|
||||
minute = "0" + LocalTime.now().getMinute();
|
||||
}
|
||||
else {
|
||||
minute = "" + LocalTime.now().getMinute();
|
||||
}
|
||||
|
||||
String time = hour +":"+ minute;
|
||||
return time;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(DigitalClockBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
matrices.push();
|
||||
TextRenderer textRenderer = dispatcher.getTextRenderer();
|
||||
matrices.translate(blockEntity.getX(),0.35,blockEntity.getZ());
|
||||
|
||||
matrices.scale(0.025f, 0.025f, 0.025f);
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
matrices.translate(0,0,-0.1);
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(180));
|
||||
textRenderer.draw(getTime(), 0, 0, 16382457, false, matrices.peek().getModel(), vertexConsumers, false, 0, 15);
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block.render;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.JungleChoppingLogBlockEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
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.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class JungleChoppingLogBlockEntityRenderer extends BlockEntityRenderer<JungleChoppingLogBlockEntity> {
|
||||
|
||||
public JungleChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rendersOutsideBoundingBox(JungleChoppingLogBlockEntity blockEntity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(JungleChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
BlockPos pos = blockEntity.getPos();
|
||||
BlockState state = blockEntity.getWorld().getBlockState(pos);
|
||||
|
||||
matrices.push();
|
||||
int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up());
|
||||
|
||||
matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ());
|
||||
matrices.scale(2.5f,2.5f,2.5f);
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160));
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE),
|
||||
ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers);
|
||||
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package eu.midnightdust.motschen.decorative.block.render;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.SpruceChoppingLogBlockEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
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.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class SpruceChoppingLogBlockEntityRenderer extends BlockEntityRenderer<SpruceChoppingLogBlockEntity> {
|
||||
|
||||
public SpruceChoppingLogBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rendersOutsideBoundingBox(SpruceChoppingLogBlockEntity blockEntity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(SpruceChoppingLogBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
BlockPos pos = blockEntity.getPos();
|
||||
BlockState state = blockEntity.getWorld().getBlockState(pos);
|
||||
|
||||
matrices.push();
|
||||
int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(), blockEntity.getPos().up());
|
||||
|
||||
matrices.translate(blockEntity.getAxeX(), 1.5D, blockEntity.getAxeZ());
|
||||
matrices.scale(2.5f,2.5f,2.5f);
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(160));
|
||||
MinecraftClient.getInstance().getItemRenderer().renderItem(new ItemStack(Items.IRON_AXE),
|
||||
ModelTransformation.Mode.GROUND, lightAbove, overlay, matrices, vertexConsumers);
|
||||
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package eu.midnightdust.motschen.decorative.block.render;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.WallClockBlockEntity;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.model.ModelPart;
|
||||
import net.minecraft.client.render.*;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.client.util.math.Vector3f;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class WallClockRenderer extends BlockEntityRenderer<WallClockBlockEntity> {
|
||||
private final ModelPart blades;
|
||||
private final ModelPart seconds;
|
||||
private final ModelPart minutes;
|
||||
private final ModelPart hours;
|
||||
|
||||
public WallClockRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
|
||||
super(blockEntityRenderDispatcher);
|
||||
blades = new ModelPart(16, 16, 0, 0);
|
||||
blades.setPivot(0.0F, 0.0F, 0.0F);
|
||||
|
||||
seconds = new ModelPart(16, 16, 8, 0);
|
||||
seconds.addCuboid(-0.175F, 0.0F, 0.01F, 0.25F, 7.0F, 0.2F, 0.0F);
|
||||
blades.addChild(seconds);
|
||||
|
||||
minutes = new ModelPart(16, 16, 0, 0);
|
||||
minutes.addCuboid(-0.25F, 0.0F, 0.0F, 0.5F, 6.0F, 0.2F, 0.0F);
|
||||
blades.addChild(minutes);
|
||||
|
||||
hours = new ModelPart(16, 16, 0, 0);
|
||||
hours.addCuboid(-0.25F, 0.0F, 0.0F, 0.5F, 4.0F, 0.2F, 0.0F);
|
||||
blades.addChild(hours);
|
||||
}
|
||||
|
||||
private int getHour12hFormat() {
|
||||
int hour;
|
||||
hour = LocalTime.now().getHour();
|
||||
if (hour >= 12) {
|
||||
hour = hour - 12;
|
||||
}
|
||||
return hour;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(WallClockBlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
|
||||
VertexConsumer blackVertex = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("textures/block/black_concrete.png")));
|
||||
VertexConsumer redVertex = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(new Identifier("textures/block/red_concrete.png")));
|
||||
|
||||
matrices.push();
|
||||
matrices.translate(blockEntity.getX(),0.5,blockEntity.getZ());
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(LocalTime.now().getSecond() * 6));
|
||||
seconds.render(matrices, redVertex, light, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
matrices.pop();
|
||||
|
||||
matrices.push();
|
||||
matrices.translate(blockEntity.getX(),0.5,blockEntity.getZ());
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(LocalTime.now().getMinute() * 6));
|
||||
minutes.render(matrices, blackVertex, light, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
matrices.pop();
|
||||
|
||||
matrices.push();
|
||||
matrices.translate(blockEntity.getX(),0.5,blockEntity.getZ());
|
||||
matrices.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(blockEntity.getFacing()));
|
||||
matrices.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(getHour12hFormat() * 30));
|
||||
hours.render(matrices, blackVertex, light, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ public enum Program implements StringIdentifiable {
|
||||
OFF("off"),
|
||||
NYANCAT("nyancat"),
|
||||
CREEPER("creeper"),
|
||||
WOODYS("woodys"),
|
||||
CRABRAVE("crabrave"),
|
||||
TATER("tater");
|
||||
|
||||
private final String name;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package eu.midnightdust.motschen.decorative.config;
|
||||
|
||||
import me.sargunvohra.mcmods.autoconfig1u.ConfigData;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.annotation.ConfigEntry;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment;
|
||||
|
||||
@Config(name = "decorative")
|
||||
public class DecorativeConfig implements ConfigData {
|
||||
@Comment(value = "Change the time format")
|
||||
@ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
|
||||
public TimeFormat timeFormat = TimeFormat.h12;
|
||||
|
||||
public enum TimeFormat {
|
||||
h12, h24
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package eu.midnightdust.motschen.decorative.config;
|
||||
|
||||
import io.github.prospector.modmenu.api.ConfigScreenFactory;
|
||||
import io.github.prospector.modmenu.api.ModMenuApi;
|
||||
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class ModMenuIntegration implements ModMenuApi {
|
||||
|
||||
@Override
|
||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
return parent -> AutoConfig.getConfigScreen(DecorativeConfig.class, parent).get();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package eu.midnightdust.motschen.decorative.init;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.DecorativeMain;
|
||||
import eu.midnightdust.motschen.decorative.block.blockentity.*;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.entity.BlockEntityType;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
@@ -11,22 +12,16 @@ public class BlockEntities {
|
||||
public static BlockEntityType<PoolSprinklerBlockEntity> PoolSprinklerBlockEntity;
|
||||
public static BlockEntityType<ShowerHeadBlockEntity> ShowerHeadBlockEntity;
|
||||
public static BlockEntityType<CeilingFanBlockEntity> CeilingFanBlockEntity;
|
||||
public static BlockEntityType<OakChoppingLogBlockEntity> OakChoppingLogBlockEntity;
|
||||
public static BlockEntityType<SpruceChoppingLogBlockEntity> SpruceChoppingLogBlockEntity;
|
||||
public static BlockEntityType<BirchChoppingLogBlockEntity> BirchChoppingLogBlockEntity;
|
||||
public static BlockEntityType<AcaciaChoppingLogBlockEntity> AcaciaChoppingLogBlockEntity;
|
||||
public static BlockEntityType<JungleChoppingLogBlockEntity> JungleChoppingLogBlockEntity;
|
||||
public static BlockEntityType<DarkOakChoppingLogBlockEntity> DarkOakChoppingLogBlockEntity;
|
||||
public static BlockEntityType<ChoppingLogBlockEntity> ChoppingLogBlockEntity;
|
||||
public static BlockEntityType<WallClockBlockEntity> WallClockBlockEntity;
|
||||
public static BlockEntityType<DigitalClockBlockEntity> DigitalClockBlockEntity;
|
||||
|
||||
public static void init() {
|
||||
PoolSprinklerBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"pool_sprinkler_blockentity"), BlockEntityType.Builder.create(PoolSprinklerBlockEntity::new, Pool.PoolSprinkler).build(null));
|
||||
ShowerHeadBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"shower_head_blockentity"), BlockEntityType.Builder.create(ShowerHeadBlockEntity::new, DecorativeMain.ShowerHead).build(null));
|
||||
CeilingFanBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"ceiling_fan_blockentity"), BlockEntityType.Builder.create(CeilingFanBlockEntity::new, DecorativeMain.CeilingFan).build(null));
|
||||
OakChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"oak_chopping_log_blockentity"), BlockEntityType.Builder.create(OakChoppingLogBlockEntity::new, LogsWithAxes.OakChoppingLog).build(null));
|
||||
SpruceChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"spruce_chopping_log_blockentity"), BlockEntityType.Builder.create(SpruceChoppingLogBlockEntity::new, LogsWithAxes.SpruceChoppingLog).build(null));
|
||||
BirchChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"birch_chopping_log_blockentity"), BlockEntityType.Builder.create(BirchChoppingLogBlockEntity::new, LogsWithAxes.BirchChoppingLog).build(null));
|
||||
AcaciaChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"acacia_chopping_log_blockentity"), BlockEntityType.Builder.create(AcaciaChoppingLogBlockEntity::new, LogsWithAxes.AcaciaChoppingLog).build(null));
|
||||
JungleChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"jungle_chopping_log_blockentity"), BlockEntityType.Builder.create(JungleChoppingLogBlockEntity::new, LogsWithAxes.JungleChoppingLog).build(null));
|
||||
DarkOakChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"dark_oak_chopping_log_blockentity"), BlockEntityType.Builder.create(DarkOakChoppingLogBlockEntity::new, LogsWithAxes.DarkOakChoppingLog).build(null));
|
||||
ChoppingLogBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"chopping_log_blockentity"), BlockEntityType.Builder.create(ChoppingLogBlockEntity::new, LogsWithAxes.OakChoppingLog, LogsWithAxes.BirchChoppingLog, LogsWithAxes.AcaciaChoppingLog, LogsWithAxes.DarkOakChoppingLog, LogsWithAxes.JungleChoppingLog, LogsWithAxes.SpruceChoppingLog).build(null));
|
||||
WallClockBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"wall_clock_blockentity"), BlockEntityType.Builder.create(WallClockBlockEntity::new, DecorativeMain.WallClock).build(null));
|
||||
DigitalClockBlockEntity = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(DecorativeMain.MOD_ID,"digital_clock_blockentity"), BlockEntityType.Builder.create(DigitalClockBlockEntity::new, Clocks.RedDigitalClock, Clocks.BlackDigitalClock, Clocks.BlueDigitalClock, Clocks.BrownDigitalClock, Clocks.CyanDigitalClock, Clocks.GrayDigitalClock, Clocks.GreenDigitalClock, Clocks.LightBlueDigitalClock, Clocks.LightGrayDigitalClock, Clocks.LimeDigitalClock, Clocks.MagentaDigitalClock, Clocks.OrangeDigitalClock, Clocks.PinkDigitalClock, Clocks.PurpleDigitalClock, Clocks.WhiteDigitalClock, Clocks.YellowDigitalClock).build(null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package eu.midnightdust.motschen.decorative.init;
|
||||
|
||||
import eu.midnightdust.motschen.decorative.DecorativeMain;
|
||||
import eu.midnightdust.motschen.decorative.block.DigitalClock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class Clocks {
|
||||
public static Block WhiteDigitalClock = new DigitalClock();
|
||||
public static Block OrangeDigitalClock = new DigitalClock();
|
||||
public static Block MagentaDigitalClock = new DigitalClock();
|
||||
public static Block LightBlueDigitalClock = new DigitalClock();
|
||||
public static Block YellowDigitalClock = new DigitalClock();
|
||||
public static Block LimeDigitalClock = new DigitalClock();
|
||||
public static Block PinkDigitalClock = new DigitalClock();
|
||||
public static Block GrayDigitalClock = new DigitalClock();
|
||||
public static Block LightGrayDigitalClock = new DigitalClock();
|
||||
public static Block CyanDigitalClock = new DigitalClock();
|
||||
public static Block PurpleDigitalClock = new DigitalClock();
|
||||
public static Block BlueDigitalClock = new DigitalClock();
|
||||
public static Block BrownDigitalClock = new DigitalClock();
|
||||
public static Block GreenDigitalClock = new DigitalClock();
|
||||
public static Block RedDigitalClock = new DigitalClock();
|
||||
public static Block BlackDigitalClock = new DigitalClock();
|
||||
|
||||
public static void init() {
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"white_digital_clock"), WhiteDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"white_digital_clock"), new BlockItem(WhiteDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"orange_digital_clock"), OrangeDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"orange_digital_clock"), new BlockItem(OrangeDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"magenta_digital_clock"), MagentaDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"magenta_digital_clock"), new BlockItem(MagentaDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"light_blue_digital_clock"), LightBlueDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_blue_digital_clock"), new BlockItem(LightBlueDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"yellow_digital_clock"), YellowDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"yellow_digital_clock"), new BlockItem(YellowDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"lime_digital_clock"), LimeDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"lime_digital_clock"), new BlockItem(LimeDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"pink_digital_clock"), PinkDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"pink_digital_clock"), new BlockItem(PinkDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"gray_digital_clock"), GrayDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"gray_digital_clock"), new BlockItem(GrayDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"light_gray_digital_clock"), LightGrayDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"light_gray_digital_clock"), new BlockItem(LightGrayDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"cyan_digital_clock"), CyanDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"cyan_digital_clock"), new BlockItem(CyanDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"purple_digital_clock"), PurpleDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"purple_digital_clock"), new BlockItem(PurpleDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"blue_digital_clock"), BlueDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"blue_digital_clock"), new BlockItem(BlueDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"brown_digital_clock"), BrownDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"brown_digital_clock"), new BlockItem(BrownDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"green_digital_clock"), GreenDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"green_digital_clock"), new BlockItem(GreenDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"red_digital_clock"), RedDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"red_digital_clock"), new BlockItem(RedDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"black_digital_clock"), BlackDigitalClock);
|
||||
Registry.register(Registry.ITEM, new Identifier(DecorativeMain.MOD_ID,"black_digital_clock"), new BlockItem(BlackDigitalClock, new Item.Settings().group(DecorativeMain.IndoorGroup)));
|
||||
}
|
||||
}
|
||||
@@ -9,12 +9,12 @@ import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class LogsWithAxes {
|
||||
public static Block OakChoppingLog = new OakChoppingLog();
|
||||
public static Block SpruceChoppingLog = new SpruceChoppingLog();
|
||||
public static Block BirchChoppingLog = new BirchChoppingLog();
|
||||
public static Block AcaciaChoppingLog = new AcaciaChoppingLog();
|
||||
public static Block JungleChoppingLog = new JungleChoppingLog();
|
||||
public static Block DarkOakChoppingLog = new DarkOakChoppingLog();
|
||||
public static Block OakChoppingLog = new ChoppingLog();
|
||||
public static Block SpruceChoppingLog = new ChoppingLog();
|
||||
public static Block BirchChoppingLog = new ChoppingLog();
|
||||
public static Block AcaciaChoppingLog = new ChoppingLog();
|
||||
public static Block JungleChoppingLog = new ChoppingLog();
|
||||
public static Block DarkOakChoppingLog = new ChoppingLog();
|
||||
|
||||
public static void init() {
|
||||
Registry.register(Registry.BLOCK, new Identifier(DecorativeMain.MOD_ID,"oak_log_with_axe"), OakChoppingLog);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package eu.midnightdust.motschen.decorative.item;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import java.util.Map;
|
||||
import net.minecraft.block.FluidBlock;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.SpawnReason;
|
||||
@@ -16,22 +14,20 @@ import net.minecraft.util.TypedActionResult;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.RayTraceContext;
|
||||
import net.minecraft.world.RaycastContext;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BathTireItem extends Item {
|
||||
private static final Map<EntityType<?>, BathTireItem> SPAWN_EGGS = Maps.newIdentityHashMap();
|
||||
private final EntityType<?> type;
|
||||
|
||||
public BathTireItem(EntityType<?> type, Item.Settings settings) {
|
||||
super(settings);
|
||||
this.type = type;
|
||||
SPAWN_EGGS.put(type, this);
|
||||
}
|
||||
|
||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
|
||||
ItemStack itemStack = user.getStackInHand(hand);
|
||||
HitResult hitResult = rayTrace(world, user, RayTraceContext.FluidHandling.SOURCE_ONLY);
|
||||
HitResult hitResult = raycast(world, user, RaycastContext.FluidHandling.SOURCE_ONLY);
|
||||
if (hitResult.getType() != HitResult.Type.BLOCK) {
|
||||
return TypedActionResult.pass(itemStack);
|
||||
} else if (world.isClient) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
||||
|
||||
public class OreFeatures {
|
||||
public static final ConfiguredFeature<?, ?> ROCKY_ASPHALT_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD, DecorativeMain.RockyAsphalt.getDefaultState(), 7)).method_30377(200).spreadHorizontally().repeat(20);
|
||||
public static final ConfiguredFeature<?, ?> ROCKY_ASPHALT_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD, DecorativeMain.RockyAsphalt.getDefaultState(), 7)).applyChance(200).spreadHorizontally().repeat(20);
|
||||
|
||||
public static void init() {
|
||||
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier(DecorativeMain.MOD_ID, "rocky_asphalt"), ROCKY_ASPHALT_FEATURE);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/black_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/black_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/black_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/black_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/blue_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/blue_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/blue_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/blue_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/brown_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/brown_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/brown_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/brown_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/cyan_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/cyan_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/cyan_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/cyan_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/gray_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/gray_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/gray_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/gray_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/green_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/green_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/green_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/green_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/light_blue_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/light_blue_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/light_blue_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/light_blue_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/light_gray_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/light_gray_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/light_gray_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/light_gray_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/lime_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/lime_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/lime_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/lime_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/magenta_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/magenta_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/magenta_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/magenta_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,10 @@
|
||||
"facing=north,program=creeper": { "model": "decorative:block/old_television_creeper", "uvlock": true, "y": 180 },
|
||||
"facing=east,program=creeper": { "model": "decorative:block/old_television_creeper", "uvlock": true, "y": 270 },
|
||||
|
||||
"facing=south,program=woodys": { "model": "decorative:block/old_television_woodys", "uvlock": true },
|
||||
"facing=west,program=woodys": { "model": "decorative:block/old_television_woodys", "uvlock": true, "y": 90 },
|
||||
"facing=north,program=woodys": { "model": "decorative:block/old_television_woodys", "uvlock": true, "y": 180 },
|
||||
"facing=east,program=woodys": { "model": "decorative:block/old_television_woodys", "uvlock": true, "y": 270 },
|
||||
"facing=south,program=crabrave": { "model": "decorative:block/old_television_crabrave", "uvlock": true },
|
||||
"facing=west,program=crabrave": { "model": "decorative:block/old_television_crabrave", "uvlock": true, "y": 90 },
|
||||
"facing=north,program=crabrave": { "model": "decorative:block/old_television_crabrave", "uvlock": true, "y": 180 },
|
||||
"facing=east,program=crabrave": { "model": "decorative:block/old_television_crabrave", "uvlock": true, "y": 270 },
|
||||
|
||||
"facing=south,program=tater": { "model": "decorative:block/old_television_tater", "uvlock": true },
|
||||
"facing=west,program=tater": { "model": "decorative:block/old_television_tater", "uvlock": true, "y": 90 },
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/orange_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/orange_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/orange_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/orange_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/pink_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/pink_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/pink_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/pink_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/purple_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/purple_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/purple_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/purple_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/red_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/red_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/red_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/red_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"variants": {
|
||||
"active=true": { "model": "decorative:block/smoke_detector_on" },
|
||||
"active=false": { "model": "decorative:block/smoke_detector_off" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"variants": {
|
||||
"": [
|
||||
{"model": "decorative:block/stone_path"},
|
||||
{"model": "decorative:block/stone_path", "y": 90},
|
||||
{"model": "decorative:block/stone_path", "y": 180},
|
||||
{"model": "decorative:block/stone_path", "y": 270}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,10 @@
|
||||
"facing=north,program=creeper": { "model": "decorative:block/television_creeper", "uvlock": true, "y": 180 },
|
||||
"facing=east,program=creeper": { "model": "decorative:block/television_creeper", "uvlock": true, "y": 270 },
|
||||
|
||||
"facing=south,program=woodys": { "model": "decorative:block/television_woodys", "uvlock": true },
|
||||
"facing=west,program=woodys": { "model": "decorative:block/television_woodys", "uvlock": true, "y": 90 },
|
||||
"facing=north,program=woodys": { "model": "decorative:block/television_woodys", "uvlock": true, "y": 180 },
|
||||
"facing=east,program=woodys": { "model": "decorative:block/television_woodys", "uvlock": true, "y": 270 },
|
||||
"facing=south,program=crabrave": { "model": "decorative:block/television_crabrave", "uvlock": true },
|
||||
"facing=west,program=crabrave": { "model": "decorative:block/television_crabrave", "uvlock": true, "y": 90 },
|
||||
"facing=north,program=crabrave": { "model": "decorative:block/television_crabrave", "uvlock": true, "y": 180 },
|
||||
"facing=east,program=crabrave": { "model": "decorative:block/television_crabrave", "uvlock": true, "y": 270 },
|
||||
|
||||
"facing=south,program=tater": { "model": "decorative:block/television_tater", "uvlock": true },
|
||||
"facing=west,program=tater": { "model": "decorative:block/television_tater", "uvlock": true, "y": 90 },
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/wall_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/wall_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/wall_clock" },
|
||||
"facing=east": { "model": "decorative:block/wall_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/white_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/white_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/white_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/white_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=south": { "model": "decorative:block/yellow_digital_clock", "y": 180 },
|
||||
"facing=west": { "model": "decorative:block/yellow_digital_clock", "y": 270 },
|
||||
"facing=north": { "model": "decorative:block/yellow_digital_clock" },
|
||||
"facing=east": { "model": "decorative:block/yellow_digital_clock", "y": 90 }
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 6.1 KiB |
@@ -1,4 +1,8 @@
|
||||
{
|
||||
// Config //
|
||||
"text.autoconfig.decorative.title":"Decorative Config",
|
||||
"text.autoconfig.decorative.option.timeFormat":"Time Format",
|
||||
|
||||
// ItemGroups //
|
||||
"itemGroup.decorative.indoor":"Decorative - Indoor",
|
||||
"itemGroup.decorative.traffic":"Decorative - Traffic",
|
||||
@@ -107,5 +111,26 @@
|
||||
"block.decorative.pool_wall":"Pool Wall",
|
||||
"block.decorative.springboard":"Springboard",
|
||||
"block.decorative.pool_sprinkler":"Pool Sprinkler",
|
||||
"block.decorative.shower_head":"Shower Head"
|
||||
"block.decorative.shower_head":"Shower Head",
|
||||
|
||||
//* 3.0 - Clock Update *//
|
||||
"block.decorative.wall_clock":"Wall Clock",
|
||||
"block.decorative.white_digital_clock":"White Digital Clock",
|
||||
"block.decorative.orange_digital_clock":"Orange Digital Clock",
|
||||
"block.decorative.magenta_digital_clock":"Magenta Digital Clock",
|
||||
"block.decorative.light_blue_digital_clock":"Light Blue Digital Clock",
|
||||
"block.decorative.yellow_digital_clock":"Yellow Digital Clock",
|
||||
"block.decorative.lime_digital_clock":"Lime Digital Clock",
|
||||
"block.decorative.pink_digital_clock":"Pink Digital Clock",
|
||||
"block.decorative.gray_digital_clock":"Gray Digital Clock",
|
||||
"block.decorative.light_gray_digital_clock":"Light Gray Digital Clock",
|
||||
"block.decorative.cyan_digital_clock":"Cyan Digital Clock",
|
||||
"block.decorative.purple_digital_clock":"Purple Digital Clock",
|
||||
"block.decorative.blue_digital_clock":"Blue Digital Clock",
|
||||
"block.decorative.brown_digital_clock":"Brown Digital Clock",
|
||||
"block.decorative.green_digital_clock":"Green Digital Clock",
|
||||
"block.decorative.red_digital_clock":"Red Digital Clock",
|
||||
"block.decorative.black_digital_clock":"Black Digital Clock",
|
||||
"block.decorative.stone_path":"Stone Path"
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "decorative:block/red_lamp",
|
||||
"material": "canvas:emissive_no_diffuse"
|
||||
},
|
||||
{
|
||||
"sprite": "decorative:block/green_lamp",
|
||||
"material": "canvas:emissive_no_diffuse"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "decorative:tv/nyancat",
|
||||
"material": "canvas:emissive_no_diffuse"
|
||||
},
|
||||
{
|
||||
"sprite": "decorative:tv/creeper",
|
||||
"material": "canvas:emissive_no_diffuse"
|
||||
},
|
||||
{
|
||||
"sprite": "decorative:tv/crabrave",
|
||||
"material": "canvas:emissive_no_diffuse"
|
||||
},
|
||||
{
|
||||
"sprite": "decorative:tv/tater",
|
||||
"material": "canvas:emissive_no_diffuse"
|
||||
},
|
||||
{
|
||||
"sprite": "minecraft:block/lime_terracotta",
|
||||
"material": "canvas:emissive_no_diffuse"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"defaultMap": {
|
||||
"spriteMap": [
|
||||
{
|
||||
"sprite": "minecraft:block/redstone_lamp_on",
|
||||
"material": "canvas:warm_glow"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user