Community listing page, reviews here may not be monitored by the author.
GTCEu Greenhouse
No reviews yet
A mod that adds the capability to create multiblock greenhouses with renders of the current recipe
Does not follow a specific thematic focus apart from vanilla Minecraft.
Focuses on automation and resource processing through scientific and mechanical means, utilizing systems like electricity (RF/FE/etc), air pressure, or rotation.
Adds extra features or content to an existing mod.
Forge is a popular mod loader for versions 1.1+ of Minecraft.
Community voices
Reviews
Filters
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Must be installed on both the client and the server.
About
Project Details
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.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
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;
}
}
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
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers