GTCEu Greenhouse

Quick rating

Community listing page, reviews here may not be monitored by the author.

GTCEu Greenhouse

By RubenVergOwner

No reviews yet

A mod that adds the capability to create multiblock greenhouses with renders of the current recipe

No Theme
Tech
Mod Addon
Mod Loaders
Forge
Minecraft

Community voices

Reviews

List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Show per page
10
25
50
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Client and Server

Must be installed on both the client and the server.

About

Project Details

Type
Mod
License
MIT License
Latest Version
gtceu_greenhouse-0.2.0.jar

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

> This mod does not add a greenhouse multibock. It adds a system that allows you to create a greenhouse multiblock using KubeJS or Java.

Why use this mod? It adds a custom renderer that makes plants appear and grow when a recipe is running.

For an explanation of usage, see the GitHub page.

This mod does not add a greenhouse multibock. It adds a system that allows you to create a greenhouse multiblock using KubeJS or Java.

Why use this mod? It adds a custom renderer that makes plants appear and grow when a recipe is running.

Usage

KubeJS

You can create a greenhouse multiblock machine by using the "greenhouse" type in the "gtceu:machine" startup event.

All methods are the same as the ones for "multiblock", except the ones for renderers are omitted, and you must call the following methods:

  • textures(base: string, overlay: string), which acts like a workable casing renderer with the base and overlay;
  • offsets(offsets: [number, number, number][]), which specifies the positions where the plants will grow with respect to the controller.

Example:

GTCEuStartupEvents.registry('gtceu:machine', event => {
    event.create('greenhouse', 'greenhouse')
        .rotationState(RotationState.NON_Y_AXIS)
        .recipeTypes(GTRecipeTypes.COMPRESSOR_RECIPES)
        .recipeModifiers([GTRecipeModifiers.PARALLEL_HATCH])
        .appearanceBlock(GTBlocks.CASING_STEEL_SOLID)
        .pattern(definition => FactoryBlockPattern.start()
            .aisle('CCCCC', 'ggggg', 'ggggg', 'ggggg', 'ggggg')
            .aisle('CGGGC', 'gpppg', 'gpppg', 'gpppg', 'ggggg')
            .aisle('CGGGC', 'gpppg', 'gpppg', 'gpppg', 'ggggg')
            .aisle('CGGGC', 'gpppg', 'gpppg', 'gpppg', 'ggggg')
            .aisle('CC@CC', 'ggggg', 'ggggg', 'ggggg', 'ggggg')
            .where('@', Predicates.controller(Predicates.blocks(definition.get())))
            .where('p', Predicates.air())
            .where('g', Predicates.blocks(Blocks.GLASS))
            .where('G', Predicates.blocks(Blocks.GRASS_BLOCK))
            .where('C', Predicates.blocks(GTBlocks.CASING_STEEL_SOLID.get())
                .or(Predicates.autoAbilities(definition.getRecipeTypes())))
            .build())
        .offsets([
            [1, -1, -1],
            [-1, -1, -1],
            [1, -3, -1],
            [-1, -3, -1]
        ])
        .textures("gtceu:block/casings/solid/machine_casing_solid_steel", "gtceu:block/multiblock/gcym/large_mixer")
});

Java

First, add the JitPack repository:

repositories {
    // ...
    maven { url 'https://jitpack.io' }
}

Next, add a dependency to the project:

dependencies {
    // ...
    
    implementation fg.deobf("com.github.RubenVerg:GTCEu-Greenhouse:main-SNAPSHOT")
}

There are two main exported classes which you will need: GreenhouseMachineRenderer and SyncedProgressElectricMultiblockMachine. When registering a multiblock, use the synced progress machine as the machine class and the renderer as a renderer. You will need to enable TESR.

Example:

GREENHOUSE = MyMod.REGISTRATE
  .multiblock("greenhouse", SyncedProgressElectricMultiblockMachine::new)
  .rotationState(RotationState.NON_Y_AXIS)
  .recipeType(GregPackRecipeTypes.GREENHOUSE_RECIPES)
  .recipeModifiers(GTRecipeModifiers.PARALLEL_HATCH)
  .appearanceBlock(GTBlocks.CASING_STEEL_SOLID)
  .pattern(definition -> FactoryBlockPattern.start()
    .aisle("CCCCC", "CgggC", "CgggC", "CCCCC")
    .aisle("CdddC", "g   g", "g   g", "CgggC")
    .aisle("CdddC", "g   g", "g   g", "CgggC")
    .aisle("CdddC", "g   g", "g   g", "CgggC")
    .aisle("CC#CC", "CgggC", "CgggC", "CCCCC")
    .where('C', Predicates.blocks(GTBlocks.CASING_STEEL_SOLID.get())
      .or(Predicates.autoAbilities(definition.getRecipeTypes()))
      .or(Predicates.autoAbilities(true, false, false)))
	.where('#', Predicates.controller(Predicates.blocks(definition.getBlock())))
	.where('d', Predicates.blocks(Blocks.DIRT))
	.where('g', Predicates.blocks(GTBlocks.CASING_TEMPERED_GLASS.get()))
	.build())
  .renderer(() -> new GreenhouseMachineRenderer(GTCEu.id("block/casings/solid/machine_casing_solid_steel"),
    GTCEu.id("block/multiblock/gcym/large_mixer")))
  .hasTESR(true)
  .register();

If you do not want your machine to be electric, you can implement ISyncedProgress and use that as a machine instead:

public class MySyncedProgress extends Whatever implements ISyncedProgress {
	protected static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder(SyncedProgressElectricMultiblockMachine.class, Whatever.MANAGED_FIELD_HOLDER);

	@Persisted
	@DescSynced
	@RequireRerender
	private double progressPercent;

	public SyncedProgressElectricMultiblockMachine(IMachineBlockEntity holder, Object... args) {
		super(holder, args);
	}

	{
		subscribeServerTick(() -> {
			progressPercent = recipeLogic.getProgressPercent();
		});
	}

	@Override
	public @NotNull ManagedFieldHolder getFieldHolder() {
		return MANAGED_FIELD_HOLDER;
	}

	@Override
	public double getProgressPercent() {
		return progressPercent;
	}
}

Screenshots

Gallery

  • Greenhouse growing alliums
    Greenhouse growing alliums A screenshot of a greenhouse created with this mod growing alliums.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~1,000
Total Downloads
CurseForge
~1,000
Modrinth
<1,000
Last Updated
CurseForge
Modrinth
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works