diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/common/config/HyperLightingConfig.java b/Common/src/main/java/me/hypherionmc/hyperlighting/client/config/HyperLightingClientConfig.java similarity index 61% rename from Common/src/main/java/me/hypherionmc/hyperlighting/common/config/HyperLightingConfig.java rename to Common/src/main/java/me/hypherionmc/hyperlighting/client/config/HyperLightingClientConfig.java index 1f151d8..4391421 100644 --- a/Common/src/main/java/me/hypherionmc/hyperlighting/common/config/HyperLightingConfig.java +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/client/config/HyperLightingClientConfig.java @@ -7,7 +7,7 @@ import me.hypherionmc.hyperlighting.common.init.CommonRegistration; import me.hypherionmc.nightconfig.core.conversion.Path; import me.hypherionmc.nightconfig.core.conversion.SpecComment; -public class HyperLightingConfig extends ModuleConfig { +public class HyperLightingClientConfig extends ModuleConfig { @Path("torchConfig") @SpecComment("Torch Configuration") @@ -19,6 +19,13 @@ public class HyperLightingConfig extends ModuleConfig { @SubConfig public LanternConfig lanternConfig = new LanternConfig(); + @Path("campfireConfig") + @SpecComment("Campfire Configuration") + @SubConfig + public CampfireConfig campfireConfig = new CampfireConfig(); + + public HyperLightingClientConfig() { + super(Constants.MOD_ID, "hyperlighting-client"); @Path("candleConfig") @SpecComment("Candle Configuration") @SubConfig @@ -42,6 +49,10 @@ public class HyperLightingConfig extends ModuleConfig { @Path("requiresTool") @SpecComment("Is the Torch Lighter tool needed to light torches") public boolean requiresTool = true; + + @Path("coloredLighting") + @SpecComment("Should Torches emit colored Lighting when SHIMMER is installed") + public boolean coloredLighting = true; } public static class LanternConfig { @@ -52,6 +63,24 @@ public class HyperLightingConfig extends ModuleConfig { @Path("requiresTool") @SpecComment("Is the Torch Lighter tool needed to light Lanterns") public boolean requiresTool = true; + + @Path("coloredLighting") + @SpecComment("Should Lanterns emit colored Lighting when SHIMMER is installed") + public boolean coloredLighting = true; + } + + public static class CampfireConfig { + @Path("litByDefault") + @SpecComment("Should Campfires be lit by default when placed") + public boolean litByDefault = false; + + @Path("requiresTool") + @SpecComment("Is the Torch Lighter tool needed to light Campfires") + public boolean requiresTool = true; + + @Path("coloredLighting") + @SpecComment("Should Campfires emit colored Lighting when SHIMMER is installed") + public boolean coloredLighting = true; } public static class CandleConfig { @@ -62,5 +91,9 @@ public class HyperLightingConfig extends ModuleConfig { @Path("requiresTool") @SpecComment("Is the Torch Lighter tool needed to light Candles") public boolean requiresTool = true; + + @Path("coloredLighting") + @SpecComment("Should Candles emit colored Lighting when SHIMMER is installed") + public boolean coloredLighting = true; } } 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 23e65f7..aff1c82 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 @@ -9,6 +9,7 @@ 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; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; /** * @author HypherionSA diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/client/renderer/blockentity/AdvancedCampfireRenderer.java b/Common/src/main/java/me/hypherionmc/hyperlighting/client/renderer/blockentity/AdvancedCampfireRenderer.java new file mode 100644 index 0000000..5e4a3be --- /dev/null +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/client/renderer/blockentity/AdvancedCampfireRenderer.java @@ -0,0 +1,51 @@ +package me.hypherionmc.hyperlighting.client.renderer.blockentity; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Vector3f; +import me.hypherionmc.hyperlighting.common.blockentities.AdvancedCampfireBlockEntity; +import me.hypherionmc.hyperlighting.common.blocks.AdvancedCampfire; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.world.item.ItemStack; + +/** + * @author HypherionSA + * @date 27/08/2022 + */ +public class AdvancedCampfireRenderer implements BlockEntityRenderer { + + private static final float SIZE = 0.375F; + private final ItemRenderer itemRenderer; + + public AdvancedCampfireRenderer(BlockEntityRendererProvider.Context context) { + this.itemRenderer = context.getItemRenderer(); + } + + @Override + public void render(AdvancedCampfireBlockEntity campfire, float tick, PoseStack poseStack, MultiBufferSource bufferSource, int combinedLight, int overlay) { + Direction direction = campfire.getBlockState().getValue(AdvancedCampfire.FACING); + NonNullList items = campfire.getItems(); + int blockPos = (int)campfire.getBlockPos().asLong(); + + for(int i = 0; i < items.size(); ++i) { + ItemStack $$10 = items.get(i); + if ($$10 != ItemStack.EMPTY) { + poseStack.pushPose(); + poseStack.translate(0.5, 0.44921875, 0.5); + Direction direction1 = Direction.from2DDataValue((i + direction.get2DDataValue()) % 4); + float rot = -direction1.toYRot(); + poseStack.mulPose(Vector3f.YP.rotationDegrees(rot)); + poseStack.mulPose(Vector3f.XP.rotationDegrees(90.0F)); + poseStack.translate(-0.3125, -0.3125, 0.0); + poseStack.scale(0.375F, 0.375F, 0.375F); + this.itemRenderer.renderStatic($$10, ItemTransforms.TransformType.FIXED, combinedLight, overlay, poseStack, bufferSource, blockPos + i); + poseStack.popPose(); + } + } + } +} diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/common/blockentities/AdvancedCampfireBlockEntity.java b/Common/src/main/java/me/hypherionmc/hyperlighting/common/blockentities/AdvancedCampfireBlockEntity.java new file mode 100644 index 0000000..6ed3374 --- /dev/null +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/common/blockentities/AdvancedCampfireBlockEntity.java @@ -0,0 +1,191 @@ +package me.hypherionmc.hyperlighting.common.blockentities; + +import me.hypherionmc.craterlib.api.blockentities.ISidedTickable; +import me.hypherionmc.hyperlighting.common.blocks.AdvancedCampfire; +import me.hypherionmc.hyperlighting.common.init.HLBlockEntities; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; +import net.minecraft.util.Mth; +import net.minecraft.util.RandomSource; +import net.minecraft.world.*; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CampfireCookingRecipe; +import net.minecraft.world.item.crafting.RecipeManager; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.gameevent.GameEvent; +import org.jetbrains.annotations.Nullable; + +import java.util.Optional; + +/** + * @author HypherionSA + * @date 27/08/2022 + */ +public class AdvancedCampfireBlockEntity extends BlockEntity implements Clearable, ISidedTickable { + + private static final int BURN_COOL_SPEED = 2; + private static final int NUM_SLOTS = 4; + + private final NonNullList items = NonNullList.withSize(4, ItemStack.EMPTY); + + private final int[] cookingProgress = new int[4]; + private final int[] cookingTime = new int[4]; + + private final RecipeManager.CachedCheck quickCheck = RecipeManager.createCheck(RecipeType.CAMPFIRE_COOKING); + + public AdvancedCampfireBlockEntity(BlockPos pos, BlockState state) { + super(HLBlockEntities.CAMPFIRE.get(), pos, state); + } + + @Override + public void serverTick(Level level, BlockPos blockPos, BlockState blockState, BlockEntity blockEntity) { + boolean isDirty = false; + AdvancedCampfireBlockEntity be = (AdvancedCampfireBlockEntity) blockEntity; + + for (int i = 0; i < be.items.size(); i++) { + ItemStack inStack = be.items.get(i); + if (!inStack.isEmpty()) { + isDirty = true; + int time = be.cookingProgress[i]++; + if (be.cookingProgress[i] >= be.cookingTime[i]) { + Container container = new SimpleContainer(inStack); + ItemStack outStack = be.quickCheck.getRecipeFor(container, level).map(r -> r.assemble(container)).orElse(inStack); + Containers.dropItemStack(level, blockPos.getX(), blockPos.getY(), blockPos.getZ(), outStack); + be.items.set(i, ItemStack.EMPTY); + level.sendBlockUpdated(blockPos, blockState, blockState, 3); + level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(blockState)); + } + } + } + + if (isDirty) { + setChanged(level, blockPos, blockState); + } + } + + public static void cooldownTick(Level level, BlockPos blockPos, BlockState state, AdvancedCampfireBlockEntity be) { + boolean isDirty = false; + + for (int i = 0; i < be.items.size(); ++i) { + if (be.cookingProgress[i] > 0) { + isDirty = true; + be.cookingProgress[i] = Mth.clamp(be.cookingProgress[i] - 2, 0, be.cookingTime[i]); + } + } + + if (isDirty) { + setChanged(level, blockPos, state); + } + } + + @Override + public void clientTick(Level level, BlockPos blockPos, BlockState blockState, BlockEntity blockEntity) { + AdvancedCampfireBlockEntity campfireBlockEntity = (AdvancedCampfireBlockEntity) blockEntity; + RandomSource randomSource = level.random; + int i; + if (randomSource.nextFloat() < 0.11F) { + for(i = 0; i < randomSource.nextInt(2) + 2; ++i) { + AdvancedCampfire.makeParticles(level, blockPos, blockState.getValue(AdvancedCampfire.SIGNAL_FIRE), false); + } + } + + i = blockState.getValue(AdvancedCampfire.FACING).get2DDataValue(); + + for(int j = 0; j < campfireBlockEntity.items.size(); ++j) { + if (!campfireBlockEntity.items.get(j).isEmpty() && randomSource.nextFloat() < 0.2F) { + Direction direction = Direction.from2DDataValue(Math.floorMod(j + i, 4)); + float f = 0.3125F; + double d = (double)blockPos.getX() + 0.5 - (double)((float)direction.getStepX() * 0.3125F) + (double)((float)direction.getClockWise().getStepX() * 0.3125F); + double e = (double)blockPos.getY() + 0.5; + double g = (double)blockPos.getZ() + 0.5 - (double)((float)direction.getStepZ() * 0.3125F) + (double)((float)direction.getClockWise().getStepZ() * 0.3125F); + + for(int k = 0; k < 4; ++k) { + level.addParticle(ParticleTypes.SMOKE, d, e, g, 0.0, 5.0E-4, 0.0); + } + } + } + } + + public NonNullList getItems() { + return this.items; + } + + @Override + public void load(CompoundTag compoundTag) { + super.load(compoundTag); + this.items.clear(); + ContainerHelper.loadAllItems(compoundTag, this.items); + int[] is; + if (compoundTag.contains("CookingTimes", 11)) { + is = compoundTag.getIntArray("CookingTimes"); + System.arraycopy(is, 0, this.cookingProgress, 0, Math.min(this.cookingTime.length, is.length)); + } + + if (compoundTag.contains("CookingTotalTimes", 11)) { + is = compoundTag.getIntArray("CookingTotalTimes"); + System.arraycopy(is, 0, this.cookingTime, 0, Math.min(this.cookingTime.length, is.length)); + } + } + + protected void saveAdditional(CompoundTag compoundTag) { + super.saveAdditional(compoundTag); + ContainerHelper.saveAllItems(compoundTag, this.items, true); + compoundTag.putIntArray("CookingTimes", this.cookingProgress); + compoundTag.putIntArray("CookingTotalTimes", this.cookingTime); + } + + @Override + public ClientboundBlockEntityDataPacket getUpdatePacket() { + return ClientboundBlockEntityDataPacket.create(this); + } + + @Override + public CompoundTag getUpdateTag() { + CompoundTag compoundTag = new CompoundTag(); + ContainerHelper.saveAllItems(compoundTag, this.items, true); + return compoundTag; + } + + public Optional getCookableRecipe(ItemStack itemStack) { + return this.items.stream().noneMatch(ItemStack::isEmpty) ? Optional.empty() : this.quickCheck.getRecipeFor(new SimpleContainer(new ItemStack[]{itemStack}), this.level); + } + + public boolean placeFood(@Nullable Entity entity, ItemStack itemStack, int i) { + for(int j = 0; j < this.items.size(); ++j) { + ItemStack itemStack2 = this.items.get(j); + if (itemStack2.isEmpty()) { + this.cookingTime[j] = i; + this.cookingProgress[j] = 0; + this.items.set(j, itemStack.split(1)); + this.level.gameEvent(GameEvent.BLOCK_CHANGE, this.getBlockPos(), GameEvent.Context.of(entity, this.getBlockState())); + this.markUpdated(); + return true; + } + } + + return false; + } + + private void markUpdated() { + this.setChanged(); + this.getLevel().sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3); + } + + public void clearContent() { + this.items.clear(); + } + + public void dowse() { + if (this.level != null) { + this.markUpdated(); + } + } +} diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/common/blocks/AdvancedCampfire.java b/Common/src/main/java/me/hypherionmc/hyperlighting/common/blocks/AdvancedCampfire.java new file mode 100644 index 0000000..f1f646d --- /dev/null +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/common/blocks/AdvancedCampfire.java @@ -0,0 +1,323 @@ +package me.hypherionmc.hyperlighting.common.blocks; + +import me.hypherionmc.craterlib.api.rendering.CustomRenderType; +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.blockentities.AdvancedCampfireBlockEntity; +import me.hypherionmc.hyperlighting.common.init.CommonRegistration; +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.client.renderer.RenderType; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.core.particles.SimpleParticleType; +import net.minecraft.network.chat.Component; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.BlockTags; +import net.minecraft.util.RandomSource; +import net.minecraft.world.Containers; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.*; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.item.crafting.CampfireCookingRecipe; +import net.minecraft.world.item.enchantment.EnchantmentHelper; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +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.DirectionProperty; +import net.minecraft.world.level.block.state.properties.EnumProperty; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.MaterialColor; +import net.minecraft.world.level.pathfinder.PathComputationType; +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 org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Optional; + +/** + * @author HypherionSA + * @date 27/08/2022 + */ +public class AdvancedCampfire extends BaseEntityBlock implements DyableBlock, LightableBlock, CustomRenderType { + + public static final EnumProperty COLOR = EnumProperty.create("color", DyeColor.class); + protected static final VoxelShape SHAPE = Block.box(0.0, 0.0, 0.0, 16.0, 7.0, 16.0); + public static final BooleanProperty LIT = BlockStateProperties.LIT; + public static final BooleanProperty SIGNAL_FIRE = BlockStateProperties.SIGNAL_FIRE; + public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING; + + private final boolean spawnParticles; + private final int fireDamage; + + private DyeColor color; + + public AdvancedCampfire(String name, DyeColor color, CreativeModeTab tab) { + super(Properties.of( + Material.WOOD, + MaterialColor.COLOR_BROWN) + .strength(2.0f) + .noOcclusion() + .sound(SoundType.WOOD) + .lightLevel(BlockStateUtils.createLightLevelFromLitBlockState(15))); + + this.spawnParticles = true; + this.fireDamage = 1; + this.color = color; + this.registerDefaultState(this.defaultBlockState().setValue(LIT, CommonRegistration.config.campfireConfig.litByDefault).setValue(SIGNAL_FIRE, false).setValue(FACING, Direction.NORTH).setValue(COLOR, color)); + + HLItems.register(name, () -> new BlockItemDyable(this, new Item.Properties().tab(tab))); + } + + @Override + public InteractionResult use(BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) { + if (!level.isClientSide()) { + BlockEntity blockEntity = level.getBlockEntity(blockPos); + if (blockEntity instanceof AdvancedCampfireBlockEntity campfireBlockEntity) { + ItemStack itemStack = player.getItemInHand(interactionHand); + Optional optional = campfireBlockEntity.getCookableRecipe(itemStack); + if (optional.isPresent()) { + if (campfireBlockEntity.placeFood(player, player.getAbilities().instabuild ? itemStack.copy() : itemStack, optional.get().getCookingTime())) { + player.awardStat(Stats.INTERACT_WITH_CAMPFIRE); + return InteractionResult.SUCCESS; + } + + return InteractionResult.CONSUME; + } + } + + if (!player.getItemInHand(interactionHand).isEmpty() && player.getItemInHand(interactionHand).getItem() instanceof DyeItem dyeItem) { + blockState = blockState.setValue(COLOR, dyeItem.getDyeColor()); + this.color = dyeItem.getDyeColor(); + level.setBlock(blockPos, blockState, 3); + level.sendBlockUpdated(blockPos, blockState, blockState, 3); + + if (!player.isCreative()) { + ItemStack stack = player.getItemInHand(interactionHand); + stack.shrink(1); + player.setItemInHand(interactionHand, stack); + } + return InteractionResult.CONSUME; + } else if (!CommonRegistration.config.campfireConfig.requiresTool) { + blockState = blockState.cycle(LIT); + level.setBlock(blockPos, blockState, 3); + level.sendBlockUpdated(blockPos, blockState, blockState, 3); + if (!blockState.getValue(LIT)) { + level.playSound(null, blockPos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.3f, 1.0f); + } else { + level.playSound(null, blockPos, HLSounds.TORCH_IGNITE.get(), SoundSource.BLOCKS, 0.3f, 1.0f); + } + return InteractionResult.CONSUME; + } + } + + return InteractionResult.PASS; + } + + @Override + public void entityInside(BlockState blockState, Level level, BlockPos blockPos, Entity entity) { + if (blockState.getValue(LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity)entity)) { + entity.hurt(DamageSource.IN_FIRE, (float)this.fireDamage); + } + super.entityInside(blockState, level, blockPos, entity); + } + + @Override + public void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState blockState2, boolean bl) { + if (!blockState.is(blockState2.getBlock())) { + BlockEntity blockEntity = level.getBlockEntity(blockPos); + if (blockEntity instanceof AdvancedCampfireBlockEntity campfireBlockEntity) { + Containers.dropContents(level, blockPos, campfireBlockEntity.getItems()); + } + + super.onRemove(blockState, level, blockPos, blockState2, bl); + } + } + + @Override + @Nullable + public BlockState getStateForPlacement(BlockPlaceContext blockPlaceContext) { + LevelAccessor levelAccessor = blockPlaceContext.getLevel(); + BlockPos blockPos = blockPlaceContext.getClickedPos(); + boolean bl = levelAccessor.getFluidState(blockPos).getType() == Fluids.WATER; + return this.defaultBlockState().setValue(SIGNAL_FIRE, this.isSmokeSource(levelAccessor.getBlockState(blockPos.below()))).setValue(LIT, !bl).setValue(FACING, blockPlaceContext.getHorizontalDirection()); + } + + @Override + public BlockState updateShape(BlockState blockState, Direction direction, BlockState blockState2, LevelAccessor levelAccessor, BlockPos blockPos, BlockPos blockPos2) { + return direction == Direction.DOWN ? blockState.setValue(SIGNAL_FIRE, this.isSmokeSource(blockState2)) : super.updateShape(blockState, direction, blockState2, levelAccessor, blockPos, blockPos2); + } + + private boolean isSmokeSource(BlockState blockState) { + return blockState.is(Blocks.HAY_BLOCK); + } + + @Override + public VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) { + return SHAPE; + } + + @Override + public RenderShape getRenderShape(BlockState blockState) { + return RenderShape.MODEL; + } + + @Override + public void animateTick(BlockState blockState, Level level, BlockPos blockPos, RandomSource randomSource) { + if (blockState.getValue(LIT)) { + if (randomSource.nextInt(10) == 0) { + level.playLocalSound((double)blockPos.getX() + 0.5, (double)blockPos.getY() + 0.5, (double)blockPos.getZ() + 0.5, SoundEvents.CAMPFIRE_CRACKLE, SoundSource.BLOCKS, 0.5F + randomSource.nextFloat(), randomSource.nextFloat() * 0.7F + 0.6F, false); + } + + if (this.spawnParticles && randomSource.nextInt(5) == 0) { + for(int i = 0; i < randomSource.nextInt(1) + 1; ++i) { + level.addParticle(ParticleTypes.LAVA, (double)blockPos.getX() + 0.5, (double)blockPos.getY() + 0.5, (double)blockPos.getZ() + 0.5, (double)(randomSource.nextFloat() / 2.0F), 5.0E-5, (double)(randomSource.nextFloat() / 2.0F)); + } + } + } + } + + public static void dowse(@Nullable Entity entity, LevelAccessor levelAccessor, BlockPos blockPos, BlockState blockState) { + if (levelAccessor.isClientSide()) { + for(int i = 0; i < 20; ++i) { + makeParticles((Level)levelAccessor, blockPos, blockState.getValue(SIGNAL_FIRE), true); + } + } + + BlockEntity blockEntity = levelAccessor.getBlockEntity(blockPos); + if (blockEntity instanceof AdvancedCampfireBlockEntity campfireBlockEntity) { + campfireBlockEntity.dowse(); + } + levelAccessor.gameEvent(entity, GameEvent.BLOCK_CHANGE, blockPos); + } + + public static void makeParticles(Level level, BlockPos blockPos, boolean bl, boolean bl2) { + RandomSource randomSource = level.getRandom(); + SimpleParticleType simpleParticleType = bl ? ParticleTypes.CAMPFIRE_SIGNAL_SMOKE : ParticleTypes.CAMPFIRE_COSY_SMOKE; + level.addAlwaysVisibleParticle(simpleParticleType, true, (double)blockPos.getX() + 0.5 + randomSource.nextDouble() / 3.0 * (double)(randomSource.nextBoolean() ? 1 : -1), (double)blockPos.getY() + randomSource.nextDouble() + randomSource.nextDouble(), (double)blockPos.getZ() + 0.5 + randomSource.nextDouble() / 3.0 * (double)(randomSource.nextBoolean() ? 1 : -1), 0.0, 0.07, 0.0); + if (bl2) { + level.addParticle(ParticleTypes.SMOKE, (double)blockPos.getX() + 0.5 + randomSource.nextDouble() / 4.0 * (double)(randomSource.nextBoolean() ? 1 : -1), (double)blockPos.getY() + 0.4, (double)blockPos.getZ() + 0.5 + randomSource.nextDouble() / 4.0 * (double)(randomSource.nextBoolean() ? 1 : -1), 0.0, 0.005, 0.0); + } + } + + + public static boolean isLitCampfire(BlockState blockState) { + return blockState.hasProperty(LIT) && blockState.is(BlockTags.CAMPFIRES) && blockState.getValue(LIT); + } + + @Override + public BlockState rotate(BlockState blockState, Rotation rotation) { + return blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))); + } + + @Override + public BlockState mirror(BlockState blockState, Mirror mirror) { + return blockState.rotate(mirror.getRotation(blockState.getValue(FACING))); + } + + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(LIT, SIGNAL_FIRE, FACING, COLOR); + } + + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new AdvancedCampfireBlockEntity(blockPos, blockState); + } + + @Override + @Nullable + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType blockEntityType) { + return (level1, blockPos, blockState1, t) -> { + if (t instanceof AdvancedCampfireBlockEntity be) { + if (level1.isClientSide() && blockState1.getValue(LIT)) { + be.clientTick(level1, blockPos, blockState1, t); + } else if (!level1.isClientSide() && blockState1.getValue(LIT)) { + be.serverTick(level1, blockPos, blockState1, t); + } + } + }; + } + + @Override + public boolean isPathfindable(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, PathComputationType pathComputationType) { + return false; + } + + @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); + } + + @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 @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))); + } + + @Override + public RenderType getCustomRenderType() { + return RenderType.cutoutMipped(); + } +} 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 46aa7b3..cf1e1da 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 @@ -1,7 +1,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.client.config.HyperLightingClientConfig; import me.hypherionmc.hyperlighting.integration.HyperLightingIntegrations; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; @@ -10,7 +10,7 @@ import static me.hypherionmc.hyperlighting.Constants.MOD_ID; public class CommonRegistration { - public static HyperLightingConfig config = new HyperLightingConfig(); + public static HyperLightingClientConfig config = new HyperLightingClientConfig(); public static final CreativeModeTab LIGHTS_TAB = CreativeTabBuilder.builder(MOD_ID, "lighting").setIcon(() -> new ItemStack(HLBlocks.ADVANCED_LANTERN)).build(); public static void registerAll() { @@ -18,6 +18,7 @@ public class CommonRegistration { HLParticles.loadAll(); HLBlocks.loadAll(); HLItems.loadAll(); + HLBlockEntities.loadAll(); HLEntities.loadAll(); HyperLightingIntegrations.registerCommon(); } diff --git a/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/HLBlockEntities.java b/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/HLBlockEntities.java new file mode 100644 index 0000000..57dc7d5 --- /dev/null +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/common/init/HLBlockEntities.java @@ -0,0 +1,21 @@ +package me.hypherionmc.hyperlighting.common.init; + +import me.hypherionmc.craterlib.systems.reg.RegistrationProvider; +import me.hypherionmc.craterlib.systems.reg.RegistryObject; +import me.hypherionmc.hyperlighting.Constants; +import me.hypherionmc.hyperlighting.common.blockentities.AdvancedCampfireBlockEntity; +import net.minecraft.core.Registry; +import net.minecraft.world.level.block.entity.BlockEntityType; + +/** + * @author HypherionSA + * @date 27/08/2022 + */ +public class HLBlockEntities { + + public static final RegistrationProvider> BE = RegistrationProvider.get(Registry.BLOCK_ENTITY_TYPE, Constants.MOD_ID); + + public static RegistryObject> CAMPFIRE = BE.register("campfire", () -> BlockEntityType.Builder.of(AdvancedCampfireBlockEntity::new, HLBlocks.ADVANCED_CAMPFIRE.get()).build(null)); + + public static void loadAll() {} +} 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 2692d2b..27180b0 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 @@ -4,6 +4,7 @@ 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.AdvancedCampfire; import me.hypherionmc.hyperlighting.common.blocks.AdvancedLanternBlock; import me.hypherionmc.hyperlighting.common.blocks.AdvancedTorchBlock; import net.minecraft.core.Registry; @@ -22,8 +23,11 @@ public class HLBlocks { /* Lanterns */ public static BlockRegistryObject ADVANCED_LANTERN = register("advanced_lantern", () -> new AdvancedLanternBlock("advanced_lantern", DyeColor.ORANGE, CommonRegistration.LIGHTS_TAB)); - /* Candles */ + /* CampFires */ + public static BlockRegistryObject ADVANCED_CAMPFIRE = register("advanced_campfire", () -> new AdvancedCampfire("advanced_campfire", 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() {} 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 index bbf283d..edc7f4e 100644 --- a/Common/src/main/java/me/hypherionmc/hyperlighting/integration/shimmer/HyperLightingShimmer.java +++ b/Common/src/main/java/me/hypherionmc/hyperlighting/integration/shimmer/HyperLightingShimmer.java @@ -4,8 +4,10 @@ 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.AdvancedCampfire; import me.hypherionmc.hyperlighting.common.blocks.AdvancedLanternBlock; import me.hypherionmc.hyperlighting.common.blocks.AdvancedTorchBlock; +import me.hypherionmc.hyperlighting.common.init.CommonRegistration; import me.hypherionmc.hyperlighting.common.init.HLBlocks; import net.minecraft.world.item.DyeColor; @@ -27,7 +29,7 @@ public class HyperLightingShimmer { private static void registerBlocks() { LightManager.INSTANCE.registerBlockLight(HLBlocks.ADVANCED_TORCH.get(), (state, blockPos) -> { - if (state.getValue(AdvancedTorchBlock.LIT)) { + if (state.getValue(AdvancedTorchBlock.LIT) && CommonRegistration.config.torchConfig.coloredLighting) { DyeColor color = state.getValue(AdvancedTorchBlock.COLOR); return new ColorPointLight.Template(10, RenderUtils.alphaColorFromDye(color, 1f)); } @@ -35,12 +37,20 @@ public class HyperLightingShimmer { }); LightManager.INSTANCE.registerBlockLight(HLBlocks.ADVANCED_LANTERN.get(), (state, blockPos) -> { - if (state.getValue(AdvancedLanternBlock.LIT)) { + if (state.getValue(AdvancedLanternBlock.LIT) && CommonRegistration.config.lanternConfig.coloredLighting) { DyeColor color = state.getValue(AdvancedLanternBlock.COLOR); return new ColorPointLight.Template(10, RenderUtils.alphaColorFromDye(color, 1f)); } return null; }); + + LightManager.INSTANCE.registerBlockLight(HLBlocks.ADVANCED_CAMPFIRE.get(), (state, blockPos) -> { + if (state.getValue(AdvancedCampfire.LIT) && CommonRegistration.config.campfireConfig.coloredLighting) { + DyeColor color = state.getValue(AdvancedCampfire.COLOR); + return new ColorPointLight.Template(10, RenderUtils.alphaColorFromDye(color, 1f)); + } + return null; + }); } } diff --git a/Common/src/main/resources/assets/hyperlighting/blockstates/advanced_campfire.json b/Common/src/main/resources/assets/hyperlighting/blockstates/advanced_campfire.json new file mode 100644 index 0000000..f494b06 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/blockstates/advanced_campfire.json @@ -0,0 +1,131 @@ +{ + "variants": { + "facing=east,lit=false,color=white": { "model": "hyperlighting:block/campfire/white_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=white": { "model": "hyperlighting:block/campfire/white_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=white": { "model": "hyperlighting:block/campfire/white_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=white": { "model": "hyperlighting:block/campfire/white_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=white": { "model": "hyperlighting:block/campfire/white_campfire_unlit" }, + "facing=south,lit=true,color=white": { "model": "hyperlighting:block/campfire/white_campfire_lit" }, + "facing=west,lit=false,color=white": { "model": "hyperlighting:block/campfire/white_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=white": { "model": "hyperlighting:block/campfire/white_campfire_lit", "y": 90}, + "facing=east,lit=false,color=orange": { "model": "hyperlighting:block/campfire/orange_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=orange": { "model": "hyperlighting:block/campfire/orange_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=orange": { "model": "hyperlighting:block/campfire/orange_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=orange": { "model": "hyperlighting:block/campfire/orange_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=orange": { "model": "hyperlighting:block/campfire/orange_campfire_unlit" }, + "facing=south,lit=true,color=orange": { "model": "hyperlighting:block/campfire/orange_campfire_lit" }, + "facing=west,lit=false,color=orange": { "model": "hyperlighting:block/campfire/orange_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=orange": { "model": "hyperlighting:block/campfire/orange_campfire_lit", "y": 90}, + "facing=east,lit=false,color=magenta": { "model": "hyperlighting:block/campfire/magenta_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=magenta": { "model": "hyperlighting:block/campfire/magenta_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=magenta": { "model": "hyperlighting:block/campfire/magenta_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=magenta": { "model": "hyperlighting:block/campfire/magenta_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=magenta": { "model": "hyperlighting:block/campfire/magenta_campfire_unlit" }, + "facing=south,lit=true,color=magenta": { "model": "hyperlighting:block/campfire/magenta_campfire_lit" }, + "facing=west,lit=false,color=magenta": { "model": "hyperlighting:block/campfire/magenta_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=magenta": { "model": "hyperlighting:block/campfire/magenta_campfire_lit", "y": 90}, + "facing=east,lit=false,color=light_blue": { "model": "hyperlighting:block/campfire/light_blue_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=light_blue": { "model": "hyperlighting:block/campfire/light_blue_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=light_blue": { "model": "hyperlighting:block/campfire/light_blue_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=light_blue": { "model": "hyperlighting:block/campfire/light_blue_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=light_blue": { "model": "hyperlighting:block/campfire/light_blue_campfire_unlit" }, + "facing=south,lit=true,color=light_blue": { "model": "hyperlighting:block/campfire/light_blue_campfire_lit" }, + "facing=west,lit=false,color=light_blue": { "model": "hyperlighting:block/campfire/light_blue_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=light_blue": { "model": "hyperlighting:block/campfire/light_blue_campfire_lit", "y": 90}, + "facing=east,lit=false,color=yellow": { "model": "hyperlighting:block/campfire/yellow_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=yellow": { "model": "hyperlighting:block/campfire/yellow_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=yellow": { "model": "hyperlighting:block/campfire/yellow_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=yellow": { "model": "hyperlighting:block/campfire/yellow_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=yellow": { "model": "hyperlighting:block/campfire/yellow_campfire_unlit" }, + "facing=south,lit=true,color=yellow": { "model": "hyperlighting:block/campfire/yellow_campfire_lit" }, + "facing=west,lit=false,color=yellow": { "model": "hyperlighting:block/campfire/yellow_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=yellow": { "model": "hyperlighting:block/campfire/yellow_campfire_lit", "y": 90}, + "facing=east,lit=false,color=lime": { "model": "hyperlighting:block/campfire/lime_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=lime": { "model": "hyperlighting:block/campfire/lime_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=lime": { "model": "hyperlighting:block/campfire/lime_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=lime": { "model": "hyperlighting:block/campfire/lime_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=lime": { "model": "hyperlighting:block/campfire/lime_campfire_unlit" }, + "facing=south,lit=true,color=lime": { "model": "hyperlighting:block/campfire/lime_campfire_lit" }, + "facing=west,lit=false,color=lime": { "model": "hyperlighting:block/campfire/lime_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=lime": { "model": "hyperlighting:block/campfire/lime_campfire_lit", "y": 90}, + "facing=east,lit=false,color=pink": { "model": "hyperlighting:block/campfire/pink_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=pink": { "model": "hyperlighting:block/campfire/pink_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=pink": { "model": "hyperlighting:block/campfire/pink_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=pink": { "model": "hyperlighting:block/campfire/pink_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=pink": { "model": "hyperlighting:block/campfire/pink_campfire_unlit" }, + "facing=south,lit=true,color=pink": { "model": "hyperlighting:block/campfire/pink_campfire_lit" }, + "facing=west,lit=false,color=pink": { "model": "hyperlighting:block/campfire/pink_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=pink": { "model": "hyperlighting:block/campfire/pink_campfire_lit", "y": 90}, + "facing=east,lit=false,color=gray": { "model": "hyperlighting:block/campfire/gray_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=gray": { "model": "hyperlighting:block/campfire/gray_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=gray": { "model": "hyperlighting:block/campfire/gray_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=gray": { "model": "hyperlighting:block/campfire/gray_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=gray": { "model": "hyperlighting:block/campfire/gray_campfire_unlit" }, + "facing=south,lit=true,color=gray": { "model": "hyperlighting:block/campfire/gray_campfire_lit" }, + "facing=west,lit=false,color=gray": { "model": "hyperlighting:block/campfire/gray_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=gray": { "model": "hyperlighting:block/campfire/gray_campfire_lit", "y": 90}, + "facing=east,lit=false,color=light_gray": { "model": "hyperlighting:block/campfire/light_gray_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=light_gray": { "model": "hyperlighting:block/campfire/light_gray_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=light_gray": { "model": "hyperlighting:block/campfire/light_gray_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=light_gray": { "model": "hyperlighting:block/campfire/light_gray_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=light_gray": { "model": "hyperlighting:block/campfire/light_gray_campfire_unlit" }, + "facing=south,lit=true,color=light_gray": { "model": "hyperlighting:block/campfire/light_gray_campfire_lit" }, + "facing=west,lit=false,color=light_gray": { "model": "hyperlighting:block/campfire/light_gray_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=light_gray": { "model": "hyperlighting:block/campfire/light_gray_campfire_lit", "y": 90}, + "facing=east,lit=false,color=cyan": { "model": "hyperlighting:block/campfire/cyan_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=cyan": { "model": "hyperlighting:block/campfire/cyan_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=cyan": { "model": "hyperlighting:block/campfire/cyan_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=cyan": { "model": "hyperlighting:block/campfire/cyan_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=cyan": { "model": "hyperlighting:block/campfire/cyan_campfire_unlit" }, + "facing=south,lit=true,color=cyan": { "model": "hyperlighting:block/campfire/cyan_campfire_lit" }, + "facing=west,lit=false,color=cyan": { "model": "hyperlighting:block/campfire/cyan_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=cyan": { "model": "hyperlighting:block/campfire/cyan_campfire_lit", "y": 90}, + "facing=east,lit=false,color=purple": { "model": "hyperlighting:block/campfire/purple_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=purple": { "model": "hyperlighting:block/campfire/purple_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=purple": { "model": "hyperlighting:block/campfire/purple_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=purple": { "model": "hyperlighting:block/campfire/purple_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=purple": { "model": "hyperlighting:block/campfire/purple_campfire_unlit" }, + "facing=south,lit=true,color=purple": { "model": "hyperlighting:block/campfire/purple_campfire_lit" }, + "facing=west,lit=false,color=purple": { "model": "hyperlighting:block/campfire/purple_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=purple": { "model": "hyperlighting:block/campfire/purple_campfire_lit", "y": 90}, + "facing=east,lit=false,color=blue": { "model": "hyperlighting:block/campfire/blue_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=blue": { "model": "hyperlighting:block/campfire/blue_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=blue": { "model": "hyperlighting:block/campfire/blue_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=blue": { "model": "hyperlighting:block/campfire/blue_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=blue": { "model": "hyperlighting:block/campfire/blue_campfire_unlit" }, + "facing=south,lit=true,color=blue": { "model": "hyperlighting:block/campfire/blue_campfire_lit" }, + "facing=west,lit=false,color=blue": { "model": "hyperlighting:block/campfire/blue_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=blue": { "model": "hyperlighting:block/campfire/blue_campfire_lit", "y": 90}, + "facing=east,lit=false,color=brown": { "model": "hyperlighting:block/campfire/brown_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=brown": { "model": "hyperlighting:block/campfire/brown_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=brown": { "model": "hyperlighting:block/campfire/brown_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=brown": { "model": "hyperlighting:block/campfire/brown_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=brown": { "model": "hyperlighting:block/campfire/brown_campfire_unlit" }, + "facing=south,lit=true,color=brown": { "model": "hyperlighting:block/campfire/brown_campfire_lit" }, + "facing=west,lit=false,color=brown": { "model": "hyperlighting:block/campfire/brown_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=brown": { "model": "hyperlighting:block/campfire/brown_campfire_lit", "y": 90}, + "facing=east,lit=false,color=green": { "model": "hyperlighting:block/campfire/green_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=green": { "model": "hyperlighting:block/campfire/green_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=green": { "model": "hyperlighting:block/campfire/green_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=green": { "model": "hyperlighting:block/campfire/green_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=green": { "model": "hyperlighting:block/campfire/green_campfire_unlit" }, + "facing=south,lit=true,color=green": { "model": "hyperlighting:block/campfire/green_campfire_lit" }, + "facing=west,lit=false,color=green": { "model": "hyperlighting:block/campfire/green_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=green": { "model": "hyperlighting:block/campfire/green_campfire_lit", "y": 90}, + "facing=east,lit=false,color=red": { "model": "hyperlighting:block/campfire/red_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=red": { "model": "hyperlighting:block/campfire/red_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=red": { "model": "hyperlighting:block/campfire/red_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=red": { "model": "hyperlighting:block/campfire/red_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=red": { "model": "hyperlighting:block/campfire/red_campfire_unlit" }, + "facing=south,lit=true,color=red": { "model": "hyperlighting:block/campfire/red_campfire_lit" }, + "facing=west,lit=false,color=red": { "model": "hyperlighting:block/campfire/red_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=red": { "model": "hyperlighting:block/campfire/red_campfire_lit", "y": 90}, + "facing=east,lit=false,color=black": { "model": "hyperlighting:block/campfire/black_campfire_unlit", "y": 270 }, + "facing=east,lit=true,color=black": { "model": "hyperlighting:block/campfire/black_campfire_lit", "y": 270 }, + "facing=north,lit=false,color=black": { "model": "hyperlighting:block/campfire/black_campfire_unlit", "y": 180 }, + "facing=north,lit=true,color=black": { "model": "hyperlighting:block/campfire/black_campfire_lit", "y": 180 }, + "facing=south,lit=false,color=black": { "model": "hyperlighting:block/campfire/black_campfire_unlit" }, + "facing=south,lit=true,color=black": { "model": "hyperlighting:block/campfire/black_campfire_lit" }, + "facing=west,lit=false,color=black": { "model": "hyperlighting:block/campfire/black_campfire_unlit", "y": 90 }, + "facing=west,lit=true,color=black": { "model": "hyperlighting:block/campfire/black_campfire_lit", "y": 90} } +} 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 e9463f6..8b90159 100644 --- a/Common/src/main/resources/assets/hyperlighting/lang/en_us.json +++ b/Common/src/main/resources/assets/hyperlighting/lang/en_us.json @@ -2,6 +2,7 @@ "block.hyperlighting.advanced_torch": "Advanced Torch (%s)", "block.hyperlighting.advanced_lantern": "Advanced Lantern (%s)", "block.hyperlighting.advanced_candle": "Advanced Candle (%s)", + "block.hyperlighting.advanced_campfire": "Advanced Campfire (%s)", "item.hyperlighting.lighter_tool": "Torch Lighter Tool", diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/black_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/black_campfire_lit.json new file mode 100644 index 0000000..305808f --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/black_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/black_campfire_log_lit", + "1": "hyperlighting:block/campfire/black_campfire_log", + "2": "hyperlighting:block/campfire/black_campfire_fire", + "particle": "hyperlighting:block/campfire/black_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/black_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/black_campfire_unlit.json new file mode 100644 index 0000000..3937d0e --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/black_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/black_campfire_log", + "particle": "hyperlighting:block/campfire/black_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/blue_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/blue_campfire_lit.json new file mode 100644 index 0000000..646a93c --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/blue_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/blue_campfire_log_lit", + "1": "hyperlighting:block/campfire/blue_campfire_log", + "2": "hyperlighting:block/campfire/blue_campfire_fire", + "particle": "hyperlighting:block/campfire/blue_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/blue_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/blue_campfire_unlit.json new file mode 100644 index 0000000..5192c4d --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/blue_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/blue_campfire_log", + "particle": "hyperlighting:block/campfire/blue_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/brown_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/brown_campfire_lit.json new file mode 100644 index 0000000..e71bfbf --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/brown_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/brown_campfire_log_lit", + "1": "hyperlighting:block/campfire/brown_campfire_log", + "2": "hyperlighting:block/campfire/brown_campfire_fire", + "particle": "hyperlighting:block/campfire/brown_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/brown_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/brown_campfire_unlit.json new file mode 100644 index 0000000..7d0161e --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/brown_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/brown_campfire_log", + "particle": "hyperlighting:block/campfire/brown_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/cyan_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/cyan_campfire_lit.json new file mode 100644 index 0000000..75bed24 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/cyan_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/cyan_campfire_log_lit", + "1": "hyperlighting:block/campfire/cyan_campfire_log", + "2": "hyperlighting:block/campfire/cyan_campfire_fire", + "particle": "hyperlighting:block/campfire/cyan_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/cyan_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/cyan_campfire_unlit.json new file mode 100644 index 0000000..a3e6c4d --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/cyan_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/cyan_campfire_log", + "particle": "hyperlighting:block/campfire/cyan_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/gray_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/gray_campfire_lit.json new file mode 100644 index 0000000..28cf035 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/gray_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/gray_campfire_log_lit", + "1": "hyperlighting:block/campfire/gray_campfire_log", + "2": "hyperlighting:block/campfire/gray_campfire_fire", + "particle": "hyperlighting:block/campfire/gray_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/gray_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/gray_campfire_unlit.json new file mode 100644 index 0000000..4712826 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/gray_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/gray_campfire_log", + "particle": "hyperlighting:block/campfire/gray_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/green_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/green_campfire_lit.json new file mode 100644 index 0000000..7275970 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/green_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/green_campfire_log_lit", + "1": "hyperlighting:block/campfire/green_campfire_log", + "2": "hyperlighting:block/campfire/green_campfire_fire", + "particle": "hyperlighting:block/campfire/green_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/green_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/green_campfire_unlit.json new file mode 100644 index 0000000..6cb0b04 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/green_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/green_campfire_log", + "particle": "hyperlighting:block/campfire/green_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_blue_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_blue_campfire_lit.json new file mode 100644 index 0000000..30a9d53 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_blue_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/light_blue_campfire_log_lit", + "1": "hyperlighting:block/campfire/light_blue_campfire_log", + "2": "hyperlighting:block/campfire/light_blue_campfire_fire", + "particle": "hyperlighting:block/campfire/light_blue_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_blue_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_blue_campfire_unlit.json new file mode 100644 index 0000000..02213b5 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_blue_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/light_blue_campfire_log", + "particle": "hyperlighting:block/campfire/light_blue_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_gray_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_gray_campfire_lit.json new file mode 100644 index 0000000..d11af70 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_gray_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/light_gray_campfire_log_lit", + "1": "hyperlighting:block/campfire/light_gray_campfire_log", + "2": "hyperlighting:block/campfire/light_gray_campfire_fire", + "particle": "hyperlighting:block/campfire/light_gray_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_gray_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_gray_campfire_unlit.json new file mode 100644 index 0000000..552396b --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/light_gray_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/light_gray_campfire_log", + "particle": "hyperlighting:block/campfire/light_gray_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/lime_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/lime_campfire_lit.json new file mode 100644 index 0000000..b3bfae7 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/lime_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/lime_campfire_log_lit", + "1": "hyperlighting:block/campfire/lime_campfire_log", + "2": "hyperlighting:block/campfire/lime_campfire_fire", + "particle": "hyperlighting:block/campfire/lime_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/lime_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/lime_campfire_unlit.json new file mode 100644 index 0000000..83ca13a --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/lime_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/lime_campfire_log", + "particle": "hyperlighting:block/campfire/lime_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/magenta_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/magenta_campfire_lit.json new file mode 100644 index 0000000..e427306 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/magenta_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/magenta_campfire_log_lit", + "1": "hyperlighting:block/campfire/magenta_campfire_log", + "2": "hyperlighting:block/campfire/magenta_campfire_fire", + "particle": "hyperlighting:block/campfire/magenta_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/magenta_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/magenta_campfire_unlit.json new file mode 100644 index 0000000..63171ff --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/magenta_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/magenta_campfire_log", + "particle": "hyperlighting:block/campfire/magenta_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/orange_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/orange_campfire_lit.json new file mode 100644 index 0000000..1f2f18c --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/orange_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/orange_campfire_log_lit", + "1": "hyperlighting:block/campfire/orange_campfire_log", + "2": "hyperlighting:block/campfire/orange_campfire_fire", + "particle": "hyperlighting:block/campfire/orange_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/orange_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/orange_campfire_unlit.json new file mode 100644 index 0000000..30dfd8d --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/orange_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/orange_campfire_log", + "particle": "hyperlighting:block/campfire/orange_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/pink_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/pink_campfire_lit.json new file mode 100644 index 0000000..d15e6b1 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/pink_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/pink_campfire_log_lit", + "1": "hyperlighting:block/campfire/pink_campfire_log", + "2": "hyperlighting:block/campfire/pink_campfire_fire", + "particle": "hyperlighting:block/campfire/pink_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/pink_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/pink_campfire_unlit.json new file mode 100644 index 0000000..9369876 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/pink_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/pink_campfire_log", + "particle": "hyperlighting:block/campfire/pink_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/purple_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/purple_campfire_lit.json new file mode 100644 index 0000000..905287d --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/purple_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/purple_campfire_log_lit", + "1": "hyperlighting:block/campfire/purple_campfire_log", + "2": "hyperlighting:block/campfire/purple_campfire_fire", + "particle": "hyperlighting:block/campfire/purple_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/purple_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/purple_campfire_unlit.json new file mode 100644 index 0000000..2252909 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/purple_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/purple_campfire_log", + "particle": "hyperlighting:block/campfire/purple_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/red_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/red_campfire_lit.json new file mode 100644 index 0000000..b864eaa --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/red_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/red_campfire_log_lit", + "1": "hyperlighting:block/campfire/red_campfire_log", + "2": "hyperlighting:block/campfire/red_campfire_fire", + "particle": "hyperlighting:block/campfire/red_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/red_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/red_campfire_unlit.json new file mode 100644 index 0000000..8a04f95 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/red_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/red_campfire_log", + "particle": "hyperlighting:block/campfire/red_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/white_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/white_campfire_lit.json new file mode 100644 index 0000000..ad75aac --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/white_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/white_campfire_log_lit", + "1": "hyperlighting:block/campfire/white_campfire_log", + "2": "hyperlighting:block/campfire/white_campfire_fire", + "particle": "hyperlighting:block/campfire/white_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/white_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/white_campfire_unlit.json new file mode 100644 index 0000000..2e2782a --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/white_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/white_campfire_log", + "particle": "hyperlighting:block/campfire/white_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/yellow_campfire_lit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/yellow_campfire_lit.json new file mode 100644 index 0000000..0b5078f --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/yellow_campfire_lit.json @@ -0,0 +1,9 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "textures": { + "0": "hyperlighting:block/campfire/yellow_campfire_log_lit", + "1": "hyperlighting:block/campfire/yellow_campfire_log", + "2": "hyperlighting:block/campfire/yellow_campfire_fire", + "particle": "hyperlighting:block/campfire/yellow_campfire_log_lit" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire/yellow_campfire_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/yellow_campfire_unlit.json new file mode 100644 index 0000000..c30a51f --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire/yellow_campfire_unlit.json @@ -0,0 +1,7 @@ +{ + "parent": "hyperlighting:block/campfire_base_unlit", + "textures": { + "0": "hyperlighting:block/campfire/yellow_campfire_log", + "particle": "hyperlighting:block/campfire/yellow_campfire_log" + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire_base.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire_base.json new file mode 100644 index 0000000..a97e04b --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire_base.json @@ -0,0 +1,100 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "hyperlighting:block/campfire/black_campfire_log_lit", + "1": "hyperlighting:block/campfire/black_campfire_log", + "2": "hyperlighting:block/campfire/black_campfire_fire", + "3": "hyperlighting:block/campfire/ashes", + "particle": "hyperlighting:block/campfire/black_campfire_log_lit" + }, + "elements": [ + { + "from": [1, 0, 0], + "to": [5, 4, 16], + "faces": { + "north": {"uv": [0, 12, 4, 16], "texture": "#1"}, + "east": {"uv": [0, 0.5, 16, 2.5], "texture": "#0"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#1"}, + "west": {"uv": [0, 8, 16, 12], "texture": "#1"}, + "up": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#1"}, + "down": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [11, 0, 0], + "to": [15, 4, 16], + "faces": { + "north": {"uv": [0, 12, 4, 16], "texture": "#1"}, + "east": {"uv": [0, 8, 16, 12], "texture": "#1"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#1"}, + "west": {"uv": [0, 1, 16, 5], "texture": "#0"}, + "up": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#1"}, + "down": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [0, 3, 1], + "to": [16, 7, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 3]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#1"}, + "up": {"uv": [0, 8, 16, 12], "rotation": 180, "texture": "#1"}, + "down": {"uv": [0, 4, 16, 8], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [0, 3, 11], + "to": [16, 7, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 13]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#1"}, + "up": {"uv": [0, 8, 16, 12], "rotation": 180, "texture": "#1"}, + "down": {"uv": [0, 4, 16, 8], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [5, 0, 0], + "to": [11, 1, 16], + "faces": { + "north": {"uv": [0, 7, 6, 8], "texture": "#3"}, + "east": {"uv": [0, 7, 16, 8], "texture": "#3"}, + "south": {"uv": [10, 7, 16, 8], "texture": "#3"}, + "west": {"uv": [0, 7, 16, 8], "texture": "#3"}, + "up": {"uv": [0, 8, 16, 14], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 16, 6], "rotation": 90, "texture": "#3"} + } + }, + { + "from": [0, 1, 8], + "to": [16, 17, 8], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 0, 8], "texture": "#2"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 0, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 0], "texture": "#2"}, + "down": {"uv": [0, 0, 16, 0], "texture": "#2"} + } + }, + { + "from": [8, 1, 0], + "to": [8, 17, 16], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [0, 0, 0, 8], "texture": "#2"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "south": {"uv": [0, 0, 0, 8], "texture": "#2"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 0], "rotation": 270, "texture": "#2"}, + "down": {"uv": [0, 0, 16, 0], "rotation": 90, "texture": "#2"} + } + } + ] +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/block/campfire_base_unlit.json b/Common/src/main/resources/assets/hyperlighting/models/block/campfire_base_unlit.json new file mode 100644 index 0000000..d49ccdf --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/block/campfire_base_unlit.json @@ -0,0 +1,72 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "hyperlighting:block/campfire/black_campfire_log", + "1": "hyperlighting:block/campfire/ashes", + "particle": "hyperlighting:block/campfire/black_campfire_log" + }, + "elements": [ + { + "from": [1, 0, 0], + "to": [5, 4, 16], + "faces": { + "north": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "east": {"uv": [0, 1, 16, 5], "texture": "#0"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "west": {"uv": [0, 8, 16, 12], "texture": "#0"}, + "up": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [11, 0, 0], + "to": [15, 4, 16], + "faces": { + "north": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "east": {"uv": [0, 8, 16, 12], "texture": "#0"}, + "south": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "west": {"uv": [0, 1, 16, 5], "texture": "#0"}, + "up": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 8, 16, 12], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [0, 3, 1], + "to": [16, 7, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 3]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [0, 8, 16, 12], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 4, 16, 8], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [0, 3, 11], + "to": [16, 7, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 13]}, + "faces": { + "north": {"uv": [0, 0, 16, 4], "texture": "#0"}, + "east": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "south": {"uv": [0, 0, 16, 4], "texture": "#0"}, + "west": {"uv": [0, 12, 4, 16], "texture": "#0"}, + "up": {"uv": [0, 8, 16, 12], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 4, 16, 8], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [5, 0, 0], + "to": [11, 1, 16], + "faces": { + "north": {"uv": [0, 7, 6, 8], "texture": "#1"}, + "east": {"uv": [0, 7, 16, 8], "texture": "#1"}, + "south": {"uv": [10, 7, 16, 8], "texture": "#1"}, + "west": {"uv": [0, 7, 16, 8], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 6], "rotation": 90, "texture": "#1"}, + "down": {"uv": [0, 0, 16, 6], "rotation": 90, "texture": "#1"} + } + } + ] +} diff --git a/Common/src/main/resources/assets/hyperlighting/models/item/advanced_campfire.json b/Common/src/main/resources/assets/hyperlighting/models/item/advanced_campfire.json new file mode 100644 index 0000000..e1759b5 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/models/item/advanced_campfire.json @@ -0,0 +1,21 @@ +{ + "parent": "hyperlighting:block/campfire_base", + "overrides": [ + { "predicate": { "color": 0 }, "model": "hyperlighting:block/campfire/white_campfire_lit" }, + { "predicate": { "color": 1 }, "model": "hyperlighting:block/campfire/orange_campfire_lit" }, + { "predicate": { "color": 2 }, "model": "hyperlighting:block/campfire/magenta_campfire_lit" }, + { "predicate": { "color": 3 }, "model": "hyperlighting:block/campfire/light_blue_campfire_lit" }, + { "predicate": { "color": 4 }, "model": "hyperlighting:block/campfire/yellow_campfire_lit" }, + { "predicate": { "color": 5 }, "model": "hyperlighting:block/campfire/lime_campfire_lit" }, + { "predicate": { "color": 6 }, "model": "hyperlighting:block/campfire/pink_campfire_lit" }, + { "predicate": { "color": 7 }, "model": "hyperlighting:block/campfire/gray_campfire_lit" }, + { "predicate": { "color": 8 }, "model": "hyperlighting:block/campfire/light_gray_campfire_lit" }, + { "predicate": { "color": 9 }, "model": "hyperlighting:block/campfire/cyan_campfire_lit" }, + { "predicate": { "color": 10 }, "model": "hyperlighting:block/campfire/purple_campfire_lit" }, + { "predicate": { "color": 11 }, "model": "hyperlighting:block/campfire/blue_campfire_lit" }, + { "predicate": { "color": 12 }, "model": "hyperlighting:block/campfire/brown_campfire_lit" }, + { "predicate": { "color": 13 }, "model": "hyperlighting:block/campfire/green_campfire_lit" }, + { "predicate": { "color": 14 }, "model": "hyperlighting:block/campfire/red_campfire_lit" }, + { "predicate": { "color": 15 }, "model": "hyperlighting:block/campfire/black_campfire_lit" } + ] +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/ashes.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/ashes.png new file mode 100644 index 0000000..9e1e82b Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/ashes.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_fire.png new file mode 100644 index 0000000..5310905 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_fire.png .mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_fire.png .mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_fire.png .mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_log.png new file mode 100644 index 0000000..3525e22 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_log_lit.png new file mode 100644 index 0000000..8f672ff Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/black_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_fire.png new file mode 100644 index 0000000..e74cda2 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_log.png new file mode 100644 index 0000000..945bc7f Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_log_lit.png new file mode 100644 index 0000000..34aca0d Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/blue_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_fire.png new file mode 100644 index 0000000..2741ebb Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_log.png new file mode 100644 index 0000000..7684e37 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_log_lit.png new file mode 100644 index 0000000..16d3496 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/brown_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_fire.png new file mode 100644 index 0000000..3eb4eb4 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_log.png new file mode 100644 index 0000000..0deb257 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_log_lit.png new file mode 100644 index 0000000..7a3149a Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/cyan_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_fire.png new file mode 100644 index 0000000..a33f134 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_log.png new file mode 100644 index 0000000..3d3eb97 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_log_lit.png new file mode 100644 index 0000000..1c3dc7e Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/gray_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_fire.png new file mode 100644 index 0000000..b5f9281 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_log.png new file mode 100644 index 0000000..c6b9c2c Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_log_lit.png new file mode 100644 index 0000000..22268bd Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/green_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_fire.png new file mode 100644 index 0000000..1726ca4 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_log.png new file mode 100644 index 0000000..a71765b Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_log_lit.png new file mode 100644 index 0000000..3866cf6 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_blue_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_fire.png new file mode 100644 index 0000000..cbba60b Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_log.png new file mode 100644 index 0000000..df8deef Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_log_lit.png new file mode 100644 index 0000000..8d938a5 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/light_gray_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_fire.png new file mode 100644 index 0000000..1e4e15d Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_log.png new file mode 100644 index 0000000..8a8b0ac Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_log_lit.png new file mode 100644 index 0000000..5a7b899 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/lime_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_fire.png new file mode 100644 index 0000000..67191a7 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_log.png new file mode 100644 index 0000000..f0d99ab Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_log_lit.png new file mode 100644 index 0000000..33371ca Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/magenta_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_fire.png new file mode 100644 index 0000000..a53308b Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_log.png new file mode 100644 index 0000000..5718a97 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_log_lit.png new file mode 100644 index 0000000..251226d Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/orange_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_fire.png new file mode 100644 index 0000000..9aa4b86 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_log.png new file mode 100644 index 0000000..0f5d68f Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_log_lit.png new file mode 100644 index 0000000..b83ef34 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/pink_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_fire.png new file mode 100644 index 0000000..6fc6f17 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_log.png new file mode 100644 index 0000000..d9df531 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_log_lit.png new file mode 100644 index 0000000..872dbd3 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/purple_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_fire.png new file mode 100644 index 0000000..fa9bbf9 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_log.png new file mode 100644 index 0000000..310cd5c Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_log_lit.png new file mode 100644 index 0000000..2d6e65c Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/red_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_fire.png new file mode 100644 index 0000000..e36971f Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_log.png new file mode 100644 index 0000000..bc906e1 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_log_lit.png new file mode 100644 index 0000000..9436023 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/white_campfire_log_lit.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_fire.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_fire.png new file mode 100644 index 0000000..b6c6f3d Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_fire.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_fire.png.mcmeta b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_fire.png.mcmeta new file mode 100644 index 0000000..0645f48 --- /dev/null +++ b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_fire.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_log.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_log.png new file mode 100644 index 0000000..f85aa34 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_log.png differ diff --git a/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_log_lit.png b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_log_lit.png new file mode 100644 index 0000000..5bb0152 Binary files /dev/null and b/Common/src/main/resources/assets/hyperlighting/textures/block/campfire/yellow_campfire_log_lit.png differ diff --git a/Common/src/main/resources/data/hyperlighting/recipes/advanced_campfire.json b/Common/src/main/resources/data/hyperlighting/recipes/advanced_campfire.json new file mode 100644 index 0000000..995e361 --- /dev/null +++ b/Common/src/main/resources/data/hyperlighting/recipes/advanced_campfire.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "C": { + "tag": "minecraft:coals" + }, + "L": { + "tag": "minecraft:logs" + } + }, + "pattern": [ + " ", + "LCL", + "LLL" + ], + "result": { + "item": "hyperlighting:advanced_campfire" + } +} diff --git a/Common/src/main/resources/hyperlighting.aw b/Common/src/main/resources/hyperlighting.aw index 8ce89fa..d3ccb1d 100644 --- a/Common/src/main/resources/hyperlighting.aw +++ b/Common/src/main/resources/hyperlighting.aw @@ -2,3 +2,4 @@ accessWidener v1 named accessible class net/minecraft/client/particle/ParticleEngine$SpriteParticleRegistration accessible method net/minecraft/world/entity/SpawnPlacements register (Lnet/minecraft/world/entity/EntityType;Lnet/minecraft/world/entity/SpawnPlacements$Type;Lnet/minecraft/world/level/levelgen/Heightmap$Types;Lnet/minecraft/world/entity/SpawnPlacements$SpawnPredicate;)V +Accessible class net/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier diff --git a/Fabric/src/main/java/me/hypherionmc/hyperlighting/client/HyperLightingFabricClient.java b/Fabric/src/main/java/me/hypherionmc/hyperlighting/client/HyperLightingFabricClient.java index 106098d..a08ffbd 100644 --- a/Fabric/src/main/java/me/hypherionmc/hyperlighting/client/HyperLightingFabricClient.java +++ b/Fabric/src/main/java/me/hypherionmc/hyperlighting/client/HyperLightingFabricClient.java @@ -3,13 +3,17 @@ package me.hypherionmc.hyperlighting.client; import me.hypherionmc.hyperlighting.client.init.ClientRegistration; import me.hypherionmc.hyperlighting.client.model.NeonFlyModel; import me.hypherionmc.hyperlighting.client.particles.ParticleRegistryHandler; +import me.hypherionmc.hyperlighting.client.renderer.blockentity.AdvancedCampfireRenderer; import me.hypherionmc.hyperlighting.client.renderer.entity.NeonFlyRenderer; +import me.hypherionmc.hyperlighting.common.init.HLBlockEntities; import me.hypherionmc.hyperlighting.common.init.HLEntities; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry; +import net.fabricmc.fabric.api.client.rendering.v1.BlockEntityRendererRegistry; import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry; import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry; import net.minecraft.client.particle.ParticleEngine; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleType; @@ -29,6 +33,7 @@ public class HyperLightingFabricClient implements ClientModInitializer { } }); + BlockEntityRendererRegistry.register(HLBlockEntities.CAMPFIRE.get(), AdvancedCampfireRenderer::new); EntityRendererRegistry.register(HLEntities.NEONFLY.get(), NeonFlyRenderer::new); EntityModelLayerRegistry.registerModelLayer(NeonFlyModel.LAYER_LOCATION, NeonFlyModel::createBodyLayer); } diff --git a/Forge/src/main/java/me/hypherionmc/hyperlighting/HyperLightingForge.java b/Forge/src/main/java/me/hypherionmc/hyperlighting/HyperLightingForge.java index 6d92d57..9e22b3b 100644 --- a/Forge/src/main/java/me/hypherionmc/hyperlighting/HyperLightingForge.java +++ b/Forge/src/main/java/me/hypherionmc/hyperlighting/HyperLightingForge.java @@ -2,11 +2,14 @@ package me.hypherionmc.hyperlighting; import me.hypherionmc.craterlib.client.gui.config.CraterConfigScreen; import me.hypherionmc.hyperlighting.client.init.ClientRegistration; +import me.hypherionmc.hyperlighting.client.renderer.blockentity.AdvancedCampfireRenderer; import me.hypherionmc.hyperlighting.client.renderer.entity.NeonFlyRenderer; import me.hypherionmc.hyperlighting.common.entities.NeonFlyEntity; import me.hypherionmc.hyperlighting.common.init.CommonRegistration; +import me.hypherionmc.hyperlighting.common.init.HLBlockEntities; import me.hypherionmc.hyperlighting.common.init.HLEntities; import me.hypherionmc.hyperlighting.common.worldgen.ForgeWorldGen; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; import net.minecraft.client.renderer.entity.EntityRenderers; import net.minecraft.world.entity.SpawnPlacements; import net.minecraft.world.level.levelgen.Heightmap; @@ -34,6 +37,7 @@ public class HyperLightingForge { public void clientInit(FMLClientSetupEvent event) { registration.registerAll(); + BlockEntityRenderers.register(HLBlockEntities.CAMPFIRE.get(), AdvancedCampfireRenderer::new); EntityRenderers.register(HLEntities.NEONFLY.get(), NeonFlyRenderer::new); }