- 769
- 1
- 42
Добрый вечер, товарищи. У меня возникло два вопроса, прошу ответить.
1. Я создал свою жидкость, указал путь до текстуры, все сделал, но текстура в игре не отображается:
2. Каким образом можно изменить скорость течения жидкости?
1. Я создал свою жидкость, указал путь до текстуры, все сделал, но текстура в игре не отображается:
Код:
package vacuum.planets.fluids.kepler62e;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import vacuum.VacuumHorizon;
import vacuum.core.liquids.overall.CoreLiquids;
import vacuum.planets.fluids.PlanetsFluids;
public class Kepler62ESilverWater extends PlanetsFluids {
public Kepler62ESilverWater(String name) {
super(CoreLiquids.SilverWater_fluid);
setRenderPass(1);
setBlockName(name);
}
public void func_149670_a(World world, int x, int y, int z, Entity entity) {
if ((entity instanceof EntityLivingBase)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.nightVision.id, 50, 1));
}
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
super.randomDisplayTick(world, x, y, z, rand);
int meta = world.getBlockMetadata(x, y, z);
if (rand.nextInt(64) == 0) {
if ((meta > 0) && (meta < 8)) {
world.playSound(x + 0.5F, y + 0.5F, z + 0.5F, "liquid.lava", rand.nextFloat() * 0.25F + 0.75F,
rand.nextFloat() * 1.0F + 0.5F, false);
}
}
if (rand.nextInt(10) == 0) {
if ((meta <= 0) || (meta >= 8)) {
world.spawnParticle("suspended", x + rand.nextFloat(), y + rand.nextFloat(), z + rand.nextFloat(), 0.0D, 0.0D, 0.0D);
}
}
if ((rand.nextInt(10) == 0) && (World.doesBlockHaveSolidTopSurface(world, x, y - 1, z))
&& (!world.getBlock(x, y - 2, z).getMaterial().blocksMovement())) {
double d5 = x + rand.nextFloat();
double d6 = y - 1.05D;
double d7 = z + rand.nextFloat();
world.spawnParticle("dripWater", d5, d6, d7, 0.0D, 0.0D, 0.0D);
}
}
@Override
public String getStillTextures() {
return "horizon:kepler62e/liquids/SilverWater_still";
}
@Override
public String getFlowingTextures() {
return "horizon:kepler62e/liquids/SilverWater_flowing";
}
}