2013-05-23 05:01:19 +00:00
|
|
|
package net.minecraftforge.fluids;
|
|
|
|
|
2016-06-09 09:30:06 +00:00
|
|
|
import javax.annotation.Nullable;
|
2013-05-23 05:01:19 +00:00
|
|
|
import java.util.Locale;
|
|
|
|
import net.minecraft.block.Block;
|
2016-05-16 20:20:31 +00:00
|
|
|
import net.minecraft.block.material.Material;
|
2016-06-09 09:30:06 +00:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2016-05-16 20:20:31 +00:00
|
|
|
import net.minecraft.init.SoundEvents;
|
2016-06-09 09:30:06 +00:00
|
|
|
import net.minecraft.util.EnumParticleTypes;
|
|
|
|
import net.minecraft.util.SoundCategory;
|
2016-05-16 20:20:31 +00:00
|
|
|
import net.minecraft.util.SoundEvent;
|
2016-03-01 12:58:03 +00:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2016-03-07 00:54:47 +00:00
|
|
|
import net.minecraft.util.text.translation.I18n;
|
2015-06-18 11:14:46 +00:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2013-05-23 05:01:19 +00:00
|
|
|
import net.minecraft.world.World;
|
2016-06-09 09:30:06 +00:00
|
|
|
import net.minecraft.world.WorldProvider;
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
import net.minecraftforge.fml.common.FMLLog;
|
2013-09-13 22:04:31 +00:00
|
|
|
import net.minecraft.item.EnumRarity;
|
2013-05-23 05:01:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Minecraft Forge Fluid Implementation
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* This class is a fluid (liquid or gas) equivalent to "Item." It describes the nature of a fluid
|
|
|
|
* and contains its general properties.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* These properties do not have inherent gameplay mechanics - they are provided so that mods may
|
|
|
|
* choose to take advantage of them.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* Fluid implementations are not required to actively use these properties, nor are objects
|
|
|
|
* interfacing with fluids required to make use of them, but it is encouraged.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* The default values can be used as a reference point for mods adding fluids such as oil or heavy
|
|
|
|
* water.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
*/
|
2013-07-17 04:40:49 +00:00
|
|
|
public class Fluid
|
|
|
|
{
|
2016-06-04 01:26:41 +00:00
|
|
|
public static final int BUCKET_VOLUME = 1000;
|
|
|
|
|
2013-05-23 05:01:19 +00:00
|
|
|
/** The unique identification name for this fluid. */
|
|
|
|
protected final String fluidName;
|
|
|
|
|
|
|
|
/** The unlocalized name of this fluid. */
|
|
|
|
protected String unlocalizedName;
|
|
|
|
|
2015-06-18 11:14:46 +00:00
|
|
|
protected final ResourceLocation still;
|
|
|
|
protected final ResourceLocation flowing;
|
|
|
|
|
2016-05-16 20:20:31 +00:00
|
|
|
private SoundEvent fillSound;
|
|
|
|
private SoundEvent emptySound;
|
|
|
|
|
2013-05-23 05:01:19 +00:00
|
|
|
/**
|
|
|
|
* The light level emitted by this fluid.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* Default value is 0, as most fluids do not actively emit light.
|
|
|
|
*/
|
|
|
|
protected int luminosity = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Density of the fluid - completely arbitrary; negative density indicates that the fluid is
|
|
|
|
* lighter than air.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* Default value is approximately the real-life density of water in kg/m^3.
|
|
|
|
*/
|
|
|
|
protected int density = 1000;
|
|
|
|
|
2013-08-01 03:15:42 +00:00
|
|
|
/**
|
|
|
|
* Temperature of the fluid - completely arbitrary; higher temperature indicates that the fluid is
|
|
|
|
* hotter than air.
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
*
|
2013-08-01 03:15:42 +00:00
|
|
|
* Default value is approximately the real-life room temperature of water in degrees Kelvin.
|
|
|
|
*/
|
2015-03-25 05:27:15 +00:00
|
|
|
protected int temperature = 300;
|
2013-08-01 03:15:42 +00:00
|
|
|
|
2013-05-23 05:01:19 +00:00
|
|
|
/**
|
|
|
|
* Viscosity ("thickness") of the fluid - completely arbitrary; negative values are not
|
|
|
|
* permissible.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* Default value is approximately the real-life density of water in m/s^2 (x10^-3).
|
2015-04-05 20:13:17 +00:00
|
|
|
*
|
2015-03-25 05:27:15 +00:00
|
|
|
* Higher viscosity means that a fluid flows more slowly, like molasses.
|
|
|
|
* Lower viscosity means that a fluid flows more quickly, like helium.
|
2015-04-05 20:13:17 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
*/
|
|
|
|
protected int viscosity = 1000;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This indicates if the fluid is gaseous.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* Useful for rendering the fluid in containers and the world.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-05-23 05:01:19 +00:00
|
|
|
* Generally this is associated with negative density fluids.
|
|
|
|
*/
|
|
|
|
protected boolean isGaseous;
|
|
|
|
|
2013-09-13 22:04:31 +00:00
|
|
|
/**
|
|
|
|
* The rarity of the fluid.
|
|
|
|
*
|
|
|
|
* Used primarily in tool tips.
|
|
|
|
*/
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
protected EnumRarity rarity = EnumRarity.COMMON;
|
2013-09-13 22:04:31 +00:00
|
|
|
|
2013-05-23 05:01:19 +00:00
|
|
|
/**
|
2013-12-10 05:59:12 +00:00
|
|
|
* If there is a Block implementation of the Fluid, the Block is linked here.
|
2013-07-27 23:06:16 +00:00
|
|
|
*
|
2013-12-10 05:59:12 +00:00
|
|
|
* The default value of null should remain for any Fluid without a Block implementation.
|
2013-05-23 05:01:19 +00:00
|
|
|
*/
|
2013-12-10 05:59:12 +00:00
|
|
|
protected Block block = null;
|
2013-05-23 05:01:19 +00:00
|
|
|
|
2015-06-18 11:14:46 +00:00
|
|
|
public Fluid(String fluidName, ResourceLocation still, ResourceLocation flowing)
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.fluidName = fluidName.toLowerCase(Locale.ENGLISH);
|
|
|
|
this.unlocalizedName = fluidName;
|
2015-06-18 11:14:46 +00:00
|
|
|
this.still = still;
|
|
|
|
this.flowing = flowing;
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public Fluid setUnlocalizedName(String unlocalizedName)
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.unlocalizedName = unlocalizedName;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-12-10 05:59:12 +00:00
|
|
|
public Fluid setBlock(Block block)
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-12-10 05:59:12 +00:00
|
|
|
if (this.block == null || this.block == block)
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-12-10 05:59:12 +00:00
|
|
|
this.block = block;
|
2013-07-17 04:40:49 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-04-05 23:39:15 +00:00
|
|
|
FMLLog.warning("A mod has attempted to assign Block " + block + " to the Fluid '" + fluidName + "' but this Fluid has already been linked to the Block "
|
|
|
|
+ this.block + ". You may have duplicate Fluid Blocks as a result. It *may* be possible to configure your mods to avoid this.");
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public Fluid setLuminosity(int luminosity)
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.luminosity = luminosity;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public Fluid setDensity(int density)
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.density = density;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-08-01 03:15:42 +00:00
|
|
|
public Fluid setTemperature(int temperature)
|
|
|
|
{
|
|
|
|
this.temperature = temperature;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public Fluid setViscosity(int viscosity)
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.viscosity = viscosity;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public Fluid setGaseous(boolean isGaseous)
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.isGaseous = isGaseous;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-09-13 22:04:31 +00:00
|
|
|
public Fluid setRarity(EnumRarity rarity)
|
|
|
|
{
|
|
|
|
this.rarity = rarity;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2016-05-16 20:20:31 +00:00
|
|
|
public Fluid setFillSound(SoundEvent fillSound)
|
|
|
|
{
|
|
|
|
this.fillSound = fillSound;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Fluid setEmptySound(SoundEvent emptySound)
|
|
|
|
{
|
|
|
|
this.emptySound = emptySound;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public final String getName()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return this.fluidName;
|
|
|
|
}
|
|
|
|
|
2013-12-10 05:59:12 +00:00
|
|
|
public final Block getBlock()
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-12-10 05:59:12 +00:00
|
|
|
return block;
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public final boolean canBePlacedInWorld()
|
|
|
|
{
|
2013-12-10 05:59:12 +00:00
|
|
|
return block != null;
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|
|
|
|
|
2016-06-09 09:30:06 +00:00
|
|
|
/**
|
|
|
|
* Determines if this fluid should vaporize in dimensions where water vaporizes when placed.
|
|
|
|
* To preserve the intentions of vanilla, fluids that can turn lava into obsidian should vaporize.
|
|
|
|
* This prevents players from making the nether safe with a single bucket.
|
|
|
|
* Based on {@link net.minecraft.item.ItemBucket#tryPlaceContainedLiquid(EntityPlayer, World, BlockPos)}
|
|
|
|
*
|
|
|
|
* @param fluidStack The fluidStack is trying to be placed.
|
|
|
|
* @return true if this fluid should vaporize in dimensions where water vaporizes when placed.
|
|
|
|
*/
|
|
|
|
public boolean doesVaporize(FluidStack fluidStack)
|
|
|
|
{
|
|
|
|
if (block == null)
|
|
|
|
return false;
|
|
|
|
return block.getDefaultState().getMaterial() == Material.WATER;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called instead of placing the fluid block if {@link WorldProvider#doesWaterVaporize()} and {@link #doesVaporize(FluidStack)} are true.
|
|
|
|
* Override this to make your explosive liquid blow up instead of the default smoke, etc.
|
|
|
|
* Based on {@link net.minecraft.item.ItemBucket#tryPlaceContainedLiquid(EntityPlayer, World, BlockPos)}
|
|
|
|
*
|
|
|
|
* @param player Player who tried to place the fluid. May be null for blocks like dispensers.
|
|
|
|
* @param worldIn World to vaporize the fluid in.
|
|
|
|
* @param pos The position in the world the fluid block was going to be placed.
|
|
|
|
* @param fluidStack The fluidStack that was going to be placed.
|
|
|
|
*/
|
|
|
|
public void vaporize(@Nullable EntityPlayer player, World worldIn, BlockPos pos, FluidStack fluidStack)
|
|
|
|
{
|
|
|
|
worldIn.playSound(player, pos, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F);
|
|
|
|
|
|
|
|
for (int l = 0; l < 8; ++l)
|
|
|
|
{
|
|
|
|
worldIn.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) pos.getX() + Math.random(), (double) pos.getY() + Math.random(), (double) pos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-23 05:01:19 +00:00
|
|
|
/**
|
|
|
|
* Returns the localized name of this fluid.
|
|
|
|
*/
|
2014-06-18 14:26:14 +00:00
|
|
|
public String getLocalizedName(FluidStack stack)
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
String s = this.getUnlocalizedName();
|
2016-03-07 00:54:47 +00:00
|
|
|
return s == null ? "" : I18n.translateToLocal(s);
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|
|
|
|
|
2014-07-10 12:25:53 +00:00
|
|
|
/**
|
|
|
|
* A FluidStack sensitive version of getUnlocalizedName
|
|
|
|
*/
|
|
|
|
public String getUnlocalizedName(FluidStack stack)
|
|
|
|
{
|
|
|
|
return this.getUnlocalizedName();
|
|
|
|
}
|
|
|
|
|
2013-05-23 05:01:19 +00:00
|
|
|
/**
|
|
|
|
* Returns the unlocalized name of this fluid.
|
|
|
|
*/
|
2013-07-17 04:40:49 +00:00
|
|
|
public String getUnlocalizedName()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return "fluid." + this.unlocalizedName;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Default Accessors */
|
2013-07-17 04:40:49 +00:00
|
|
|
public final int getLuminosity()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return this.luminosity;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public final int getDensity()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return this.density;
|
|
|
|
}
|
|
|
|
|
2013-08-01 03:15:42 +00:00
|
|
|
public final int getTemperature()
|
|
|
|
{
|
|
|
|
return this.temperature;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public final int getViscosity()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return this.viscosity;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public final boolean isGaseous()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return this.isGaseous;
|
|
|
|
}
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
|
2013-09-13 22:04:31 +00:00
|
|
|
public EnumRarity getRarity()
|
|
|
|
{
|
|
|
|
return rarity;
|
|
|
|
}
|
2013-05-23 05:01:19 +00:00
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public int getColor()
|
|
|
|
{
|
2015-06-18 11:14:46 +00:00
|
|
|
return 0xFFFFFFFF;
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|
|
|
|
|
2015-06-18 11:14:46 +00:00
|
|
|
public ResourceLocation getStill()
|
|
|
|
{
|
|
|
|
return still;
|
|
|
|
}
|
2015-01-16 22:30:00 +00:00
|
|
|
|
2015-06-18 11:14:46 +00:00
|
|
|
public ResourceLocation getFlowing()
|
|
|
|
{
|
|
|
|
return flowing;
|
|
|
|
}
|
|
|
|
|
2016-05-16 20:20:31 +00:00
|
|
|
public SoundEvent getFillSound()
|
|
|
|
{
|
|
|
|
if(fillSound == null)
|
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.LAVA)
|
2016-05-16 20:20:31 +00:00
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
fillSound = SoundEvents.ITEM_BUCKET_FILL_LAVA;
|
2016-05-16 20:20:31 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
fillSound = SoundEvents.ITEM_BUCKET_FILL;
|
2016-05-16 20:20:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return fillSound;
|
|
|
|
}
|
|
|
|
|
|
|
|
public SoundEvent getEmptySound()
|
|
|
|
{
|
|
|
|
if(emptySound == null)
|
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
if(getBlock() != null && getBlock().getDefaultState().getMaterial() == Material.LAVA)
|
2016-05-16 20:20:31 +00:00
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
emptySound = SoundEvents.ITEM_BUCKET_EMPTY_LAVA;
|
2016-05-16 20:20:31 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
emptySound = SoundEvents.ITEM_BUCKET_EMPTY;
|
2016-05-16 20:20:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return emptySound;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
/* Stack-based Accessors */
|
|
|
|
public int getLuminosity(FluidStack stack){ return getLuminosity(); }
|
|
|
|
public int getDensity(FluidStack stack){ return getDensity(); }
|
2013-08-01 03:15:42 +00:00
|
|
|
public int getTemperature(FluidStack stack){ return getTemperature(); }
|
2013-07-17 04:40:49 +00:00
|
|
|
public int getViscosity(FluidStack stack){ return getViscosity(); }
|
|
|
|
public boolean isGaseous(FluidStack stack){ return isGaseous(); }
|
2013-09-13 22:04:31 +00:00
|
|
|
public EnumRarity getRarity(FluidStack stack){ return getRarity(); }
|
2013-07-17 04:40:49 +00:00
|
|
|
public int getColor(FluidStack stack){ return getColor(); }
|
2015-06-18 11:14:46 +00:00
|
|
|
public ResourceLocation getStill(FluidStack stack) { return getStill(); }
|
|
|
|
public ResourceLocation getFlowing(FluidStack stack) { return getFlowing(); }
|
2016-05-16 20:20:31 +00:00
|
|
|
public SoundEvent getFillSound(FluidStack stack) { return getFillSound(); }
|
|
|
|
public SoundEvent getEmptySound(FluidStack stack) { return getEmptySound(); }
|
2015-06-18 11:14:46 +00:00
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
/* World-based Accessors */
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
public int getLuminosity(World world, BlockPos pos){ return getLuminosity(); }
|
|
|
|
public int getDensity(World world, BlockPos pos){ return getDensity(); }
|
|
|
|
public int getTemperature(World world, BlockPos pos){ return getTemperature(); }
|
|
|
|
public int getViscosity(World world, BlockPos pos){ return getViscosity(); }
|
|
|
|
public boolean isGaseous(World world, BlockPos pos){ return isGaseous(); }
|
|
|
|
public EnumRarity getRarity(World world, BlockPos pos){ return getRarity(); }
|
|
|
|
public int getColor(World world, BlockPos pos){ return getColor(); }
|
2015-06-18 11:14:46 +00:00
|
|
|
public ResourceLocation getStill(World world, BlockPos pos) { return getStill(); }
|
|
|
|
public ResourceLocation getFlowing(World world, BlockPos pos) { return getFlowing(); }
|
2016-05-16 20:20:31 +00:00
|
|
|
public SoundEvent getFillSound(World world, BlockPos pos) { return getFillSound(); }
|
|
|
|
public SoundEvent getEmptySound(World world, BlockPos pos) { return getEmptySound(); }
|
2013-07-27 23:06:16 +00:00
|
|
|
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|