@Override public void readPacketNBT(NBTTagCompound cmp) { super.readPacketNBT(cmp); hasWater = cmp.getBoolean(TAG_HAS_WATER); hasLava = cmp.getBoolean(TAG_HAS_LAVA); isMossy = cmp.getBoolean(TAG_IS_MOSSY); }
@Override public boolean hasGenerated( final int dim, final int chunkX, final int chunkZ ) { synchronized( SpawnData.class ) { final NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ ); return data.getBoolean( chunkX + "," + chunkZ ); } }
@Override public void readPacketNBT(NBTTagCompound cmp) { boolean prevActive = active; active = cmp.getBoolean(TAG_ACTIVE); if(world != null && world.isRemote) if(prevActive != active) asm.transition(active ? "moving" : "default"); }
@Override public void readPacketNBT(NBTTagCompound cmp) { speed = cmp.getInteger(TAG_SPEED); backwards = cmp.getBoolean(TAG_BACKWARDS); }
@Override public void readPacketNBT(NBTTagCompound par1nbtTagCompound) { super.readPacketNBT(par1nbtTagCompound); timeLeft = par1nbtTagCompound.getInteger(TAG_TIME_LEFT); burning = par1nbtTagCompound.getBoolean(TAG_BURNING); }
@Override public void readFromPacketNBT(NBTTagCompound cmp) { super.readFromPacketNBT(cmp); cooldown = cmp.getInteger(TAG_COOLDOWN); ateOnce = cmp.getBoolean(TAG_ATE_ONCE); }
@Override public boolean hasPermission( final ItemStack is, final SecurityPermissions permission ) { final NBTTagCompound tag = Platform.openNbtData( is ); return tag.getBoolean( permission.name() ); }
@Override public boolean allowBurstShooting(ItemStack stack, IManaSpreader spreader, boolean redstone) { IManaBurst burst = spreader.runBurstSimulation(); Entity e = (Entity) burst; return e.getEntityData().getBoolean(TAG_TRIPPED); }
@Override public void readFromNBT( final NBTTagCompound data ) { super.readFromNBT( data ); this.setOutput( data.getBoolean( "output" ) ); this.freq = data.getShort( "freq" ); }
@Override public void readFromNBT( final NBTTagCompound data ) { super.readFromNBT( data ); this.isLocked = data.getBoolean( "isLocked" ); final NBTTagCompound myItem = data.getCompoundTag( "configuredItem" ); this.configuredItem = AEItemStack.fromNBT( myItem ); }
@Override public void readPacketNBT(NBTTagCompound par1nbtTagCompound) { super.readPacketNBT(par1nbtTagCompound); enabled = par1nbtTagCompound.getBoolean(TAG_ENABLED); ticksElapsed = par1nbtTagCompound.getInteger(TAG_TICKS_ELAPSED); mana = par1nbtTagCompound.getInteger(TAG_MANA); }
@Override public void readFromNBT( final NBTTagCompound data ) { super.readFromNBT( data ); this.setCraftingRecipe( data.getBoolean( "craftingMode" ) ); this.setSubstitution( data.getBoolean( "substitute" ) ); this.pattern.readFromNBT( data, "pattern" ); this.output.readFromNBT( data, "outputList" ); this.crafting.readFromNBT( data, "craftingGrid" ); }
@Override public void readFromNBT( final NBTTagCompound data ) { super.readFromNBT( data ); this.lastReportedValue = data.getLong( "lastReportedValue" ); this.reportingValue = data.getLong( "reportingValue" ); this.prevState = data.getBoolean( "prevState" ); this.config.readFromNBT( data, "config" ); }
@Override public void readFromNBT( final NBTTagCompound data ) { super.readFromNBT( data ); this.lastReportedValue = data.getLong( "lastReportedValue" ); this.reportingValue = data.getLong( "reportingValue" ); this.prevState = data.getBoolean( "prevState" ); this.config.readFromNBT( data, "config" ); }
public void toggleFacadeMode() { final NBTTagCompound data = Platform.openNbtData( this.toolInv.getItemStack() ); data.setBoolean( "hideFacades", !data.getBoolean( "hideFacades" ) ); this.detectAndSendChanges(); }
@Override protected void readEntityFromNBT(@Nonnull NBTTagCompound cmp) { setMaster(cmp.getBoolean(TAG_MASTER)); setNetwork(EnumDyeColor.byMetadata(cmp.getInteger(TAG_NETWORK))); setInvisible(cmp.getInteger(TAG_INVIS) == 1); }
@Override public void readEntityFromNBT(NBTTagCompound compound) { super.readEntityFromNBT(compound); if(compound.hasKey("fly_stack")) { stack = new ItemStack(compound.getCompoundTag("fly_stack")); } setFire(compound.getBoolean("flare")); }
@Override public void readPacketNBT(NBTTagCompound cmp) { side = cmp.getInteger(TAG_SIDE); rotating = cmp.getBoolean(TAG_ROTATING); if(world != null && !world.isRemote) rotationTicks = cmp.getInteger(TAG_ROTATION_TICKS); anglePerTick = cmp.getDouble(TAG_ANGLE_PER_TICK); nextRandomRotation = cmp.getInteger(TAG_NEXT_RANDOM_ROTATION); int modeOrdinal = cmp.getInteger(TAG_TORCH_MODE); TorchMode[] modes = TorchMode.values(); torchMode = modes[modeOrdinal % modes.length]; }
@Override public void readEntityFromNBT(@Nonnull NBTTagCompound cmp) { super.readEntityFromNBT(cmp); setCharging(cmp.getBoolean(TAG_CHARGING)); setVariety(cmp.getInteger(TAG_VARIETY)); setChargeTicks(cmp.getInteger(TAG_CHARGE_TICKS)); setLiveTicks(cmp.getInteger(TAG_LIVE_TICKS)); setDelay(cmp.getInteger(TAG_DELAY)); setRotation(cmp.getFloat(TAG_ROTATION)); }
@SubscribeEvent public static void onDrops(LivingDropsEvent event) { if(event.getEntityLiving() instanceof EntityBlaze && event.getEntityLiving().getEntityData().getBoolean(TAG_FEL_SPAWNED)) if(event.getDrops().isEmpty()) event.getDrops().add(new EntityItem(event.getEntityLiving().world, event.getEntityLiving().posX, event.getEntityLiving().posY, event.getEntityLiving().posZ, new ItemStack(Items.BLAZE_POWDER, 6))); else for(EntityItem item : event.getDrops()) { ItemStack stack = item.getItem(); if(stack.getItem() == Items.BLAZE_ROD) item.setItem(new ItemStack(Items.BLAZE_POWDER, stack.getCount() * 10)); } }