mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 06:52:58 +00:00
Some entities
This commit is contained in:
1 parent
3b8926c24b
commit
6fb9b0101e
19 files changed
+93
-103
No files matched your search
@@ -12,6 +12,7 @@ package vazkii.botania.common.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.Botania;
|
||||
@@ -44,14 +45,17 @@ public class EntitySignalFlare extends Entity {
|
||||
|
||||
int color = getColor();
|
||||
if(color < 16 && color >= 0) {
|
||||
float[] colorArray = EntitySheep.fleeceColorTable[color];
|
||||
int hex = EnumDyeColor.byMetadata(color).getMapColor().colorValue;
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
Botania.proxy.setWispFXDistanceLimit(false);
|
||||
for(int i = 0; i < 3; i++)
|
||||
Botania.proxy.wispFX(worldObj, posX, posY, posZ + 0.5, colorArray[0], colorArray[1], colorArray[2], (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - (float) posY)), (float) (Math.random() - 0.5F));
|
||||
Botania.proxy.wispFX(worldObj, posX, posY, posZ + 0.5, r, g, b, (float) Math.random() * 5 + 1F, (float) (Math.random() - 0.5F), 10F * (float) Math.sqrt(256F / (256F - (float) posY)), (float) (Math.random() - 0.5F));
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
Botania.proxy.wispFX(worldObj, posX + 0.5, 256, posZ + 0.5, colorArray[0], colorArray[1], colorArray[2], (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F);
|
||||
Botania.proxy.wispFX(worldObj, posX + 0.5, 256, posZ + 0.5, r, g, b, (float) Math.random() * 15 + 8F, (float) (Math.random() - 0.5F) * 8F, 0F, (float) (Math.random() - 0.5F) * 8F);
|
||||
Botania.proxy.setWispFXDistanceLimit(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user