[Proposal] Greenhouse Controller (aka Farming Station) (#1928)
* Added Greenhouse Controller (aka Farming Station) * Greenhouse tiny code cleanup * Greenhouse Controller can collect sap
This commit is contained in:
parent
8a4baa8d27
commit
4f45a63a7a
15 changed files with 453 additions and 1 deletions
|
@ -155,6 +155,7 @@ public class TechRebornClient implements ClientModInitializer {
|
|||
BlockEntityRendererRegistry.INSTANCE.register(TRBlockEntities.INDUSTRIAL_SAWMILL, MultiblockRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(TRBlockEntities.DISTILLATION_TOWER, MultiblockRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(TRBlockEntities.IMPLOSION_COMPRESSOR, MultiblockRenderer::new);
|
||||
BlockEntityRendererRegistry.INSTANCE.register(TRBlockEntities.GREENHOUSE_CONTROLLER, MultiblockRenderer::new);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,241 @@
|
|||
package techreborn.blockentity.machine.tier1;
|
||||
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.state.property.IntProperty;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.api.blockentity.InventoryProvider;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
import techreborn.blocks.lighting.BlockLamp;
|
||||
import techreborn.blocks.misc.BlockRubberLog;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
|
||||
implements IToolDrop, InventoryProvider, IContainerProvider {
|
||||
|
||||
private final RebornInventory<GreenhouseControllerBlockEntity> inventory = new RebornInventory<>(7, "GreenhouseControllerBlockEntity", 64, this);
|
||||
private BlockPos multiblockCenter;
|
||||
private int ticksToNextMultiblockCheck = 0;
|
||||
private boolean growthBoost = false;
|
||||
|
||||
public GreenhouseControllerBlockEntity() {
|
||||
super(TRBlockEntities.GREENHOUSE_CONTROLLER);
|
||||
}
|
||||
|
||||
public boolean getMultiBlock() {
|
||||
if (multiblockCenter == null || world == null) {
|
||||
return false;
|
||||
}
|
||||
for (int i = -1; i <= 1; i++) {
|
||||
for (int j = -1; j <= 1; j++) {
|
||||
BlockState block = world.getBlockState(multiblockCenter.add(i * 3, 3, i * 3));
|
||||
if (!(block.getBlock() instanceof BlockLamp) || !BlockLamp.isActive(block)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (multiblockCenter == null) {
|
||||
multiblockCenter = pos.offset(getFacing().getOpposite(), 5);
|
||||
}
|
||||
charge(6);
|
||||
super.tick();
|
||||
|
||||
if (world.isClient) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (useEnergy(getEuPerTick(TechRebornConfig.greenhouseControllerEnergyPerTick)) != getEuPerTick(TechRebornConfig.greenhouseControllerEnergyPerTick)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (--ticksToNextMultiblockCheck < 0) {
|
||||
growthBoost = getMultiBlock();
|
||||
ticksToNextMultiblockCheck = 200;
|
||||
}
|
||||
|
||||
if (world.getTime() % 20 == 0) {
|
||||
double cyclesLimit = getSpeedMultiplier() * 4 + 1;
|
||||
while (cyclesLimit-- > 0) {
|
||||
workCycle();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void workCycle() {
|
||||
BlockPos blockPos = multiblockCenter.add(world.random.nextInt(9) - 4, 0, world.random.nextInt(9) - 4);
|
||||
BlockState blockState = world.getBlockState(blockPos);
|
||||
Block block = blockState.getBlock();
|
||||
|
||||
if (growthBoost) {
|
||||
if (block instanceof Fertilizable
|
||||
|| block instanceof PlantBlock
|
||||
|| block instanceof SugarCaneBlock
|
||||
|| block instanceof CactusBlock
|
||||
) {
|
||||
if (canUseEnergy(TechRebornConfig.greenhouseControllerEnergyPerBonemeal)) {
|
||||
useEnergy(TechRebornConfig.greenhouseControllerEnergyPerBonemeal);
|
||||
blockState.scheduledTick((ServerWorld) world, blockPos, world.random);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (block instanceof CropBlock) {
|
||||
processAgedCrop(blockState, blockPos, ((CropBlock) block).getAgeProperty(), ((CropBlock) block).getMaxAge(), 0);
|
||||
} else if (block instanceof NetherWartBlock) {
|
||||
processAgedCrop(blockState, blockPos, NetherWartBlock.AGE, 3, 0);
|
||||
} else if (block instanceof SweetBerryBushBlock) {
|
||||
processAgedCrop(blockState, blockPos, SweetBerryBushBlock.AGE, 3, 1);
|
||||
} else if (block instanceof CocoaBlock) {
|
||||
processAgedCrop(blockState, blockPos, CocoaBlock.AGE, 2, 0);
|
||||
} else if (block instanceof GourdBlock) {
|
||||
if (tryHarvestBlock(blockState, blockPos)) {
|
||||
world.breakBlock(blockPos, false);
|
||||
}
|
||||
} else if (block instanceof SugarCaneBlock
|
||||
|| block instanceof CactusBlock
|
||||
|| block instanceof BambooBlock
|
||||
) {
|
||||
// If we can break bottom block we should at least remove all of them up to top so they don't break automatically
|
||||
boolean breakBlocks = false;
|
||||
for (int y = 1; (blockState = world.getBlockState(blockPos.up(y))).getBlock() == block; y++) {
|
||||
if (y == 1) {
|
||||
breakBlocks = tryHarvestBlock(blockState, blockPos.up(y));
|
||||
} else {
|
||||
tryHarvestBlock(blockState, blockPos.up(y));
|
||||
}
|
||||
if (breakBlocks) world.breakBlock(blockPos.up(y), false);
|
||||
}
|
||||
} else if (block instanceof BlockRubberLog) {
|
||||
for (int y = 1; (blockState = world.getBlockState(blockPos.up(y))).getBlock() == block && y < 10; y++) {
|
||||
if (blockState.get(BlockRubberLog.HAS_SAP)
|
||||
&& canUseEnergy(TechRebornConfig.greenhouseControllerEnergyPerHarvest)
|
||||
&& insertIntoInv(Collections.singletonList(TRContent.Parts.SAP.getStack()))
|
||||
) {
|
||||
useEnergy(TechRebornConfig.greenhouseControllerEnergyPerHarvest);
|
||||
world.setBlockState(blockPos.up(y), blockState.with(BlockRubberLog.HAS_SAP, false).with(BlockRubberLog.SAP_SIDE, Direction.fromHorizontal(0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void processAgedCrop(BlockState blockState, BlockPos blockPos, IntProperty ageProperty, int maxAge, int newAge) {
|
||||
if (blockState.get(ageProperty) >= maxAge) {
|
||||
if (tryHarvestBlock(blockState, blockPos)) {
|
||||
world.setBlockState(blockPos, blockState.with(ageProperty, newAge), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean tryHarvestBlock(BlockState blockState, BlockPos blockPos) {
|
||||
if (canUseEnergy(TechRebornConfig.greenhouseControllerEnergyPerHarvest)
|
||||
&& insertIntoInv(Block.getDroppedStacks(blockState, (ServerWorld) world, blockPos, null))) {
|
||||
useEnergy(TechRebornConfig.greenhouseControllerEnergyPerHarvest);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean insertIntoInv(List<ItemStack> stacks) {
|
||||
boolean result = false;
|
||||
for (ItemStack stack : stacks) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
if (insertIntoInv(i, stack)) result = true;
|
||||
if (stack.isEmpty()) break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean insertIntoInv(int slot, ItemStack stack) {
|
||||
ItemStack targetStack = inventory.getInvStack(slot);
|
||||
if (targetStack.isEmpty()) {
|
||||
inventory.setInvStack(slot, stack.copy());
|
||||
stack.decrement(stack.getCount());
|
||||
return true;
|
||||
} else {
|
||||
if (ItemUtils.isItemEqual(stack, targetStack, true, false)) {
|
||||
int freeStackSpace = targetStack.getMaxCount() - targetStack.getCount();
|
||||
if (freeStackSpace > 0) {
|
||||
int transferAmount = Math.min(freeStackSpace, stack.getCount());
|
||||
targetStack.increment(transferAmount);
|
||||
stack.decrement(transferAmount);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(Direction direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(Direction direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getBaseMaxPower() {
|
||||
return TechRebornConfig.greenhouseControllerMaxEnergy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getBaseMaxOutput() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getBaseMaxInput() {
|
||||
return TechRebornConfig.greenhouseControllerMaxInput;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getToolDrop(PlayerEntity entityPlayer) {
|
||||
return TRContent.Machine.GREENHOUSE_CONTROLLER.getStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RebornInventory<GreenhouseControllerBlockEntity> getInventory() {
|
||||
return this.inventory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeUpgraded() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BuiltContainer createContainer(int syncID, PlayerEntity player) {
|
||||
return new ContainerBuilder("greenhousecontroller").player(player.inventory).inventory().hotbar().addInventory()
|
||||
.blockEntity(this)
|
||||
.outputSlot(0, 30, 22).outputSlot(1, 48, 22)
|
||||
.outputSlot(2, 30, 40).outputSlot(3, 48, 40)
|
||||
.outputSlot(4, 30, 58).outputSlot(5, 48, 58)
|
||||
.energySlot(6, 8, 72).syncEnergyValue()
|
||||
.addInventory().create(this, syncID);
|
||||
}
|
||||
|
||||
}
|
|
@ -80,6 +80,7 @@ public enum EGui implements IMachineGuiHandler {
|
|||
VACUUM_FREEZER,
|
||||
SOLID_CANNING_MACHINE,
|
||||
WIRE_MILL,
|
||||
GREENHOUSE_CONTROLLER,
|
||||
FLUID_REPLICATOR,
|
||||
|
||||
DATA_DRIVEN;
|
||||
|
|
|
@ -170,6 +170,8 @@ public class GuiHandler {
|
|||
return new GuiSolidCanningMachine(syncID, player, (SoildCanningMachineBlockEntity) blockEntity);
|
||||
case WIRE_MILL:
|
||||
return new GuiWireMill(syncID, player, (WireMillBlockEntity) blockEntity);
|
||||
case GREENHOUSE_CONTROLLER:
|
||||
return new GuiGreenhouseController(syncID, player, (GreenhouseControllerBlockEntity) blockEntity);
|
||||
default:
|
||||
break;
|
||||
|
||||
|
|
118
src/main/java/techreborn/client/gui/GuiGreenhouseController.java
Normal file
118
src/main/java/techreborn/client/gui/GuiGreenhouseController.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import reborncore.common.util.StringUtils;
|
||||
import techreborn.blockentity.machine.tier1.GreenhouseControllerBlockEntity;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class GuiGreenhouseController extends GuiBase<BuiltContainer> {
|
||||
|
||||
GreenhouseControllerBlockEntity blockEntity;
|
||||
|
||||
public GuiGreenhouseController(int syncID, final PlayerEntity player, final GreenhouseControllerBlockEntity blockEntity) {
|
||||
super(player, blockEntity, blockEntity.createContainer(syncID, player));
|
||||
this.blockEntity = blockEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawBackground(final float f, final int mouseX, final int mouseY) {
|
||||
super.drawBackground(f, mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
|
||||
|
||||
drawSlot(8, 72, layer);
|
||||
|
||||
int gridYPos = 22;
|
||||
drawSlot(30, gridYPos, layer);
|
||||
drawSlot(48, gridYPos, layer);
|
||||
drawSlot(30, gridYPos + 18, layer);
|
||||
drawSlot(48, gridYPos + 18, layer);
|
||||
drawSlot(30, gridYPos + 36, layer);
|
||||
drawSlot(48, gridYPos + 36, layer);
|
||||
|
||||
if (!blockEntity.getMultiBlock()) {
|
||||
getMinecraft().getTextureManager().bindTexture(new Identifier("techreborn", "textures/item/part/digital_display.png"));
|
||||
blit(x + 68, y + 22, 0, 0, 16, 16, 16, 16);
|
||||
if (isPointInRect(68, 22, 16, 16, mouseX, mouseY)) {
|
||||
List<String> list = Arrays.asList(StringUtils.t("techreborn.tooltip.greenhouse.upgrade_available").split("\\r?\\n"));
|
||||
RenderSystem.pushMatrix();
|
||||
renderTooltip(list, mouseX, mouseY);
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawForeground(final int mouseX, final int mouseY) {
|
||||
super.drawForeground(mouseX, mouseY);
|
||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||
|
||||
addHologramButton(90, 24, 212, layer).clickHandler(this::onClick);
|
||||
builder.drawHologramButton(this, 90, 24, mouseX, mouseY, layer);
|
||||
|
||||
if (!blockEntity.getMultiBlock()) {
|
||||
if (isPointInRect(68, 22, 16, 16, mouseX, mouseY)) {
|
||||
List<String> list = Arrays.asList(StringUtils.t("techreborn.tooltip.greenhouse.upgrade_available").split("\\r?\\n"));
|
||||
RenderSystem.pushMatrix();
|
||||
renderTooltip(list, mouseX - getGuiLeft(), mouseY - getGuiTop());
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
builder.drawMultiEnergyBar(this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double x, Double y) {
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState lamp = TRContent.Machine.LAMP_INCANDESCENT.block.getDefaultState().with(Properties.FACING, Direction.DOWN);
|
||||
BlockState crop = Blocks.CACTUS.getDefaultState();
|
||||
|
||||
this.addComponent(-3, 3, -3, lamp, multiblock);
|
||||
this.addComponent(-3, 3, 0, lamp, multiblock);
|
||||
this.addComponent(-3, 3, 3, lamp, multiblock);
|
||||
this.addComponent(0, 3, -3, lamp, multiblock);
|
||||
this.addComponent(0, 3, 0, lamp, multiblock);
|
||||
this.addComponent(0, 3, 3, lamp, multiblock);
|
||||
this.addComponent(3, 3, -3, lamp, multiblock);
|
||||
this.addComponent(3, 3, 0, lamp, multiblock);
|
||||
this.addComponent(3, 3, 3, lamp, multiblock);
|
||||
|
||||
for (int i = -4; i <= 4; i++) {
|
||||
for (int j = -4; j <= 4; j++) {
|
||||
this.addComponent(i, 0, j, crop, multiblock);
|
||||
}
|
||||
}
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addComponent(final int x, final int y, final int z, final BlockState blockState, final Multiblock multiblock) {
|
||||
multiblock.addComponent(new BlockPos(
|
||||
x - Direction.byId(this.blockEntity.getFacingInt()).getOffsetX() * 5,
|
||||
y,
|
||||
z - Direction.byId(this.blockEntity.getFacingInt()).getOffsetZ() * 5),
|
||||
blockState
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -448,7 +448,22 @@ public class TechRebornConfig {
|
|||
|
||||
@Config(config = "machines", category = "iron_machine", key = "cooking_scale", comment = "Multiplier for vanilla furnace item cook time")
|
||||
public static double cookingScale = 1.25;
|
||||
|
||||
|
||||
@Config(config = "machines", category = "greenhouse_controller", key = "GreenhouseControllerMaxInput", comment = "Greenhouse Controller Max Input")
|
||||
public static int greenhouseControllerMaxInput = 32;
|
||||
|
||||
@Config(config = "machines", category = "greenhouse_controller", key = "GreenhouseControllerMaxEnergy", comment = "Greenhouse Controller Max Energy")
|
||||
public static int greenhouseControllerMaxEnergy = 1_000;
|
||||
|
||||
@Config(config = "machines", category = "greenhouse_controller", key = "GreenhouseControllerEnergyPerTick", comment = "Greenhouse Controller Energy Per Tick")
|
||||
public static int greenhouseControllerEnergyPerTick = 2;
|
||||
|
||||
@Config(config = "machines", category = "greenhouse_controller", key = "GreenhouseControllerEnergyPerHarvest", comment = "Greenhouse Controller Energy Per Harvest")
|
||||
public static int greenhouseControllerEnergyPerHarvest = 100;
|
||||
|
||||
@Config(config = "machines", category = "greenhouse_controller", key = "GreenhouseControllerEnergyPerBonemeal", comment = "Greenhouse Controller Energy Per Bonemeal")
|
||||
public static int greenhouseControllerEnergyPerBonemeal = 50;
|
||||
|
||||
// Misc
|
||||
@Config(config = "misc", category = "general", key = "IC2TransformersStyle", comment = "Input from dots side, output from other sides, like in IC2.")
|
||||
public static boolean IC2TransformersStyle = true;
|
||||
|
|
|
@ -127,6 +127,7 @@ public class TRBlockEntities {
|
|||
public static final BlockEntityType<FluidReplicatorBlockEntity> FLUID_REPLICATOR = register(FluidReplicatorBlockEntity.class, "fluid_replicator", TRContent.Machine.FLUID_REPLICATOR);
|
||||
public static final BlockEntityType<SoildCanningMachineBlockEntity> SOLID_CANNING_MACHINE = register(SoildCanningMachineBlockEntity.class, "solid_canning_machine", TRContent.Machine.SOLID_CANNING_MACHINE);
|
||||
public static final BlockEntityType<WireMillBlockEntity> WIRE_MILL = register(WireMillBlockEntity.class, "wire_mill", TRContent.Machine.WIRE_MILL);
|
||||
public static final BlockEntityType<GreenhouseControllerBlockEntity> GREENHOUSE_CONTROLLER = register(GreenhouseControllerBlockEntity.class, "greenhouse_controller", TRContent.Machine.GREENHOUSE_CONTROLLER);
|
||||
|
||||
public static <T extends BlockEntity> BlockEntityType<T> register(Class<T> tClass, String name, ItemConvertible... items) {
|
||||
return register(tClass, name, Arrays.stream(items).map(itemConvertible -> Block.getBlockFromItem(itemConvertible.asItem())).toArray(Block[]::new));
|
||||
|
|
|
@ -416,6 +416,7 @@ public class TRContent {
|
|||
VACUUM_FREEZER(new GenericMachineBlock(EGui.VACUUM_FREEZER, VacuumFreezerBlockEntity::new)),
|
||||
SOLID_CANNING_MACHINE(new GenericMachineBlock(EGui.SOLID_CANNING_MACHINE, SoildCanningMachineBlockEntity::new)),
|
||||
WIRE_MILL(new GenericMachineBlock(EGui.WIRE_MILL, WireMillBlockEntity::new)),
|
||||
GREENHOUSE_CONTROLLER(new GenericMachineBlock(EGui.GREENHOUSE_CONTROLLER, GreenhouseControllerBlockEntity::new)),
|
||||
|
||||
DIESEL_GENERATOR(new GenericGeneratorBlock(EGui.DIESEL_GENERATOR, DieselGeneratorBlockEntity::new)),
|
||||
DRAGON_EGG_SYPHON(new GenericGeneratorBlock(null, DragonEggSyphonBlockEntity::new)),
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=north,active=false": { "model": "techreborn:block/machines/tier1_machines/greenhouse_controller" },
|
||||
"facing=south,active=false": { "model": "techreborn:block/machines/tier1_machines/greenhouse_controller", "y": 180 },
|
||||
"facing=west,active=false": { "model": "techreborn:block/machines/tier1_machines/greenhouse_controller", "y": 270 },
|
||||
"facing=east,active=false": { "model": "techreborn:block/machines/tier1_machines/greenhouse_controller", "y": 90 },
|
||||
"facing=north,active=true": { "model": "techreborn:block/machines/tier1_machines/greenhouse_controller" },
|
||||
"facing=south,active=true": { "model": "techreborn:block/machines/tier1_machines/greenhouse_controller", "y": 180 },
|
||||
"facing=west,active=true": { "model": "techreborn:block/machines/tier1_machines/greenhouse_controller", "y": 270 },
|
||||
"facing=east,active=true": { "model": "techreborn:block/machines/tier1_machines/greenhouse_controller", "y": 90 }
|
||||
}
|
||||
}
|
|
@ -80,6 +80,7 @@
|
|||
"block.techreborn.farm": "Farm",
|
||||
"block.techreborn.solid_canning_machine": "Solid Canning Machine",
|
||||
"block.techreborn.wire_mill": "Wire Mill",
|
||||
"block.techreborn.greenhouse_controller": "Greenhouse controller",
|
||||
|
||||
"_comment1": "Blocks",
|
||||
"block.techreborn.rubber_log": "Rubber Wood",
|
||||
|
@ -704,6 +705,7 @@
|
|||
"techreborn.tooltip.alarm": "Shift right-click to change sound",
|
||||
"techreborn.tooltip.generationRate.day": "Generation Rate Day",
|
||||
"techreborn.tooltip.generationRate.night": "Generation Rate Night",
|
||||
"techreborn.tooltip.greenhouse.upgrade_available": "Can be upgraded with powered lamps\nCheck multiblock hologram for details",
|
||||
|
||||
"_comment23": "ManualUI",
|
||||
"techreborn.manual.wiki": "Online wiki",
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"parent": "minecraft:block/orientable",
|
||||
"textures": {
|
||||
"top": "techreborn:block/machines/tier1_machines/machine_top",
|
||||
"front": "techreborn:block/machines/tier1_machines/greenhouse_controller_front",
|
||||
"side": "techreborn:block/machines/tier1_machines/machine_side"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"parent": "techreborn:block/machines/tier1_machines/greenhouse_controller"
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "techreborn:greenhouse_controller"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"PAP",
|
||||
"HSH",
|
||||
"ACA"
|
||||
],
|
||||
"key": {
|
||||
"P": {
|
||||
"item": "techreborn:refined_iron_ingot"
|
||||
},
|
||||
"A": {
|
||||
"item": "techreborn:advanced_circuit"
|
||||
},
|
||||
"S": {
|
||||
"item": "techreborn:diamond_saw_blade"
|
||||
},
|
||||
"C": {
|
||||
"item": "techreborn:advanced_machine_frame"
|
||||
},
|
||||
"H": {
|
||||
"item": "minecraft:iron_hoe"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "techreborn:greenhouse_controller"
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue