mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 11:05:40 +00:00
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.
This commit is contained in:
1 parent
0e91787efb
commit
53659fca06
410 files changed
+8717
-14103
No files matched your search
@@ -1,14 +1,15 @@
|
||||
package net.minecraftforge.fluids;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Implement this interface on Block classes which represent world-placeable Fluids.
|
||||
*
|
||||
*
|
||||
* NOTE: Using/extending the reference implementations {@link BlockFluidBase} is encouraged.
|
||||
*
|
||||
*
|
||||
* @author King Lemming
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IFluidBlock
|
||||
{
|
||||
@@ -19,33 +20,33 @@ public interface IFluidBlock
|
||||
|
||||
/**
|
||||
* Attempt to drain the block. This method should be called by devices such as pumps.
|
||||
*
|
||||
*
|
||||
* NOTE: The block is intended to handle its own state changes.
|
||||
*
|
||||
*
|
||||
* @param doDrain
|
||||
* If false, the drain will only be simulated.
|
||||
* @return
|
||||
*/
|
||||
FluidStack drain(World world, int x, int y, int z, boolean doDrain);
|
||||
FluidStack drain(World world, BlockPos pos, boolean doDrain);
|
||||
|
||||
/**
|
||||
* Check to see if a block can be drained. This method should be called by devices such as
|
||||
* pumps.
|
||||
*
|
||||
*
|
||||
* @param doDrain
|
||||
* If false, the drain will only be simulated.
|
||||
* @return
|
||||
*/
|
||||
boolean canDrain(World world, int x, int y, int z);
|
||||
boolean canDrain(World world, BlockPos pos);
|
||||
|
||||
/**
|
||||
* Returns the amount of a single block is filled. Value between 0 and 1.
|
||||
* 1 meaning the entire 1x1x1 cube is full, 0 meaning completely empty.
|
||||
*
|
||||
* If the return value is negative. It will be treated as filling the block
|
||||
*
|
||||
* If the return value is negative. It will be treated as filling the block
|
||||
* from the top down instead of bottom up.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
float getFilledPercentage(World world, int x, int y, int z);
|
||||
}
|
||||
float getFilledPercentage(World world, BlockPos pos);
|
||||
}
|
||||
Reference in new issue
Block a user