@AutoLoad public class BlockDataHandler extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static BlockDataHandler |
get() |
static <T> T |
getData(java.lang.String identifier,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos) |
void |
onChunkWatched(net.minecraftforge.event.world.ChunkWatchEvent.Watch event)
Server only.
|
void |
onDataLoad(net.minecraftforge.event.world.ChunkDataEvent.Load event)
On data load.
|
void |
onDataSave(net.minecraftforge.event.world.ChunkDataEvent.Save event) |
void |
onDataUnload(net.minecraftforge.event.world.ChunkEvent.Unload event) |
static <T> void |
registerBlockData(java.lang.String identifier,
com.google.common.base.Function<io.netty.buffer.ByteBuf,T> from,
com.google.common.base.Function<T,io.netty.buffer.ByteBuf> to) |
static <T> void |
removeData(java.lang.String identifier,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos) |
static <T> void |
setData(java.lang.String identifier,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
T data) |
public static <T> void registerBlockData(java.lang.String identifier,
com.google.common.base.Function<io.netty.buffer.ByteBuf,T> from,
com.google.common.base.Function<T,io.netty.buffer.ByteBuf> to)
public static <T> T getData(java.lang.String identifier,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
public static <T> void setData(java.lang.String identifier,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
T data)
public static <T> void removeData(java.lang.String identifier,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
public void onDataLoad(net.minecraftforge.event.world.ChunkDataEvent.Load event)
event - the eventpublic void onDataSave(net.minecraftforge.event.world.ChunkDataEvent.Save event)
public void onDataUnload(net.minecraftforge.event.world.ChunkEvent.Unload event)
public void onChunkWatched(net.minecraftforge.event.world.ChunkWatchEvent.Watch event)
event - the eventpublic static BlockDataHandler get()