Fixed some more weird grinder rotations
This commit is contained in:
parent
23cf8da7bb
commit
38c1e70a59
2 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
package resonantinduction.mechanical.process;
|
||||
|
||||
import calclavia.lib.utility.WorldUtility;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -75,6 +76,7 @@ public class BlockGrinderWheel extends BlockRIRotatable implements ITileEntityPr
|
|||
// Move entity based on the direction of the block.
|
||||
ForgeDirection dir = this.getDirection(world, x, y, z);
|
||||
dir = ForgeDirection.getOrientation(!(dir.ordinal() % 2 == 0) ? dir.ordinal() - 1 : dir.ordinal()).getOpposite();
|
||||
dir = WorldUtility.invertZ(dir);
|
||||
float speed = tile.getAngularVelocity() / 20;
|
||||
entity.addVelocity(dir.offsetX * speed, Math.random() * speed, dir.offsetZ * speed);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import static org.lwjgl.opengl.GL11.glRotatef;
|
|||
import static org.lwjgl.opengl.GL11.glScalef;
|
||||
import static org.lwjgl.opengl.GL11.glTranslatef;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import calclavia.lib.utility.WorldUtility;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -38,6 +39,7 @@ public class RenderGrinderWheel extends TileEntitySpecialRenderer
|
|||
glScalef(0.51f, 0.5f, 0.5f);
|
||||
ForgeDirection dir = tile.getDirection();
|
||||
dir = ForgeDirection.getOrientation(!(dir.ordinal() % 2 == 0) ? dir.ordinal() - 1 : dir.ordinal());
|
||||
dir = WorldUtility.invertZ(dir);
|
||||
RenderUtility.rotateBlockBasedOnDirection(dir);
|
||||
glRotatef((float) Math.toDegrees(tile.angle), 0, 0, 1);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
|
Loading…
Reference in a new issue