use of WayofTime.alchemicalWizardry.api.ColourAndCoords in project BloodMagic by WayofTime.
the class TEReagentConduit method sendPlayerStuffs.
@SideOnly(Side.CLIENT)
public void sendPlayerStuffs() {
Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer;
World world = mc.theWorld;
if (SpellHelper.canPlayerSeeAlchemy(player)) {
for (ColourAndCoords colourSet : this.destinationList) {
if (!(worldObj.getTileEntity(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord) instanceof IReagentHandler)) {
continue;
}
EntityParticleBeam beam = new EntityParticleBeam(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5);
double velocity = Math.sqrt(Math.pow(colourSet.xCoord, 2) + Math.pow(colourSet.yCoord, 2) + Math.pow(colourSet.zCoord, 2));
double wantedVel = 0.3d;
beam.setVelocity(wantedVel * colourSet.xCoord / velocity, wantedVel * colourSet.yCoord / velocity, wantedVel * colourSet.zCoord / velocity);
beam.setColour(colourSet.colourRed / 255f, colourSet.colourGreen / 255f, colourSet.colourBlue / 255f);
beam.setDestination(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord);
worldObj.spawnEntityInWorld(beam);
}
}
}
use of WayofTime.alchemicalWizardry.api.ColourAndCoords in project BloodMagic by WayofTime.
the class TEReagentConduit method compileListForReagentTargets.
public List<ColourAndCoords> compileListForReagentTargets(Map<Reagent, List<Int3>> map) {
List<ColourAndCoords> list = new LinkedList();
for (Entry<Reagent, List<Int3>> entry : map.entrySet()) {
if (entry.getValue() != null) {
Reagent reagent = entry.getKey();
if (reagent == null) {
continue;
}
List<Int3> coords = entry.getValue();
for (Int3 coord : coords) {
if (coord == null) {
continue;
}
list.add(new ColourAndCoords(reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), reagent.getColourIntensity(), coord.xCoord, coord.yCoord, coord.zCoord));
}
}
}
return list;
}
Aggregations