diff options
| author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2022-12-29 23:38:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-29 23:38:35 +0100 |
| commit | de6ee59646975b4353dd839185d1e166526fed19 (patch) | |
| tree | 2ba2ed3b48345181e8922ae3c85f8a304c503b49 /src/main/java/com | |
| parent | 14d878af5ad43181de40ce6d41db6d250b879e3b (diff) | |
| download | GT5-Unofficial-de6ee59646975b4353dd839185d1e166526fed19.tar.gz GT5-Unofficial-de6ee59646975b4353dd839185d1e166526fed19.tar.bz2 GT5-Unofficial-de6ee59646975b4353dd839185d1e166526fed19.zip | |
Add flowers to EIG (#254)
* Add flowers to EIG
* There are custom handlers now
Former-commit-id: ed1e0053dbbc1b30497f85111fda61e1469357e2
Diffstat (limited to 'src/main/java/com')
| -rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java index b9123478e5..020137ea39 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ExtremeIndustrialGreenhouse.java @@ -56,6 +56,7 @@ import ic2.core.Ic2Items; import ic2.core.crop.TileEntityCrop; import java.util.*; import net.minecraft.block.Block; +import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockStem; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; @@ -758,7 +759,16 @@ public class GT_TileEntity_ExtremeIndustrialGreenhouse Item i = input.getItem(); Block b = null; boolean detectedCustomHandler = false; - // There will be custom handlers here some day + // Custom handlers + // FLOWERS // + Block bb = Block.getBlockFromItem(i); + if (bb == Blocks.air) bb = null; + if (bb instanceof BlockFlower) { + detectedCustomHandler = true; + needsreplanting = false; + customDrops = new ArrayList<>(Collections.singletonList(input.copy())); + customDrops.get(0).stackSize = 1; + } if (!detectedCustomHandler) { if (i instanceof IPlantable) { if (i instanceof ItemSeeds) b = ((ItemSeeds) i).getPlant(world, 0, 0, 0); |
