use of logisticspipes.pipefxhandlers.EntityModelFX in project LogisticsPipes by RS485.
the class LogisticsNewRenderPipe method renderDestruction.
public static void renderDestruction(CoreUnroutedPipe pipe, World worldObj, int x, int y, int z, EffectRenderer effectRenderer) {
if (pipe.container != null && pipe.container.renderState != null && pipe.container.renderState.cachedRenderer != null) {
for (RenderEntry entry : pipe.container.renderState.cachedRenderer) {
IModel3D model = entry.getModel().twoFacedCopy();
IBounds bounds = model.bounds();
double xMid = (bounds.min().x() + bounds.max().x()) / 2;
double yMid = (bounds.min().y() + bounds.max().y()) / 2;
double zMid = (bounds.min().z() + bounds.max().z()) / 2;
model.apply(new LPTranslation(-xMid, -yMid, -zMid));
effectRenderer.addEffect(new EntityModelFX(worldObj, x + xMid, y + yMid, z + zMid, model, entry.getOperations(), entry.getTexture()));
}
}
}
use of logisticspipes.pipefxhandlers.EntityModelFX in project LogisticsPipes by RS485.
the class LogisticsNewRenderPipe method renderDestruction.
@SideOnly(Side.CLIENT)
public static void renderDestruction(CoreUnroutedPipe pipe, World world, int x, int y, int z, ParticleManager effectRenderer) {
if (pipe.container != null && pipe.container.renderState != null && pipe.container.renderState.cachedRenderer != null) {
for (RenderEntry entry : pipe.container.renderState.cachedRenderer) {
IModel3D model = entry.getModel().twoFacedCopy();
IBounds bounds = model.bounds();
double xMid = (bounds.min().x() + bounds.max().x()) / 2;
double yMid = (bounds.min().y() + bounds.max().y()) / 2;
double zMid = (bounds.min().z() + bounds.max().z()) / 2;
model.apply(new LPTranslation(-xMid, -yMid, -zMid));
effectRenderer.addEffect(new EntityModelFX(world, x + xMid, y + yMid, z + zMid, model, entry.getOperations(), entry.getTexture()));
}
}
}
Aggregations