public void onInteract(World world, int x, int y, int z, EntityPlayer ep) { LaserEffectTile te = (LaserEffectTile) world.getTileEntity(x, y, z); if (DragonAPICore.isReikasComputer() && ReikaObfuscationHelper.isDeObfEnvironment()) { ItemStack is = ep.getCurrentEquippedItem(); if (ChromaItems.SHARD.matchWith(is)) { int dmg = is.getItemDamage() % 16; if (dmg == CrystalElement.RED.ordinal()) { te.color.red = !te.color.red; } else if (dmg == CrystalElement.GREEN.ordinal()) { te.color.green = !te.color.green; } else if (dmg == CrystalElement.BLUE.ordinal()) { te.color.blue = !te.color.blue; } world.markBlockForUpdate(x, y, z); return; } else if (!this.isOmniDirectional() && is != null && is.getItem() == Items.diamond) { te.rotateable = !te.rotateable; world.markBlockForUpdate(x, y, z); return; } else if (te instanceof TargetTile && is != null && is.getItem() == Items.glowstone_dust) { ((TargetTile) te).trigger(!((TargetTile) te).isTriggered(), true, false); return; } else if (te instanceof PrismTile && is != null && is.getItem() == Items.emerald) { ((PrismTile) te).timer++; return; } if (this == EMITTER && !ep.isSneaking()) { te.fire(); return; } } if (!this.isOmniDirectional() && !world.isRemote) te.rotate(); }
public boolean playerCanSee(EntityPlayer ep) { if (this.isDummiedOut()) return DragonAPICore.isReikasComputer(); if (progress != null) { for (int i = 0; i < progress.length; i++) { ProgressStage p = progress[i]; if (!p.isPlayerAtStage(ep)) return false; } } return ChromaResearchManager.instance.playerHasFragment(ep, this); }
@Override public void onNeighborBlockChange(World world, int x, int y, int z, Block b) { if (DragonAPICore.isReikasComputer() && ReikaObfuscationHelper.isDeObfEnvironment()) { if (world.isBlockIndirectlyGettingPowered(x, y, z)) { if (world.getBlockMetadata(x, y, z) == LaserEffectType.EMITTER.ordinal()) { LaserEffectTile te = (LaserEffectTile) world.getTileEntity(x, y, z); te.fire(); return; } } } }
public GuiHandbook(EntityPlayer p5ep, World world, int s, int p) { // super(); player = p5ep; worldObj = world; staticwidth = xSize; staticheight = ySize; screen = s; page = p; if (ConfigRegistry.DYNAMICHANDBOOK.getState() || (DragonAPICore.isReikasComputer() && ReikaObfuscationHelper.isDeObfEnvironment())) this.reloadXMLData(); }