From 5d3f72ca7cf9ad5bcd6dd7733b6518f08b4bb7b8 Mon Sep 17 00:00:00 2001 From: Zenith Date: Fri, 12 Aug 2022 21:55:46 +0800 Subject: [PATCH] Candle Block Implementation ~~~~~~~~~~~~~ - Implemented the Candle Block ~~~~~~~~~~~~~ "No; I haven't fixed the bounding box yet. Yes; I'm going to fix it later." - Zenith --- Common/build.gradle | 1 + .../client/init/ClientRegistration.java | 2 + .../common/blocks/AdvancedCandleBlock.java | 217 ++++++++++++++++++ .../common/config/HyperLightingConfig.java | 15 ++ .../common/init/CommonRegistration.java | 2 + .../hyperlighting/common/init/HLBlocks.java | 5 + .../HyperLightingIntegrations.java | 22 ++ .../shimmer/HyperLightingShimmer.java | 46 ++++ .../blockstates/advanced_candle.json | 163 +++++++++++++ .../assets/hyperlighting/lang/en_us.json | 1 + .../models/block/candle/black_candle.json | 6 + .../models/block/candle/blue_candle.json | 6 + .../models/block/candle/brown_candle.json | 6 + .../models/block/candle/cyan_candle.json | 6 + .../models/block/candle/gray_candle.json | 6 + .../models/block/candle/green_candle.json | 6 + .../block/candle/light_blue_candle.json | 6 + .../block/candle/light_gray_candle.json | 6 + .../models/block/candle/lime_candle.json | 6 + .../models/block/candle/magenta_candle.json | 6 + .../models/block/candle/orange_candle.json | 6 + .../models/block/candle/pink_candle.json | 6 + .../models/block/candle/purple_candle.json | 6 + .../models/block/candle/red_candle.json | 6 + .../models/block/candle/white_candle.json | 6 + .../models/block/candle/yellow_candle.json | 6 + .../models/block/candle_base.json | 50 ++++ .../models/item/advanced_candle.json | 21 ++ .../textures/block/candle_wax.png | Bin 0 -> 2034 bytes Fabric/build.gradle | 12 + Forge/build.gradle | 6 + build.gradle | 10 +- gradle.properties | 5 +- 33 files changed, 672 insertions(+), 2 deletions(-) create mode 100644 Common/src/main/java/me/hypherionmc/hyperlighting/common/blocks/AdvancedCandleBlock.java create mode 100644 Common/src/main/java/me/hypherionmc/hyperlighting/integration/HyperLightingIntegrations.java create mode 100644 Common/src/main/java/me/hypherionmc/hyperlighting/integration/shimmer/HyperLightingShimmer.java create mode 100644 Common/src/main/resources/assets/hyperlighting/blockstates/advanced_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/black_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/blue_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/brown_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/cyan_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/gray_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/green_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/light_blue_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/light_gray_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/lime_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/magenta_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/orange_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/pink_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/purple_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/red_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/white_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle/yellow_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/block/candle_base.json create mode 100644 Common/src/main/resources/assets/hyperlighting/models/item/advanced_candle.json create mode 100644 Common/src/main/resources/assets/hyperlighting/textures/block/candle_wax.png diff --git a/Common/build.gradle b/Common/build.gradle index 5746322..6e9d7ed 100644 --- a/Common/build.gradle +++ b/Common/build.gradle @@ -25,6 +25,7 @@ minecraft { dependencies { compileOnly group:'org.spongepowered', name:'mixin', version:'0.8.5' compileOnly("me.hypherionmc.craterlib:CraterLib-common-1.19.1:${craterlib_version}") + compileOnly("com.lowdragmc.shimmer:Shimmer-common-1.19.1:${shimmer_version}") } processResources { diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/client/init/ClientRegistration.java b/Common/src/main/java/me/hypherionmc/hyperlighting/client/init/ClientRegistration.java index 41c3cc9..23e65f7 100644 --- a/Common/src/main/java/me/hypherionmc/hyperlighting/client/init/ClientRegistration.java +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/client/init/ClientRegistration.java @@ -7,6 +7,7 @@ import me.hypherionmc.craterlib.events.CraterEventBus; import me.hypherionmc.craterlib.platform.Services; import me.hypherionmc.hyperlighting.common.init.HLBlocks; import me.hypherionmc.hyperlighting.common.init.HLItems; +import me.hypherionmc.hyperlighting.integration.HyperLightingIntegrations; import net.minecraft.client.renderer.ItemBlockRenderTypes; /** @@ -17,6 +18,7 @@ public class ClientRegistration { public void registerAll() { Services.CLIENT_HELPER.registerCustomRenderTypes(HLBlocks.BLOCKS.getEntries(), HLItems.ITEMS.getEntries()); + HyperLightingIntegrations.registerClient(); } public void registerEvents() { diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/common/blocks/AdvancedCandleBlock.java b/Common/src/main/java/me/hypherionmc/hyperlighting/common/blocks/AdvancedCandleBlock.java new file mode 100644 index 0000000..3b6cdfe --- /dev/null +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/common/blocks/AdvancedCandleBlock.java @@ -0,0 +1,217 @@ +package me.hypherionmc.hyperlighting.common.blocks; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; +import me.hypherionmc.craterlib.api.rendering.DyableBlock; +import me.hypherionmc.craterlib.common.item.BlockItemDyable; +import me.hypherionmc.craterlib.util.BlockStateUtils; +import me.hypherionmc.craterlib.util.RenderUtils; +import me.hypherionmc.hyperlighting.api.LightableBlock; +import me.hypherionmc.hyperlighting.common.init.CommonRegistration; +import me.hypherionmc.hyperlighting.common.init.FlameParticles; +import me.hypherionmc.hyperlighting.common.init.HLItems; +import me.hypherionmc.hyperlighting.common.init.HLSounds; +import me.hypherionmc.hyperlighting.util.StackUtil; +import net.minecraft.ChatFormatting; +import net.minecraft.client.color.block.BlockColor; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.network.chat.Component; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.util.RandomSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.*; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.HorizontalDirectionalBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.AttachFace; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.EnumProperty; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.NotNull; +import java.util.List; +import java.util.Map; + +public class AdvancedCandleBlock extends HorizontalDirectionalBlock implements DyableBlock, LightableBlock { + + //region Properties + public static final BooleanProperty LIT = BlockStateProperties.LIT; + public static final EnumProperty COLOR = EnumProperty.create("color", DyeColor.class); + public static final EnumProperty ATTACH_FACE = EnumProperty.create("face", AttachFace.class, AttachFace.FLOOR, AttachFace.WALL); + //endregion + + //region Bounding Boxes + private static final Map SHAPES = Maps.newEnumMap( + ImmutableMap.of( + Direction.NORTH, Block.box(5.5D, 2.0D, 11.0D, 10.5D, 12.0D, 16.0D), + Direction.SOUTH, Block.box(5.5D, 2.0D, 0.0D, 10.5D, 12.0D, 5.0D), + Direction.WEST, Block.box(11.0D, 2.0D, 5.5D, 16.0D, 12.0D, 10.5D), + Direction.EAST, Block.box(0.0D, 2.0D, 5.5D, 5.0D, 12.0D, 10.5D), + Direction.UP, Block.box(6.0D, 0.0D, 6.0D, 10.0D, 10.0D, 10.0D) + ) + ); + //endregion + + private DyeColor color; + + public AdvancedCandleBlock(String name, DyeColor color, CreativeModeTab tab) { + super(Properties.of(Material.WOOD).noCollission().instabreak().lightLevel(BlockStateUtils.createLightLevelFromLitBlockState(15))); + this.registerDefaultState(this.defaultBlockState().setValue(FACING, Direction.NORTH).setValue(LIT, CommonRegistration.config.torchConfig.litByDefault).setValue(COLOR, color)); + this.color = color; + + HLItems.register(name, () -> new BlockItemDyable(this, new Item.Properties().tab(tab))); + } + + @Override + public VoxelShape getShape(BlockState blockState, BlockGetter level, BlockPos pos, CollisionContext context) { + return switch (blockState.getValue(ATTACH_FACE)) { + case FLOOR -> SHAPES.get(Direction.UP); + case WALL -> SHAPES.get(blockState.getValue(FACING)); + case CEILING -> null; + }; + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(LIT, ATTACH_FACE, FACING, COLOR); + super.createBlockStateDefinition(builder); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + Direction direction = context.getClickedFace(); + BlockState state = this.defaultBlockState(); + if (direction == Direction.UP) { + state = state.setValue(ATTACH_FACE, AttachFace.FLOOR); + } else { + state = state.setValue(ATTACH_FACE, AttachFace.WALL).setValue(FACING, direction); + } + return state.setValue(LIT, CommonRegistration.config.torchConfig.litByDefault); + } + + @Override + public BlockState updateShape(BlockState stateIn, Direction facing, BlockState neighbourState, LevelAccessor levelIn, BlockPos currentPos, BlockPos newPos) { + if (facing == Direction.DOWN && !this.isValidPosition(stateIn, levelIn, currentPos, facing)) { + return Blocks.AIR.defaultBlockState(); + } + return super.updateShape(stateIn, facing, neighbourState, levelIn, currentPos, newPos); + } + + public boolean isValidPosition(BlockState state, LevelAccessor levelAccessor, BlockPos pos, Direction direction) { + return canSupportCenter(levelAccessor, pos, direction); + } + + @Override + public void toggleLight(Level worldIn, BlockState state, BlockPos pos) { + state = state.setValue(LIT, !state.getValue(LIT)); + worldIn.setBlock(pos, state, 2); + if (!state.getValue(LIT)) { + worldIn.playSound(null, pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.3f, 1.0f); + } else { + worldIn.playSound(null, pos, HLSounds.TORCH_IGNITE.get(), SoundSource.BLOCKS, 0.3f, 1.0f); + } + worldIn.blockUpdated(pos, this); + } + + @Override + public BlockColor dyeHandler() { + return ((blockState, blockAndTintGetter, blockPos, i) -> { + if (blockState.getValue(LIT)) { + return RenderUtils.renderColorFromDye(blockState.getValue(COLOR)); + } else { + return RenderUtils.renderColorFromDye(DyeColor.BLACK); + } + }); + } + + @Override + public DyeColor defaultDyeColor() { + return this.defaultBlockState().getValue(COLOR); + } + + /** Check if player clicked the block with DYE and apply Color Tint **/ + @Override + public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { + if (!level.isClientSide()) { + if (!player.getItemInHand(handIn).isEmpty() && player.getItemInHand(handIn).getItem() instanceof DyeItem dyeItem) { + state = state.setValue(COLOR, dyeItem.getDyeColor()); + this.color = dyeItem.getDyeColor(); + level.setBlock(pos, state, 3); + level.sendBlockUpdated(pos, state, state, 3); + + if (!player.isCreative()) { + ItemStack stack = player.getItemInHand(handIn); + stack.shrink(1); + player.setItemInHand(handIn, stack); + } + return InteractionResult.CONSUME; + } else if (!CommonRegistration.config.torchConfig.requiresTool) { + state = state.cycle(LIT); + level.setBlock(pos, state, 3); + level.sendBlockUpdated(pos, state, state, 3); + if (!state.getValue(LIT)) { + level.playSound(null, pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.3f, 1.0f); + } else { + level.playSound(null, pos, HLSounds.TORCH_IGNITE.get(), SoundSource.BLOCKS, 0.3f, 1.0f); + } + return InteractionResult.CONSUME; + } + } + return InteractionResult.PASS; + } + + @Override + public void appendHoverText(ItemStack stack, BlockGetter level, List tooltip, TooltipFlag options) { + tooltip.add(Component.literal(ChatFormatting.YELLOW + "Dyable")); + tooltip.add(Component.literal(ChatFormatting.GREEN + "Color: " + color.getName())); + super.appendHoverText(stack, level, tooltip, options); + } + + @Override + public void animateTick(BlockState stateIn, Level levelIn, BlockPos pos, RandomSource random) { + if (stateIn.getValue(LIT)) { + DyeColor color = stateIn.getValue(COLOR); + + if (stateIn.getValue(ATTACH_FACE) == AttachFace.FLOOR) { + double d0 = (double) pos.getX() + 0.5D; + double d1 = (double) pos.getY() + 0.7D; + double d2 = (double) pos.getZ() + 0.5D; + levelIn.addParticle(ParticleTypes.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D); + levelIn.addParticle(FlameParticles.getParticleByColor(color).get(), d0, d1, d2, 0D, 0D, 0D); + } else { + Direction direction = stateIn.getValue(FACING); + double d0 = (double) pos.getX() + 0.5D; + double d1 = (double) pos.getY() + 0.7D; + double d2 = (double) pos.getZ() + 0.5D; + Direction direction1 = direction.getOpposite(); + levelIn.addParticle(ParticleTypes.SMOKE, d0 + 0.37D * (double) direction1.getStepX(), d1 + 0.15D, d2 + 0.37D * (double) direction1.getStepZ(), 0.0D, 0.0D, 0.0D); + levelIn.addParticle(FlameParticles.getParticleByColor(color).get(), d0 + 0.37D * (double) direction1.getStepX(), d1 + 0.15D, d2 + 0.37D * (double) direction1.getStepZ(), 0D, 0D, 0D); + } + } + } + + @Override + public @NotNull ItemStack getCloneItemStack(@NotNull BlockGetter level, @NotNull BlockPos pos, @NotNull BlockState state) { + return StackUtil.getColorStack(this, state.getValue(COLOR)); + } + + @Override + public List getDrops(BlockState blockState, LootContext.Builder lootBuilder) { + return List.of(StackUtil.getColorStack(this, blockState.getValue(COLOR))); + } +} \ No newline at end of file diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/common/config/HyperLightingConfig.java b/Common/src/main/java/me/hypherionmc/hyperlighting/common/config/HyperLightingConfig.java index dee2ada..1f151d8 100644 --- a/Common/src/main/java/me/hypherionmc/hyperlighting/common/config/HyperLightingConfig.java +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/common/config/HyperLightingConfig.java @@ -19,6 +19,11 @@ public class HyperLightingConfig extends ModuleConfig { @SubConfig public LanternConfig lanternConfig = new LanternConfig(); + @Path("candleConfig") + @SpecComment("Candle Configuration") + @SubConfig + public CandleConfig candleConfig = new CandleConfig(); + public HyperLightingConfig() { super(Constants.MOD_ID, "hyperlighting-common"); registerAndSetup(this); @@ -48,4 +53,14 @@ public class HyperLightingConfig extends ModuleConfig { @SpecComment("Is the Torch Lighter tool needed to light Lanterns") public boolean requiresTool = true; } + + public static class CandleConfig { + @Path("litByDefault") + @SpecComment("Should Candles be lit by default when placed") + public boolean litByDefault = false; + + @Path("requiresTool") + @SpecComment("Is the Torch Lighter tool needed to light Candles") + public boolean requiresTool = true; + } } diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/CommonRegistration.java b/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/CommonRegistration.java index cc36b4e..46aa7b3 100644 --- a/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/CommonRegistration.java +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/CommonRegistration.java @@ -2,6 +2,7 @@ package me.hypherionmc.hyperlighting.common.init; import me.hypherionmc.craterlib.client.gui.tabs.CreativeTabBuilder; import me.hypherionmc.hyperlighting.common.config.HyperLightingConfig; +import me.hypherionmc.hyperlighting.integration.HyperLightingIntegrations; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; @@ -18,6 +19,7 @@ public class CommonRegistration { HLBlocks.loadAll(); HLItems.loadAll(); HLEntities.loadAll(); + HyperLightingIntegrations.registerCommon(); } } diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/HLBlocks.java b/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/HLBlocks.java index cc5ad58..2692d2b 100644 --- a/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/HLBlocks.java +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/HLBlocks.java @@ -3,6 +3,7 @@ package me.hypherionmc.hyperlighting.common.init; import me.hypherionmc.craterlib.systems.reg.BlockRegistryObject; import me.hypherionmc.craterlib.systems.reg.RegistrationProvider; import me.hypherionmc.hyperlighting.Constants; +import me.hypherionmc.hyperlighting.common.blocks.AdvancedCandleBlock; import me.hypherionmc.hyperlighting.common.blocks.AdvancedLanternBlock; import me.hypherionmc.hyperlighting.common.blocks.AdvancedTorchBlock; import net.minecraft.core.Registry; @@ -21,6 +22,10 @@ public class HLBlocks { /* Lanterns */ public static BlockRegistryObject ADVANCED_LANTERN = register("advanced_lantern", () -> new AdvancedLanternBlock("advanced_lantern", DyeColor.ORANGE, CommonRegistration.LIGHTS_TAB)); + /* Candles */ + + public static BlockRegistryObject ADVANCED_CANDLE = register("advanced_candle", () -> new AdvancedCandleBlock("advanced_candle", DyeColor.ORANGE, CommonRegistration.LIGHTS_TAB)); + public static void loadAll() {} public static BlockRegistryObject register(String name, Supplier block) { diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/integration/HyperLightingIntegrations.java b/Common/src/main/java/me/hypherionmc/hyperlighting/integration/HyperLightingIntegrations.java new file mode 100644 index 0000000..076061e --- /dev/null +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/integration/HyperLightingIntegrations.java @@ -0,0 +1,22 @@ +package me.hypherionmc.hyperlighting.integration; + +import me.hypherionmc.craterlib.platform.Services; +import me.hypherionmc.hyperlighting.integration.shimmer.HyperLightingShimmer; + +/** + * @author HypherionSA + * @date 07/08/2022 + */ +public class HyperLightingIntegrations { + + public static void registerCommon() { + + } + + public static void registerClient() { + if (Services.PLATFORM.isModLoaded("shimmer")) { + HyperLightingShimmer.registerAll(); + } + } + +} diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/integration/shimmer/HyperLightingShimmer.java b/Common/src/main/java/me/hypherionmc/hyperlighting/integration/shimmer/HyperLightingShimmer.java new file mode 100644 index 0000000..bbf283d --- /dev/null +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/integration/shimmer/HyperLightingShimmer.java @@ -0,0 +1,46 @@ +package me.hypherionmc.hyperlighting.integration.shimmer; + +import com.lowdragmc.shimmer.client.light.ColorPointLight; +import com.lowdragmc.shimmer.client.light.LightManager; +import me.hypherionmc.craterlib.common.item.BlockItemDyable; +import me.hypherionmc.craterlib.util.RenderUtils; +import me.hypherionmc.hyperlighting.common.blocks.AdvancedLanternBlock; +import me.hypherionmc.hyperlighting.common.blocks.AdvancedTorchBlock; +import me.hypherionmc.hyperlighting.common.init.HLBlocks; +import net.minecraft.world.item.DyeColor; + +/** + * @author HypherionSA + * @date 07/08/2022 + */ +public class HyperLightingShimmer { + + public static void registerAll() { + registerBlocks(); + registerItems(); + } + + private static void registerItems() { + LightManager.INSTANCE.registerItemLight(HLBlocks.ADVANCED_TORCH.asItem(), stack -> new ColorPointLight.Template(stack.getCount() / 10 + 6, RenderUtils.alphaColorFromDye(((BlockItemDyable)stack.getItem()).getColor(stack), 1f))); + LightManager.INSTANCE.registerItemLight(HLBlocks.ADVANCED_LANTERN.asItem(), stack -> new ColorPointLight.Template(stack.getCount() / 10 + 6, RenderUtils.alphaColorFromDye(((BlockItemDyable)stack.getItem()).getColor(stack), 1f))); + } + + private static void registerBlocks() { + LightManager.INSTANCE.registerBlockLight(HLBlocks.ADVANCED_TORCH.get(), (state, blockPos) -> { + if (state.getValue(AdvancedTorchBlock.LIT)) { + DyeColor color = state.getValue(AdvancedTorchBlock.COLOR); + return new ColorPointLight.Template(10, RenderUtils.alphaColorFromDye(color, 1f)); + } + return null; + }); + + LightManager.INSTANCE.registerBlockLight(HLBlocks.ADVANCED_LANTERN.get(), (state, blockPos) -> { + if (state.getValue(AdvancedLanternBlock.LIT)) { + DyeColor color = state.getValue(AdvancedLanternBlock.COLOR); + return new ColorPointLight.Template(10, RenderUtils.alphaColorFromDye(color, 1f)); + } + return null; + }); + } + +} diff --git a/Common/src/main/resources/assets/hyperlighting/blockstates/advanced_candle.json b/Common/src/main/resources/assets/hyperlighting/blockstates/advanced_candle.json new file mode 100644 index 0000000..bbd2266 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/blockstates/advanced_candle.json @@ -0,0 +1,163 @@ +{ + "variants": { + "facing=up,lit=true,color=white": {"model": "hyperlighting:block/candle/white_candle"}, + "facing=up,lit=false,color=white": {"model": "hyperlighting:block/candle/white_candle"}, + "facing=east,lit=true,color=white": {"model": "hyperlighting:block/candle/white_candle"}, + "facing=east,lit=false,color=white": {"model": "hyperlighting:block/candle/white_candle"}, + "facing=south,lit=true,color=white": {"model": "hyperlighting:block/candle/white_candle", "y": 90}, + "facing=south,lit=false,color=white": {"model": "hyperlighting:block/candle/white_candle", "y": 90}, + "facing=west,lit=true,color=white": {"model": "hyperlighting:block/candle/white_candle", "y": 180}, + "facing=west,lit=false,color=white": {"model": "hyperlighting:block/candle/white_candle", "y": 180}, + "facing=north,lit=true,color=white": {"model": "hyperlighting:block/candle/white_candle", "y": 270}, + "facing=north,lit=false,color=white": {"model": "hyperlighting:block/candle/white_candle", "y": 270}, + "facing=up,lit=true,color=orange": {"model": "hyperlighting:block/candle/orange_candle"}, + "facing=up,lit=false,color=orange": {"model": "hyperlighting:block/candle/orange_candle"}, + "facing=east,lit=true,color=orange": {"model": "hyperlighting:block/candle/orange_candle"}, + "facing=east,lit=false,color=orange": {"model": "hyperlighting:block/candle/orange_candle"}, + "facing=south,lit=true,color=orange": {"model": "hyperlighting:block/candle/orange_candle", "y": 90}, + "facing=south,lit=false,color=orange": {"model": "hyperlighting:block/candle/orange_candle", "y": 90}, + "facing=west,lit=true,color=orange": {"model": "hyperlighting:block/candle/orange_candle", "y": 180}, + "facing=west,lit=false,color=orange": {"model": "hyperlighting:block/candle/orange_candle", "y": 180}, + "facing=north,lit=true,color=orange": {"model": "hyperlighting:block/candle/orange_candle", "y": 270}, + "facing=north,lit=false,color=orange": {"model": "hyperlighting:block/candle/orange_candle", "y": 270}, + "facing=up,lit=true,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle"}, + "facing=up,lit=false,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle"}, + "facing=east,lit=true,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle"}, + "facing=east,lit=false,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle"}, + "facing=south,lit=true,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle", "y": 90}, + "facing=south,lit=false,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle", "y": 90}, + "facing=west,lit=true,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle", "y": 180}, + "facing=west,lit=false,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle", "y": 180}, + "facing=north,lit=true,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle", "y": 270}, + "facing=north,lit=false,color=magenta": {"model": "hyperlighting:block/candle/magenta_candle", "y": 270}, + "facing=up,lit=true,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle"}, + "facing=up,lit=false,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle"}, + "facing=east,lit=true,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle"}, + "facing=east,lit=false,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle"}, + "facing=south,lit=true,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle", "y": 90}, + "facing=south,lit=false,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle", "y": 90}, + "facing=west,lit=true,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle", "y": 180}, + "facing=west,lit=false,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle", "y": 180}, + "facing=north,lit=true,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle", "y": 270}, + "facing=north,lit=false,color=light_blue": {"model": "hyperlighting:block/candle/light_blue_candle", "y": 270}, + "facing=up,lit=true,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle"}, + "facing=up,lit=false,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle"}, + "facing=east,lit=true,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle"}, + "facing=east,lit=false,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle"}, + "facing=south,lit=true,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle", "y": 90}, + "facing=south,lit=false,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle", "y": 90}, + "facing=west,lit=true,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle", "y": 180}, + "facing=west,lit=false,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle", "y": 180}, + "facing=north,lit=true,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle", "y": 270}, + "facing=north,lit=false,color=yellow": {"model": "hyperlighting:block/candle/yellow_candle", "y": 270}, + "facing=up,lit=true,color=lime": {"model": "hyperlighting:block/candle/lime_candle"}, + "facing=up,lit=false,color=lime": {"model": "hyperlighting:block/candle/lime_candle"}, + "facing=east,lit=true,color=lime": {"model": "hyperlighting:block/candle/lime_candle"}, + "facing=east,lit=false,color=lime": {"model": "hyperlighting:block/candle/lime_candle"}, + "facing=south,lit=true,color=lime": {"model": "hyperlighting:block/candle/lime_candle", "y": 90}, + "facing=south,lit=false,color=lime": {"model": "hyperlighting:block/candle/lime_candle", "y": 90}, + "facing=west,lit=true,color=lime": {"model": "hyperlighting:block/candle/lime_candle", "y": 180}, + "facing=west,lit=false,color=lime": {"model": "hyperlighting:block/candle/lime_candle", "y": 180}, + "facing=north,lit=true,color=lime": {"model": "hyperlighting:block/candle/lime_candle", "y": 270}, + "facing=north,lit=false,color=lime": {"model": "hyperlighting:block/candle/lime_candle", "y": 270}, + "facing=up,lit=true,color=pink": {"model": "hyperlighting:block/candle/pink_candle"}, + "facing=up,lit=false,color=pink": {"model": "hyperlighting:block/candle/pink_candle"}, + "facing=east,lit=true,color=pink": {"model": "hyperlighting:block/candle/pink_candle"}, + "facing=east,lit=false,color=pink": {"model": "hyperlighting:block/candle/pink_candle"}, + "facing=south,lit=true,color=pink": {"model": "hyperlighting:block/candle/pink_candle", "y": 90}, + "facing=south,lit=false,color=pink": {"model": "hyperlighting:block/candle/pink_candle", "y": 90}, + "facing=west,lit=true,color=pink": {"model": "hyperlighting:block/candle/pink_candle", "y": 180}, + "facing=west,lit=false,color=pink": {"model": "hyperlighting:block/candle/pink_candle", "y": 180}, + "facing=north,lit=true,color=pink": {"model": "hyperlighting:block/candle/pink_candle", "y": 270}, + "facing=north,lit=false,color=pink": {"model": "hyperlighting:block/candle/pink_candle", "y": 270}, + "facing=up,lit=true,color=gray": {"model": "hyperlighting:block/candle/gray_candle"}, + "facing=up,lit=false,color=gray": {"model": "hyperlighting:block/candle/gray_candle"}, + "facing=east,lit=true,color=gray": {"model": "hyperlighting:block/candle/gray_candle"}, + "facing=east,lit=false,color=gray": {"model": "hyperlighting:block/candle/gray_candle"}, + "facing=south,lit=true,color=gray": {"model": "hyperlighting:block/candle/gray_candle", "y": 90}, + "facing=south,lit=false,color=gray": {"model": "hyperlighting:block/candle/gray_candle", "y": 90}, + "facing=west,lit=true,color=gray": {"model": "hyperlighting:block/candle/gray_candle", "y": 180}, + "facing=west,lit=false,color=gray": {"model": "hyperlighting:block/candle/gray_candle", "y": 180}, + "facing=north,lit=true,color=gray": {"model": "hyperlighting:block/candle/gray_candle", "y": 270}, + "facing=north,lit=false,color=gray": {"model": "hyperlighting:block/candle/gray_candle", "y": 270}, + "facing=up,lit=true,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle"}, + "facing=up,lit=false,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle"}, + "facing=east,lit=true,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle"}, + "facing=east,lit=false,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle"}, + "facing=south,lit=true,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle", "y": 90}, + "facing=south,lit=false,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle", "y": 90}, + "facing=west,lit=true,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle", "y": 180}, + "facing=west,lit=false,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle", "y": 180}, + "facing=north,lit=true,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle", "y": 270}, + "facing=north,lit=false,color=light_gray": {"model": "hyperlighting:block/candle/light_gray_candle", "y": 270}, + "facing=up,lit=true,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle"}, + "facing=up,lit=false,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle"}, + "facing=east,lit=true,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle"}, + "facing=east,lit=false,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle"}, + "facing=south,lit=true,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle", "y": 90}, + "facing=south,lit=false,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle", "y": 90}, + "facing=west,lit=true,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle", "y": 180}, + "facing=west,lit=false,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle", "y": 180}, + "facing=north,lit=true,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle", "y": 270}, + "facing=north,lit=false,color=cyan": {"model": "hyperlighting:block/candle/cyan_candle", "y": 270}, + "facing=up,lit=true,color=purple": {"model": "hyperlighting:block/candle/purple_candle"}, + "facing=up,lit=false,color=purple": {"model": "hyperlighting:block/candle/purple_candle"}, + "facing=east,lit=true,color=purple": {"model": "hyperlighting:block/candle/purple_candle"}, + "facing=east,lit=false,color=purple": {"model": "hyperlighting:block/candle/purple_candle"}, + "facing=south,lit=true,color=purple": {"model": "hyperlighting:block/candle/purple_candle", "y": 90}, + "facing=south,lit=false,color=purple": {"model": "hyperlighting:block/candle/purple_candle", "y": 90}, + "facing=west,lit=true,color=purple": {"model": "hyperlighting:block/candle/purple_candle", "y": 180}, + "facing=west,lit=false,color=purple": {"model": "hyperlighting:block/candle/purple_candle", "y": 180}, + "facing=north,lit=true,color=purple": {"model": "hyperlighting:block/candle/purple_candle", "y": 270}, + "facing=north,lit=false,color=purple": {"model": "hyperlighting:block/candle/purple_candle", "y": 270}, + "facing=up,lit=true,color=blue": {"model": "hyperlighting:block/candle/blue_candle"}, + "facing=up,lit=false,color=blue": {"model": "hyperlighting:block/candle/blue_candle"}, + "facing=east,lit=true,color=blue": {"model": "hyperlighting:block/candle/blue_candle"}, + "facing=east,lit=false,color=blue": {"model": "hyperlighting:block/candle/blue_candle"}, + "facing=south,lit=true,color=blue": {"model": "hyperlighting:block/candle/blue_candle", "y": 90}, + "facing=south,lit=false,color=blue": {"model": "hyperlighting:block/candle/blue_candle", "y": 90}, + "facing=west,lit=true,color=blue": {"model": "hyperlighting:block/candle/blue_candle", "y": 180}, + "facing=west,lit=false,color=blue": {"model": "hyperlighting:block/candle/blue_candle", "y": 180}, + "facing=north,lit=true,color=blue": {"model": "hyperlighting:block/candle/blue_candle", "y": 270}, + "facing=north,lit=false,color=blue": {"model": "hyperlighting:block/candle/blue_candle", "y": 270}, + "facing=up,lit=true,color=brown": {"model": "hyperlighting:block/candle/brown_candle"}, + "facing=up,lit=false,color=brown": {"model": "hyperlighting:block/candle/brown_candle"}, + "facing=east,lit=true,color=brown": {"model": "hyperlighting:block/candle/brown_candle"}, + "facing=east,lit=false,color=brown": {"model": "hyperlighting:block/candle/brown_candle"}, + "facing=south,lit=true,color=brown": {"model": "hyperlighting:block/candle/brown_candle", "y": 90}, + "facing=south,lit=false,color=brown": {"model": "hyperlighting:block/candle/brown_candle", "y": 90}, + "facing=west,lit=true,color=brown": {"model": "hyperlighting:block/candle/brown_candle", "y": 180}, + "facing=west,lit=false,color=brown": {"model": "hyperlighting:block/candle/brown_candle", "y": 180}, + "facing=north,lit=true,color=brown": {"model": "hyperlighting:block/candle/brown_candle", "y": 270}, + "facing=north,lit=false,color=brown": {"model": "hyperlighting:block/candle/brown_candle", "y": 270}, + "facing=up,lit=true,color=green": {"model": "hyperlighting:block/candle/green_candle"}, + "facing=up,lit=false,color=green": {"model": "hyperlighting:block/candle/green_candle"}, + "facing=east,lit=true,color=green": {"model": "hyperlighting:block/candle/green_candle"}, + "facing=east,lit=false,color=green": {"model": "hyperlighting:block/candle/green_candle"}, + "facing=south,lit=true,color=green": {"model": "hyperlighting:block/candle/green_candle", "y": 90}, + "facing=south,lit=false,color=green": {"model": "hyperlighting:block/candle/green_candle", "y": 90}, + "facing=west,lit=true,color=green": {"model": "hyperlighting:block/candle/green_candle", "y": 180}, + "facing=west,lit=false,color=green": {"model": "hyperlighting:block/candle/green_candle", "y": 180}, + "facing=north,lit=true,color=green": {"model": "hyperlighting:block/candle/green_candle", "y": 270}, + "facing=north,lit=false,color=green": {"model": "hyperlighting:block/candle/green_candle", "y": 270}, + "facing=up,lit=true,color=red": {"model": "hyperlighting:block/candle/red_candle"}, + "facing=up,lit=false,color=red": {"model": "hyperlighting:block/candle/red_candle"}, + "facing=east,lit=true,color=red": {"model": "hyperlighting:block/candle/red_candle"}, + "facing=east,lit=false,color=red": {"model": "hyperlighting:block/candle/red_candle"}, + "facing=south,lit=true,color=red": {"model": "hyperlighting:block/candle/red_candle", "y": 90}, + "facing=south,lit=false,color=red": {"model": "hyperlighting:block/candle/red_candle", "y": 90}, + "facing=west,lit=true,color=red": {"model": "hyperlighting:block/candle/red_candle", "y": 180}, + "facing=west,lit=false,color=red": {"model": "hyperlighting:block/candle/red_candle", "y": 180}, + "facing=north,lit=true,color=red": {"model": "hyperlighting:block/candle/red_candle", "y": 270}, + "facing=north,lit=false,color=red": {"model": "hyperlighting:block/candle/red_candle", "y": 270}, + "facing=up,lit=true,color=black": {"model": "hyperlighting:block/candle/black_candle"}, + "facing=up,lit=false,color=black": {"model": "hyperlighting:block/candle/black_candle"}, + "facing=east,lit=true,color=black": {"model": "hyperlighting:block/candle/black_candle"}, + "facing=east,lit=false,color=black": {"model": "hyperlighting:block/candle/black_candle"}, + "facing=south,lit=true,color=black": {"model": "hyperlighting:block/candle/black_candle", "y": 90}, + "facing=south,lit=false,color=black": {"model": "hyperlighting:block/candle/black_candle", "y": 90}, + "facing=west,lit=true,color=black": {"model": "hyperlighting:block/candle/black_candle", "y": 180}, + "facing=west,lit=false,color=black": {"model": "hyperlighting:block/candle/black_candle", "y": 180}, + "facing=north,lit=true,color=black": {"model": "hyperlighting:block/candle/black_candle", "y": 270}, + "facing=north,lit=false,color=black": {"model": "hyperlighting:block/candle/black_candle", "y": 270} } +} \ No newline at end of file diff --git a/Common/src/main/resources/assets/hyperlighting/lang/en_us.json b/Common/src/main/resources/assets/hyperlighting/lang/en_us.json index 3009bb7..e9463f6 100644 --- a/Common/src/main/resources/assets/hyperlighting/lang/en_us.json +++ b/Common/src/main/resources/assets/hyperlighting/lang/en_us.json @@ -1,6 +1,7 @@ { "block.hyperlighting.advanced_torch": "Advanced Torch (%s)", "block.hyperlighting.advanced_lantern": "Advanced Lantern (%s)", + "block.hyperlighting.advanced_candle": "Advanced Candle (%s)", "item.hyperlighting.lighter_tool": "Torch Lighter Tool", diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/black_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/black_candle.json new file mode 100644 index 0000000..b6b0037 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/black_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/black" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/blue_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/blue_candle.json new file mode 100644 index 0000000..1a0474a --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/blue_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/blue" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/brown_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/brown_candle.json new file mode 100644 index 0000000..5748bda --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/brown_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/brown" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/cyan_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/cyan_candle.json new file mode 100644 index 0000000..d9244c5 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/cyan_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/cyan" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/gray_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/gray_candle.json new file mode 100644 index 0000000..de147a3 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/gray_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/gray" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/green_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/green_candle.json new file mode 100644 index 0000000..f57d017 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/green_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/green" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/light_blue_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/light_blue_candle.json new file mode 100644 index 0000000..11e92ef --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/light_blue_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/light_blue" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/light_gray_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/light_gray_candle.json new file mode 100644 index 0000000..c52a378 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/light_gray_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/light_gray" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/lime_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/lime_candle.json new file mode 100644 index 0000000..2e19410 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/lime_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/lime" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/magenta_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/magenta_candle.json new file mode 100644 index 0000000..d2ca77b --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/magenta_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/magenta" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/orange_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/orange_candle.json new file mode 100644 index 0000000..89d22d6 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/orange_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/orange" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/pink_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/pink_candle.json new file mode 100644 index 0000000..df5e21b --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/pink_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/pink" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/purple_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/purple_candle.json new file mode 100644 index 0000000..6861044 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/purple_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/purple" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/red_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/red_candle.json new file mode 100644 index 0000000..a2b2063 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/red_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/red" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/white_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/white_candle.json new file mode 100644 index 0000000..06a10b5 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/white_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/white" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle/yellow_candle.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle/yellow_candle.json new file mode 100644 index 0000000..60374a0 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle/yellow_candle.json @@ -0,0 +1,6 @@ +{ + "parent": "hyperlighting:block/candle_base", + "textures": { + "0": "hyperlighting:block/candle/color/yellow" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/candle_base.json b/Common/src/main/resources/assets/hyperlighting/models/block/candle_base.json new file mode 100644 index 0000000..adec86e --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/candle_base.json @@ -0,0 +1,50 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "hyperlighting:block/candle_wax", + "1": "minecraft:block/coal_block", + "particle": "hyperlighting:block/candle_wax" + }, + "elements": [ + { + "name": "candle_body", + "from": [7, 0, 7], + "to": [9, 10, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [0, -1, 0]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "east": {"uv": [0, 0, 2, 10], "texture": "#0"}, + "south": {"uv": [0, 0, 2, 10], "texture": "#0"}, + "west": {"uv": [0, 0, 2, 10], "texture": "#0"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#0"} + } + }, + { + "from": [7.71194, 9.94134, 7.75], + "to": [8.21194, 10.69134, 8.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7.96194, 7.19134, 8]}, + "faces": { + "north": {"uv": [0, 0, 15.5, 15.75], "texture": "#1"}, + "east": {"uv": [0, 0, 15.5, 15.75], "texture": "#1"}, + "south": {"uv": [0, 0, 15.5, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 15.5, 15.75], "texture": "#1"}, + "up": {"uv": [0, 0, 15.5, 15.5], "texture": "#1"}, + "down": {"uv": [0, 0, 15.5, 15.5], "texture": "#1"} + } + }, + { + "from": [7.53963, 10.59567, 7.75], + "to": [8.03963, 11.34567, 8.25], + "rotation": {"angle": 22.5, "axis": "z", "origin": [7.8853, 11.07664, 8]}, + "faces": { + "north": {"uv": [0, 0, 15.5, 15.75], "texture": "#1"}, + "east": {"uv": [0, 0, 15.5, 15.75], "texture": "#1"}, + "south": {"uv": [0, 0, 15.5, 15.75], "texture": "#1"}, + "west": {"uv": [0, 0, 15.5, 15.75], "texture": "#1"}, + "up": {"uv": [0, 0, 15.5, 15.5], "texture": "#1"}, + "down": {"uv": [0, 0, 15.5, 15.5], "texture": "#1"} + } + } + ] +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/item/advanced_candle.json b/Common/src/main/resources/assets/hyperlighting/models/item/advanced_candle.json new file mode 100644 index 0000000..460b377 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/item/advanced_candle.json @@ -0,0 +1,21 @@ +{ + "parent": "hyperlighting:block/candle_base", + "overrides": [ + { "predicate": { "color": 0 }, "model": "hyperlighting:block/candle/white_candle" }, + { "predicate": { "color": 1 }, "model": "hyperlighting:block/candle/orange_candle" }, + { "predicate": { "color": 2 }, "model": "hyperlighting:block/candle/magenta_candle" }, + { "predicate": { "color": 3 }, "model": "hyperlighting:block/candle/light_blue_candle" }, + { "predicate": { "color": 4 }, "model": "hyperlighting:block/candle/yellow_candle" }, + { "predicate": { "color": 5 }, "model": "hyperlighting:block/candle/lime_candle" }, + { "predicate": { "color": 6 }, "model": "hyperlighting:block/candle/pink_candle" }, + { "predicate": { "color": 7 }, "model": "hyperlighting:block/candle/gray_candle" }, + { "predicate": { "color": 8 }, "model": "hyperlighting:block/candle/light_gray_candle" }, + { "predicate": { "color": 9 }, "model": "hyperlighting:block/candle/cyan_candle" }, + { "predicate": { "color": 10 }, "model": "hyperlighting:block/candle/purple_candle" }, + { "predicate": { "color": 11 }, "model": "hyperlighting:block/candle/blue_candle" }, + { "predicate": { "color": 12 }, "model": "hyperlighting:block/candle/brown_candle" }, + { "predicate": { "color": 13 }, "model": "hyperlighting:block/candle/green_candle" }, + { "predicate": { "color": 14 }, "model": "hyperlighting:block/candle/red_candle" }, + { "predicate": { "color": 15 }, "model": "hyperlighting:block/candle/black_candle" } + ] +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/candle_wax.png b/Common/src/main/resources/assets/hyperlighting/textures/block/candle_wax.png new file mode 100644 index 0000000000000000000000000000000000000000..c16528f607f23f9bce65331a7870dd41a3f29c08 GIT binary patch literal 2034 zcmcIleQXnD7(ZYb#)f=O942_&wus>MKHIxq=)T(FM(CKMN=b%ty?fhT*7mx)+uGG& z#sFbv1Yr`HsQjZMp9V0PP>Ifj;uJ-8{x1@4f#t zf{g!3@puidd$Ay?A&V%hK46K3A`p!r3(8^H`5K?7*%izQRyNc3{h_Zqglb zf<~n}u7RcTT8|WOlI${8R*Ei&36LNJ3=xfmf?-{VIj~_~0j|y41cnYnj3x(GVFpCK z?mE<|Y5=ubY`8?RG|Jg6l#R60>M|^-(`golN9Qh6!m=9GpEpIN_W+k@00%~sG>MZePT4&)DX@%SwazDLfh0$u zZrBR4Xo#Z&tFq#68x7R$7HYz}A%-PT<8ok7ltocwf%G%HUj`CxB}IU<5-a1PNb@*v ztB|}Ep$McM2WpFFS*>KKg@&I1OX&)!~MUJ)66osL(B=}V= zB*IovLSg_Ak#GP*|5f8ugR16MW#~C$HZ)|1SyU@JtX^CC6iPN@lw| zFv+Ylkg@b_SQui zHLa&J6zuLXxKv-fxBWuA;fm$lt(T_#HhcN!Pvso$DWto5#vt3TmN3^X2YXKU4K9%4 zrT#bnT7<1h&B2h9so2co;@)k$ziBGIacAhx-1gMBwpizs!)-^O@a`?|*exf{7QX%I zymu;GIhBK{6Zwg}ZSyF-qhvKoQ#&`F4kmNG+fyI!$C%A77n*yy>%u_q*hA-U_gz6d zw;XFJINCRO^Y7wz;x!9)Y)2V^^{-g_!J*kx*Uo5IhV`CUxjkjS)VjH2!s?_r?jpF& z?n>Fa-}M$s{`_+P&EzJO?p(L`SmHe6i57L0TvYtCd*$XPfe#8Av4a zu`L64XRv|q@1ONfYc$@1eZr#d{VV zS%0^bk6zf_-~98`e2PgPxptSkR9L{TJ$|ZS{jH`A+{P8t=M3ClvTx7zp^HS8Riwt- literal 0 HcmV?d00001 diff --git a/Fabric/build.gradle b/Fabric/build.gradle index b0daf4f..95346f4 100644 --- a/Fabric/build.gradle +++ b/Fabric/build.gradle @@ -20,6 +20,18 @@ dependencies { modApi("com.terraformersmc:modmenu:${mod_menu_version}") { exclude(group: "net.fabricmc.fabric-api") } + + // Sodium + modImplementation ("curse.maven:sodium-394468:${sodium_version}") { + exclude(group: "net.fabricmc.fabric-api") + } + // This is a dependency of Sodium.... + implementation 'org.joml:joml:1.10.4' + + // Shimmer + modImplementation ("com.lowdragmc.shimmer:Shimmer-fabric-1.19.1:${shimmer_version}") { + exclude(group: "net.fabricmc.fabric-api") + } } loom { diff --git a/Forge/build.gradle b/Forge/build.gradle index 8344afe..9ae351a 100644 --- a/Forge/build.gradle +++ b/Forge/build.gradle @@ -84,6 +84,12 @@ dependencies { compileOnly project(":Common") annotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor' implementation fg.deobf("me.hypherionmc.craterlib:CraterLib-forge-1.19.1:${craterlib_version}") + + // Rubidium + implementation fg.deobf("curse.maven:rubidium-574856:${ribidium_version}") + + // Shimmer + implementation fg.deobf("com.lowdragmc.shimmer:Shimmer-forge-1.19.1:${shimmer_version}") } tasks.withType(JavaCompile) { diff --git a/build.gradle b/build.gradle index 5dc023e..a693ae1 100644 --- a/build.gradle +++ b/build.gradle @@ -42,13 +42,21 @@ subprojects { url = 'https://repo.spongepowered.org/repository/maven-public/' } maven { - name = 'First Dark Dev Maven' + name = 'First Dark Dev Maven Snapshots' url = 'https://maven.firstdarkdev.xyz/snapshots' } + maven { + name = 'First Dark Dev Maven Releases' + url = 'https://maven.firstdarkdev.xyz/releases' + } maven { name = "TerraformersMC Maven" url = "https://maven.terraformersmc.com/releases" } + maven { + name = "Curseforge Maven" + url 'https://cfa2.cursemaven.com' + } } diff --git a/gradle.properties b/gradle.properties index 16a69e3..562eb2b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,5 +28,8 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false #dependencies -craterlib_version=1.0.5d +craterlib_version=1.0.6d mod_menu_version=4.0.5 +shimmer_version=0.1.11d +sodium_version=3820973 +ribidium_version=3864138