001package net.minecraft.world; 002 003import net.minecraft.entity.Entity; 004import net.minecraft.entity.player.EntityPlayer; 005 006public interface IWorldAccess 007{ 008 /** 009 * On the client, re-renders the block. On the server, sends the block to the client (which will re-render it), 010 * including the tile entity description packet if applicable. Args: x, y, z 011 */ 012 void markBlockForUpdate(int i, int j, int k); 013 014 /** 015 * On the client, re-renders this block. On the server, does nothing. Used for lighting updates. 016 */ 017 void markBlockForRenderUpdate(int i, int j, int k); 018 019 /** 020 * On the client, re-renders all blocks in this range, inclusive. On the server, does nothing. Args: min x, min y, 021 * min z, max x, max y, max z 022 */ 023 void markBlockRangeForRenderUpdate(int i, int j, int k, int l, int i1, int j1); 024 025 /** 026 * Plays the specified sound. Arg: soundName, x, y, z, volume, pitch 027 */ 028 void playSound(String s, double d0, double d1, double d2, float f, float f1); 029 030 /** 031 * Plays sound to all near players except the player reference given 032 */ 033 void playSoundToNearExcept(EntityPlayer entityplayer, String s, double d0, double d1, double d2, float f, float f1); 034 035 /** 036 * Spawns a particle. Arg: particleType, x, y, z, velX, velY, velZ 037 */ 038 void spawnParticle(String s, double d0, double d1, double d2, double d3, double d4, double d5); 039 040 /** 041 * Called on all IWorldAccesses when an entity is created or loaded. On client worlds, starts downloading any 042 * necessary textures. On server worlds, adds the entity to the entity tracker. 043 */ 044 void onEntityCreate(Entity entity); 045 046 /** 047 * Called on all IWorldAccesses when an entity is unloaded or destroyed. On client worlds, releases any downloaded 048 * textures. On server worlds, removes the entity from the entity tracker. 049 */ 050 void onEntityDestroy(Entity entity); 051 052 /** 053 * Plays the specified record. Arg: recordName, x, y, z 054 */ 055 void playRecord(String s, int i, int j, int k); 056 057 void broadcastSound(int i, int j, int k, int l, int i1); 058 059 /** 060 * Plays a pre-canned sound effect along with potentially auxiliary data-driven one-shot behaviour (particles, etc). 061 */ 062 void playAuxSFX(EntityPlayer entityplayer, int i, int j, int k, int l, int i1); 063 064 /** 065 * Starts (or continues) destroying a block with given ID at the given coordinates for the given partially destroyed 066 * value 067 */ 068 void destroyBlockPartially(int i, int j, int k, int l, int i1); 069}