mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 11:59:25 +00:00
Re-introduce RenderBlockOverlayEvent, seems to have been missed during 1.8 update
This commit is contained in:
1 parent
b2033d642c
commit
ebef4553f3
3 files changed
+74
-13
No files matched your search
@@ -1,8 +1,10 @@
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
@@ -28,23 +30,22 @@ public class RenderBlockOverlayEvent extends Event {
|
||||
/**
|
||||
* If the overlay type is BLOCK, then this is the block which the overlay is getting it's icon from
|
||||
*/
|
||||
public final Block blockForOverlay;
|
||||
public final int blockX;
|
||||
public final int blockY;
|
||||
public final int blockZ;
|
||||
public final IBlockState blockForOverlay;
|
||||
public final BlockPos blockPos;
|
||||
|
||||
public RenderBlockOverlayEvent(EntityPlayer player, float renderPartialTicks, OverlayType type, Block block, int blockX, int blockY, int blockZ)
|
||||
@Deprecated
|
||||
public RenderBlockOverlayEvent(EntityPlayer player, float renderPartialTicks, OverlayType type, Block block, int x, int y, int z)
|
||||
{
|
||||
this(player, renderPartialTicks, type, block.getDefaultState(), new BlockPos(x, y, z));
|
||||
}
|
||||
|
||||
public RenderBlockOverlayEvent(EntityPlayer player, float renderPartialTicks, OverlayType type, IBlockState block, BlockPos blockPos)
|
||||
{
|
||||
this.player = player;
|
||||
this.renderPartialTicks = renderPartialTicks;
|
||||
this.overlayType = type;
|
||||
if (this.overlayType == OverlayType.BLOCK)
|
||||
this.blockForOverlay = block;
|
||||
else
|
||||
this.blockForOverlay = null;
|
||||
this.blockX = blockX;
|
||||
this.blockY = blockY;
|
||||
this.blockZ = blockZ;
|
||||
this.blockForOverlay = block;
|
||||
this.blockPos = blockPos;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user