mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +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,66 +1,49 @@
|
||||
|
||||
package net.minecraftforge.fluids;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
public class FluidEvent extends Event
|
||||
{
|
||||
public final FluidStack fluid;
|
||||
public final int x;
|
||||
public final int y;
|
||||
public final int z;
|
||||
public final World world;
|
||||
public final BlockPos pos;
|
||||
|
||||
public FluidEvent(FluidStack fluid, World world, int x, int y, int z)
|
||||
public FluidEvent(FluidStack fluid, World world, BlockPos pos)
|
||||
{
|
||||
this.fluid = fluid;
|
||||
this.world = world;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mods should fire this event when they move fluids around.
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static class FluidMotionEvent extends FluidEvent
|
||||
{
|
||||
public FluidMotionEvent(FluidStack fluid, World world, int x, int y, int z)
|
||||
public FluidMotionEvent(FluidStack fluid, World world, BlockPos pos)
|
||||
{
|
||||
super(fluid, world, x, y, z);
|
||||
super(fluid, world, pos);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mods should fire this event when a fluid is {@link IFluidTank#fill(FluidStack, boolean)}
|
||||
* their tank implementation. {@link FluidTank} does.
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static class FluidFillingEvent extends FluidEvent
|
||||
{
|
||||
public final IFluidTank tank;
|
||||
public final int amount;
|
||||
|
||||
/**
|
||||
* @deprecated Will be removed in 1.8
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public FluidFillingEvent(FluidStack fluid, World world, int x, int y, int z, IFluidTank tank)
|
||||
public FluidFillingEvent(FluidStack fluid, World world, BlockPos pos, IFluidTank tank, int amount)
|
||||
{
|
||||
this(fluid, world, x, y, z, tank, -1);
|
||||
}
|
||||
|
||||
public FluidFillingEvent(FluidStack fluid, World world, int x, int y, int z, IFluidTank tank, int amount)
|
||||
{
|
||||
super(fluid, world, x, y, z);
|
||||
super(fluid, world, pos);
|
||||
this.tank = tank;
|
||||
this.amount = amount;
|
||||
}
|
||||
@@ -69,28 +52,16 @@ public class FluidEvent extends Event
|
||||
/**
|
||||
* Mods should fire this event when a fluid is {@link IFluidTank#drain(int, boolean)} from their
|
||||
* tank.
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static class FluidDrainingEvent extends FluidEvent
|
||||
{
|
||||
public final IFluidTank tank;
|
||||
public final int amount;
|
||||
|
||||
/**
|
||||
* @deprecated Will be removed in 1.8
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public FluidDrainingEvent(FluidStack fluid, World world, int x, int y, int z, IFluidTank tank)
|
||||
public FluidDrainingEvent(FluidStack fluid, World world, BlockPos pos, IFluidTank tank, int amount)
|
||||
{
|
||||
this(fluid, world, x, y, z, tank, -1);
|
||||
}
|
||||
|
||||
public FluidDrainingEvent(FluidStack fluid, World world, int x, int y, int z, IFluidTank tank, int amount)
|
||||
{
|
||||
super(fluid, world, x, y, z);
|
||||
super(fluid, world, pos);
|
||||
this.amount = amount;
|
||||
this.tank = tank;
|
||||
}
|
||||
@@ -99,21 +70,19 @@ public class FluidEvent extends Event
|
||||
/**
|
||||
* Mods should fire this event when a fluid "spills", for example, if a block containing fluid
|
||||
* is broken.
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static class FluidSpilledEvent extends FluidEvent
|
||||
{
|
||||
public FluidSpilledEvent(FluidStack fluid, World world, int x, int y, int z)
|
||||
public FluidSpilledEvent(FluidStack fluid, World world, BlockPos pos)
|
||||
{
|
||||
super(fluid, world, x, y, z);
|
||||
super(fluid, world, pos);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A handy shortcut for firing the various fluid events.
|
||||
*
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
public static final void fireEvent(FluidEvent event)
|
||||
|
||||
Reference in new issue
Block a user