本文整理汇总了Java中net.minecraft.block.BlockEventData类的典型用法代码示例。如果您正苦于以下问题:Java BlockEventData类的具体用法?Java BlockEventData怎么用?Java BlockEventData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BlockEventData类属于net.minecraft.block包,在下文中一共展示了BlockEventData类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: sendQueuedBlockEvents
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private void sendQueuedBlockEvents()
{
while (!this.field_147490_S[this.blockEventCacheIndex].isEmpty())
{
int i = this.blockEventCacheIndex;
this.blockEventCacheIndex ^= 1;
for (BlockEventData blockeventdata : this.field_147490_S[i])
{
if (this.fireBlockEvent(blockeventdata))
{
this.mcServer.getConfigurationManager().sendToAllNear((double)blockeventdata.getPosition().getX(), (double)blockeventdata.getPosition().getY(), (double)blockeventdata.getPosition().getZ(), 64.0D, this.provider.getDimensionId(), new S24PacketBlockAction(blockeventdata.getPosition(), blockeventdata.getBlock(), blockeventdata.getEventID(), blockeventdata.getEventParameter()));
}
}
this.field_147490_S[i].clear();
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:19,代码来源:WorldServer.java
示例2: sendQueuedBlockEvents
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private void sendQueuedBlockEvents()
{
while (!this.blockEventQueue[this.blockEventCacheIndex].isEmpty())
{
int i = this.blockEventCacheIndex;
this.blockEventCacheIndex ^= 1;
for (BlockEventData blockeventdata : this.blockEventQueue[i])
{
if (this.fireBlockEvent(blockeventdata))
{
this.mcServer.getPlayerList().sendToAllNearExcept((EntityPlayer)null, (double)blockeventdata.getPosition().getX(), (double)blockeventdata.getPosition().getY(), (double)blockeventdata.getPosition().getZ(), 64.0D, this.provider.getDimension(), new SPacketBlockAction(blockeventdata.getPosition(), blockeventdata.getBlock(), blockeventdata.getEventID(), blockeventdata.getEventParameter()));
}
}
this.blockEventQueue[i].clear();
}
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:19,代码来源:WorldServer.java
示例3: func_147488_Z
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private void func_147488_Z() {
while (!this.field_147490_S[this.blockEventCacheIndex].isEmpty()) {
int i = this.blockEventCacheIndex;
this.blockEventCacheIndex ^= 1;
for (final BlockEventData eventData : this.field_147490_S[i]) {
if (this.func_147485_a(eventData)) {
this.mcServer.getConfigurationManager().sendToAllNear((double) eventData.func_151340_a(),
(double) eventData.func_151342_b(), (double) eventData.func_151341_c(), 64.0D,
this.provider.dimensionId,
new S24PacketBlockAction(eventData.func_151340_a(), eventData.func_151342_b(),
eventData.func_151341_c(), eventData.getBlock(), eventData.getEventID(),
eventData.getEventParameter()));
}
}
this.field_147490_S[i].clear();
}
}
开发者ID:OreCruncher,项目名称:Jiffy,代码行数:20,代码来源:WorldServer.java
示例4: func_147488_Z
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private void func_147488_Z()
{
while (!this.field_147490_S[this.field_147489_T].isEmpty())
{
int var1 = this.field_147489_T;
this.field_147489_T ^= 1;
Iterator var2 = this.field_147490_S[var1].iterator();
while (var2.hasNext())
{
BlockEventData var3 = (BlockEventData)var2.next();
if (this.func_147485_a(var3))
{
this.mcServer.getConfigurationManager().func_148541_a((double)var3.func_151340_a(), (double)var3.func_151342_b(), (double)var3.func_151341_c(), 64.0D, this.provider.dimensionId, new S24PacketBlockAction(var3.func_151340_a(), var3.func_151342_b(), var3.func_151341_c(), var3.getBlock(), var3.getEventID(), var3.getEventParameter()));
}
}
this.field_147490_S[var1].clear();
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:22,代码来源:WorldServer.java
示例5: func_147488_Z
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private void func_147488_Z()
{
while (!this.field_147490_S[this.blockEventCacheIndex].isEmpty())
{
int i = this.blockEventCacheIndex;
this.blockEventCacheIndex ^= 1;
Iterator iterator = this.field_147490_S[i].iterator();
while (iterator.hasNext())
{
BlockEventData blockeventdata = (BlockEventData)iterator.next();
if (this.func_147485_a(blockeventdata))
{
this.mcServer.getConfigurationManager().sendToAllNear((double)blockeventdata.func_151340_a(), (double)blockeventdata.func_151342_b(), (double)blockeventdata.func_151341_c(), 64.0D, this.provider.dimensionId, new S24PacketBlockAction(blockeventdata.func_151340_a(), blockeventdata.func_151342_b(), blockeventdata.func_151341_c(), blockeventdata.getBlock(), blockeventdata.getEventID(), blockeventdata.getEventParameter()));
}
}
this.field_147490_S[i].clear();
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:22,代码来源:WorldServer.java
示例6: func_73055_Q
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private void func_73055_Q() {
while(!this.field_73067_Q[this.field_73070_R].isEmpty()) {
int var1 = this.field_73070_R;
this.field_73070_R ^= 1;
Iterator var2 = this.field_73067_Q[var1].iterator();
while(var2.hasNext()) {
BlockEventData var3 = (BlockEventData)var2.next();
if(this.func_73043_a(var3)) {
this.field_73061_a.func_71203_ab().func_72393_a((double)var3.func_76919_a(), (double)var3.func_76921_b(), (double)var3.func_76920_c(), 64.0D, this.field_73011_w.field_76574_g, new Packet54PlayNoteBlock(var3.func_76919_a(), var3.func_76921_b(), var3.func_76920_c(), var3.func_76916_f(), var3.func_76918_d(), var3.func_76917_e()));
}
}
this.field_73067_Q[var1].clear();
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:18,代码来源:WorldServer.java
示例7: sendAndApplyBlockEvents
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
/**
* Send and apply locally all pending BlockEvents to each player with 64m radius of the event.
*/
private void sendAndApplyBlockEvents()
{
while (!this.blockEventCache[this.blockEventCacheIndex].isEmpty())
{
int i = this.blockEventCacheIndex;
this.blockEventCacheIndex ^= 1;
Iterator iterator = this.blockEventCache[i].iterator();
while (iterator.hasNext())
{
BlockEventData blockeventdata = (BlockEventData)iterator.next();
if (this.onBlockEventReceived(blockeventdata))
{
this.mcServer.getConfigurationManager().sendToAllNear((double)blockeventdata.getX(), (double)blockeventdata.getY(), (double)blockeventdata.getZ(), 64.0D, this.provider.dimensionId, new Packet54PlayNoteBlock(blockeventdata.getX(), blockeventdata.getY(), blockeventdata.getZ(), blockeventdata.getBlockID(), blockeventdata.getEventID(), blockeventdata.getEventParameter()));
}
}
this.blockEventCache[i].clear();
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:WorldServer.java
示例8: addBlockEvent
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
public void addBlockEvent(BlockPos pos, Block blockIn, int eventID, int eventParam)
{
BlockEventData blockeventdata = new BlockEventData(pos, blockIn, eventID, eventParam);
for (BlockEventData blockeventdata1 : this.field_147490_S[this.blockEventCacheIndex])
{
if (blockeventdata1.equals(blockeventdata))
{
return;
}
}
this.field_147490_S[this.blockEventCacheIndex].add(blockeventdata);
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:15,代码来源:WorldServer.java
示例9: addBlockEvent
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
public void addBlockEvent(BlockPos pos, Block blockIn, int eventID, int eventParam)
{
BlockEventData blockeventdata = new BlockEventData(pos, blockIn, eventID, eventParam);
for (BlockEventData blockeventdata1 : this.blockEventQueue[this.blockEventCacheIndex])
{
if (blockeventdata1.equals(blockeventdata))
{
return;
}
}
this.blockEventQueue[this.blockEventCacheIndex].add(blockeventdata);
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:WorldServer.java
示例10: sendQueuedBlockEvents
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private void sendQueuedBlockEvents()
{
while (!this.blockEventQueue[this.blockEventCacheIndex].isEmpty())
{
int i = this.blockEventCacheIndex;
this.blockEventCacheIndex ^= 1;
for (BlockEventData blockeventdata : this.blockEventQueue[i])
{
if (this.fireBlockEvent(blockeventdata))
{
this.mcServer.getPlayerList().sendToAllNearExcept((EntityPlayer)null, (double)blockeventdata.getPosition().getX(), (double)blockeventdata.getPosition().getY(), (double)blockeventdata.getPosition().getZ(), 64.0D, this.provider.getDimensionType().getId(), new SPacketBlockAction(blockeventdata.getPosition(), blockeventdata.getBlock(), blockeventdata.getEventID(), blockeventdata.getEventParameter()));
}
}
this.blockEventQueue[i].clear();
}
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:WorldServer.java
示例11: fireBlockEvent
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private boolean fireBlockEvent(BlockEventData event)
{
IBlockState iblockstate = this.getBlockState(event.getPosition());
return iblockstate.getBlock() == event.getBlock() ? iblockstate.getBlock().onBlockEventReceived(this, event.getPosition(), iblockstate, event.getEventID(), event.getEventParameter()) : false;
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:WorldServer.java
示例12: fireBlockEvent
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private boolean fireBlockEvent(BlockEventData event)
{
IBlockState iblockstate = this.getBlockState(event.getPosition());
return iblockstate.getBlock() == event.getBlock() ? iblockstate.onBlockEventReceived(this, event.getPosition(), event.getEventID(), event.getEventParameter()) : false;
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:WorldServer.java
示例13: func_147485_a
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private boolean func_147485_a(BlockEventData event) {
final Block block = this.getBlock(event.func_151340_a(), event.func_151342_b(), event.func_151341_c());
return block == event.getBlock() ? block.onBlockEventReceived(this, event.func_151340_a(),
event.func_151342_b(), event.func_151341_c(), event.getEventID(), event.getEventParameter()) : false;
}
开发者ID:OreCruncher,项目名称:Jiffy,代码行数:6,代码来源:WorldServer.java
示例14: func_147485_a
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private boolean func_147485_a(BlockEventData p_147485_1_)
{
Block var2 = this.getBlock(p_147485_1_.func_151340_a(), p_147485_1_.func_151342_b(), p_147485_1_.func_151341_c());
return var2 == p_147485_1_.getBlock() ? var2.onBlockEventReceived(this, p_147485_1_.func_151340_a(), p_147485_1_.func_151342_b(), p_147485_1_.func_151341_c(), p_147485_1_.getEventID(), p_147485_1_.getEventParameter()) : false;
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:6,代码来源:WorldServer.java
示例15: func_147485_a
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private boolean func_147485_a(BlockEventData p_147485_1_)
{
Block block = this.getBlock(p_147485_1_.func_151340_a(), p_147485_1_.func_151342_b(), p_147485_1_.func_151341_c());
return block == p_147485_1_.getBlock() ? block.onBlockEventReceived(this, p_147485_1_.func_151340_a(), p_147485_1_.func_151342_b(), p_147485_1_.func_151341_c(), p_147485_1_.getEventID(), p_147485_1_.getEventParameter()) : false;
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:6,代码来源:WorldServer.java
示例16: func_73043_a
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
private boolean func_73043_a(BlockEventData p_73043_1_) {
int var2 = this.func_72798_a(p_73043_1_.func_76919_a(), p_73043_1_.func_76921_b(), p_73043_1_.func_76920_c());
return var2 == p_73043_1_.func_76916_f()?Block.field_71973_m[var2].func_71883_b(this, p_73043_1_.func_76919_a(), p_73043_1_.func_76921_b(), p_73043_1_.func_76920_c(), p_73043_1_.func_76918_d(), p_73043_1_.func_76917_e()):false;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:5,代码来源:WorldServer.java
示例17: onBlockEventReceived
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
/**
* Called to apply a pending BlockEvent to apply to the current world.
*/
private boolean onBlockEventReceived(BlockEventData par1BlockEventData)
{
int i = this.getBlockId(par1BlockEventData.getX(), par1BlockEventData.getY(), par1BlockEventData.getZ());
return i == par1BlockEventData.getBlockID() ? Block.blocksList[i].onBlockEventReceived(this, par1BlockEventData.getX(), par1BlockEventData.getY(), par1BlockEventData.getZ(), par1BlockEventData.getEventID(), par1BlockEventData.getEventParameter()) : false;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:9,代码来源:WorldServer.java
示例18: addBlockEvent
import net.minecraft.block.BlockEventData; //导入依赖的package包/类
/**
* Adds a block event with the given Args to the blockEventCache. During the
* next tick(), the block specified will have its onBlockEvent handler
* called with the given parameters. Args: X,Y,Z, Block, EventID,
* EventParameter
*/
public void addBlockEvent(int x, int y, int z, Block block, int eventId, int eventParm) {
// Because the event list is a Set duplicates cannot be inserted
this.field_147490_S[this.blockEventCacheIndex].add(new BlockEventData(x, y, z, block, eventId, eventParm));
}
开发者ID:OreCruncher,项目名称:Jiffy,代码行数:11,代码来源:WorldServer.java
注:本文中的net.minecraft.block.BlockEventData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论