2013-05-23 05:01:19 +00:00
|
|
|
package net.minecraftforge.fluids;
|
|
|
|
|
|
|
|
import java.util.Locale;
|
2013-07-27 23:06:16 +00:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
2013-05-23 05:01:19 +00:00
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
2015-01-16 22:30:00 +00:00
|
|
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
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.minecraft.util.BlockPos;
|
2013-05-23 05:01:19 +00:00
|
|
|
import net.minecraft.util.StatCollector;
|
|
|
|
import net.minecraft.world.World;
|
2013-12-13 07:32:18 +00:00
|
|
|
import net.minecraftforge.common.ForgeModContainer;
|
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;
|
|
|
|
import net.minecraftforge.fml.common.LoaderException;
|
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
|
|
|
* @author King Lemming
|
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
|
|
|
|
{
|
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;
|
|
|
|
|
|
|
|
/** The Icons for this fluid. */
|
2015-01-16 22:30:00 +00:00
|
|
|
protected TextureAtlasSprite stillIcon;
|
|
|
|
protected TextureAtlasSprite flowingIcon;
|
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
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public Fluid(String fluidName)
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.fluidName = fluidName.toLowerCase(Locale.ENGLISH);
|
|
|
|
this.unlocalizedName = fluidName;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public final String getName()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return this.fluidName;
|
|
|
|
}
|
|
|
|
|
2013-07-17 04:40:49 +00:00
|
|
|
public final int getID()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return FluidRegistry.getFluidID(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
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the localized name of this fluid.
|
|
|
|
*/
|
2014-06-18 14:26:14 +00:00
|
|
|
public String getLocalizedName(FluidStack stack)
|
|
|
|
{
|
|
|
|
return getLocalizedName();
|
|
|
|
}
|
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
|
|
|
|
2014-06-18 14:26:14 +00:00
|
|
|
/**
|
|
|
|
* Use the FluidStack sensitive version above
|
|
|
|
*/
|
|
|
|
@Deprecated
|
2013-07-17 04:40:49 +00:00
|
|
|
public String getLocalizedName()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
String s = this.getUnlocalizedName();
|
|
|
|
return s == null ? "" : StatCollector.translateToLocal(s);
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns 0 for "/terrain.png". ALL FLUID TEXTURES MUST BE ON THIS SHEET.
|
|
|
|
*/
|
2013-07-17 04:40:49 +00:00
|
|
|
public final int getSpriteNumber()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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()
|
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return 0xFFFFFF;
|
|
|
|
}
|
|
|
|
|
2015-01-16 22:30:00 +00:00
|
|
|
|
|
|
|
public final Fluid setStillIcon(TextureAtlasSprite stillIcon)
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.stillIcon = stillIcon;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2015-01-16 22:30:00 +00:00
|
|
|
public final Fluid setFlowingIcon(TextureAtlasSprite flowingIcon)
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
this.flowingIcon = flowingIcon;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2015-01-16 22:30:00 +00:00
|
|
|
public final Fluid setIcons(TextureAtlasSprite stillIcon, TextureAtlasSprite flowingIcon)
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
|
|
|
return this.setStillIcon(stillIcon).setFlowingIcon(flowingIcon);
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|
|
|
|
|
2015-01-16 22:30:00 +00:00
|
|
|
public final Fluid setIcons(TextureAtlasSprite commonIcon)
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
|
|
|
return this.setStillIcon(commonIcon).setFlowingIcon(commonIcon);
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|
|
|
|
|
2015-01-16 22:30:00 +00:00
|
|
|
public TextureAtlasSprite getIcon(){ return getStillIcon(); }
|
2013-05-23 05:01:19 +00:00
|
|
|
|
2015-01-16 22:30:00 +00:00
|
|
|
public TextureAtlasSprite getStillIcon()
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return this.stillIcon;
|
|
|
|
}
|
|
|
|
|
2015-01-16 22:30:00 +00:00
|
|
|
public TextureAtlasSprite getFlowingIcon()
|
2013-07-17 04:40:49 +00:00
|
|
|
{
|
2013-05-23 05:01:19 +00:00
|
|
|
return this.flowingIcon;
|
|
|
|
}
|
|
|
|
|
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-01-16 22:30:00 +00:00
|
|
|
public TextureAtlasSprite getIcon(FluidStack stack){ return getIcon(); }
|
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-01-16 22:30:00 +00:00
|
|
|
public TextureAtlasSprite getIcon(World world, BlockPos pos){ return getIcon(); }
|
2013-07-27 23:06:16 +00:00
|
|
|
|
2013-05-23 05:01:19 +00:00
|
|
|
}
|