本文整理匯總了Java中net.minecraft.tileentity.TileEntitySign.func_142009_b方法的典型用法代碼示例。如果您正苦於以下問題:Java TileEntitySign.func_142009_b方法的具體用法?Java TileEntitySign.func_142009_b怎麽用?Java TileEntitySign.func_142009_b使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.tileentity.TileEntitySign
的用法示例。
在下文中一共展示了TileEntitySign.func_142009_b方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: func_72487_a
import net.minecraft.tileentity.TileEntitySign; //導入方法依賴的package包/類
public void func_72487_a(Packet130UpdateSign p_72487_1_) {
this.field_72574_e.func_143004_u();
WorldServer var2 = this.field_72573_d.func_71218_a(this.field_72574_e.field_71093_bK);
if(var2.func_72899_e(p_72487_1_.field_73311_a, p_72487_1_.field_73309_b, p_72487_1_.field_73310_c)) {
TileEntity var3 = var2.func_72796_p(p_72487_1_.field_73311_a, p_72487_1_.field_73309_b, p_72487_1_.field_73310_c);
if(var3 instanceof TileEntitySign) {
TileEntitySign var4 = (TileEntitySign)var3;
if(!var4.func_70409_a() || var4.func_142009_b() != this.field_72574_e) {
this.field_72573_d.func_71236_h("Player " + this.field_72574_e.func_70005_c_() + " just tried to change non-editable sign");
return;
}
}
int var6;
int var8;
for(var8 = 0; var8 < 4; ++var8) {
boolean var5 = true;
if(p_72487_1_.field_73308_d[var8].length() > 15) {
var5 = false;
} else {
for(var6 = 0; var6 < p_72487_1_.field_73308_d[var8].length(); ++var6) {
if(ChatAllowedCharacters.field_71568_a.indexOf(p_72487_1_.field_73308_d[var8].charAt(var6)) < 0) {
var5 = false;
}
}
}
if(!var5) {
p_72487_1_.field_73308_d[var8] = "!?";
}
}
if(var3 instanceof TileEntitySign) {
var8 = p_72487_1_.field_73311_a;
int var9 = p_72487_1_.field_73309_b;
var6 = p_72487_1_.field_73310_c;
TileEntitySign var7 = (TileEntitySign)var3;
System.arraycopy(p_72487_1_.field_73308_d, 0, var7.field_70412_a, 0, 4);
var7.func_70296_d();
var2.func_72845_h(var8, var9, var6);
}
}
}
示例2: handleUpdateSign
import net.minecraft.tileentity.TileEntitySign; //導入方法依賴的package包/類
/**
* Updates Client side signs
*/
public void handleUpdateSign(Packet130UpdateSign par1Packet130UpdateSign)
{
this.playerEntity.func_143004_u();
WorldServer worldserver = this.mcServer.worldServerForDimension(this.playerEntity.dimension);
if (worldserver.blockExists(par1Packet130UpdateSign.xPosition, par1Packet130UpdateSign.yPosition, par1Packet130UpdateSign.zPosition))
{
TileEntity tileentity = worldserver.getBlockTileEntity(par1Packet130UpdateSign.xPosition, par1Packet130UpdateSign.yPosition, par1Packet130UpdateSign.zPosition);
if (tileentity instanceof TileEntitySign)
{
TileEntitySign tileentitysign = (TileEntitySign)tileentity;
if (!tileentitysign.isEditable() || tileentitysign.func_142009_b() != this.playerEntity)
{
this.mcServer.logWarning("Player " + this.playerEntity.getCommandSenderName() + " just tried to change non-editable sign");
return;
}
}
int i;
int j;
for (j = 0; j < 4; ++j)
{
boolean flag = true;
if (par1Packet130UpdateSign.signLines[j].length() > 15)
{
flag = false;
}
else
{
for (i = 0; i < par1Packet130UpdateSign.signLines[j].length(); ++i)
{
if (ChatAllowedCharacters.allowedCharacters.indexOf(par1Packet130UpdateSign.signLines[j].charAt(i)) < 0)
{
flag = false;
}
}
}
if (!flag)
{
par1Packet130UpdateSign.signLines[j] = "!?";
}
}
if (tileentity instanceof TileEntitySign)
{
j = par1Packet130UpdateSign.xPosition;
int k = par1Packet130UpdateSign.yPosition;
i = par1Packet130UpdateSign.zPosition;
TileEntitySign tileentitysign1 = (TileEntitySign)tileentity;
System.arraycopy(par1Packet130UpdateSign.signLines, 0, tileentitysign1.signText, 0, 4);
tileentitysign1.onInventoryChanged();
worldserver.markBlockForUpdate(j, k, i);
}
}
}