mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 12:09:39 +00:00
Split up Proxies.common code
This commit is contained in:
1 parent
0ea878d7bc
commit
9899687786
69 files changed
+460
-612
No files matched your search
@@ -10,24 +10,16 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.proxy;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
import forestry.apiculture.entities.EntityBee;
|
||||
import forestry.apiculture.entities.EntityFXBee;
|
||||
import forestry.apiculture.render.ParticleRenderer;
|
||||
import forestry.apiculture.render.RenderBeeEntity;
|
||||
import forestry.apiculture.render.RenderBeeItem;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.proxy.ProxyRenderClient;
|
||||
import forestry.core.render.IBlockRenderer;
|
||||
import forestry.core.render.RenderAnalyzer;
|
||||
import forestry.core.render.TextureManager;
|
||||
import forestry.plugins.PluginApiculture;
|
||||
|
||||
public class ProxyApicultureClient extends ProxyApiculture {
|
||||
@@ -43,40 +35,6 @@ public class ProxyApicultureClient extends ProxyApiculture {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBeeHiveFX(String icon, World world, ChunkCoordinates coordinates, int color) {
|
||||
if (!ProxyRenderClient.shouldSpawnParticle(world)) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityFX fx = new EntityFXBee(world, coordinates.posX + 0.5D, coordinates.posY + 0.5D, coordinates.posZ + 0.5D, color);
|
||||
fx.setParticleIcon(TextureManager.getInstance().getDefault(icon));
|
||||
ParticleRenderer.getInstance().addEffect(fx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBeeSwarmFX(String icon, World world, double xCoord, double yCoord, double zCoord, int color) {
|
||||
if (!ProxyRenderClient.shouldSpawnParticle(world)) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityFX fx;
|
||||
|
||||
if (world.rand.nextBoolean()) {
|
||||
fx = new EntityFXBee(world, xCoord, yCoord, zCoord, color);
|
||||
} else {
|
||||
|
||||
double spawnX = xCoord + world.rand.nextInt(4) - 2;
|
||||
double spawnY = yCoord + world.rand.nextInt(4) - 2;
|
||||
double spawnZ = zCoord + world.rand.nextInt(4) - 2;
|
||||
|
||||
fx = new EntityFXBee(world, spawnX, spawnY, spawnZ, color);
|
||||
}
|
||||
|
||||
fx.setParticleIcon(TextureManager.getInstance().getDefault(icon));
|
||||
ParticleRenderer.getInstance().addEffect(fx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockRenderer getRendererAnalyzer(String gfxBase) {
|
||||
return new RenderAnalyzer(gfxBase);
|
||||
|
||||
Reference in new issue
Block a user