This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
forked from bartimaeusnek/bartworks
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Extreme Industrial Greenhouse (#111)
* Add Extreme Industrial Greenhouse * Add info about crops inside the machine * Add a way to remove crops from machine * Add crafting recipe * Dont use full amp * Add glass tier requirements * Bug fix * Account for IC2 crops with two diffrent outputs * Add water requirement Former-commit-id: f3293cb0d97947324bd63e7b79c945051000942d
- Loading branch information
Showing
8 changed files
with
818 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_CropVisualizer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.github.bartimaeusnek.bartworks.client.renderer; | ||
|
||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.client.particle.EntityFX; | ||
import net.minecraft.client.renderer.RenderBlocks; | ||
import net.minecraft.client.renderer.Tessellator; | ||
import net.minecraft.init.Blocks; | ||
import net.minecraft.world.World; | ||
import org.lwjgl.opengl.GL11; | ||
|
||
@SideOnly(Side.CLIENT) | ||
public class BW_CropVisualizer extends EntityFX { | ||
int meta; | ||
|
||
public BW_CropVisualizer(World world, int x, int y, int z, int meta, int age) { | ||
super(world, (double) x, ((double) y - 0.0625d), (double) z); | ||
this.prevPosX = this.posX; | ||
this.prevPosY = this.posY; | ||
this.prevPosZ = this.posZ; | ||
this.particleMaxAge = age; | ||
this.meta = meta; | ||
} | ||
|
||
@Override | ||
public void onUpdate() { | ||
if (this.particleAge++ >= this.particleMaxAge) | ||
this.setDead(); | ||
} | ||
|
||
@Override | ||
public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) { | ||
Tessellator tessellator = Tessellator.instance; | ||
GL11.glDisable(GL11.GL_CULL_FACE); | ||
GL11.glDepthMask(false); | ||
tessellator.setColorRGBA(255, 255, 255, 255); | ||
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) p_70539_2_ - interpPosX); | ||
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) p_70539_2_ - interpPosY); | ||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) p_70539_2_ - interpPosZ); | ||
RenderBlocks.getInstance().renderBlockCropsImpl(Blocks.wheat, meta, f11, f12, f13); | ||
GL11.glEnable(GL11.GL_CULL_FACE); | ||
GL11.glDepthMask(true); | ||
} | ||
|
||
@Override | ||
public int getFXLayer() { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public boolean shouldRenderInPass(int pass) { | ||
return pass == 2; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.