split client and server 1
This commit is contained in:
parent
26a15a0b15
commit
2fa521c3d1
661 changed files with 3058 additions and 2826 deletions
|
@ -1,4 +1,4 @@
|
|||
package game;
|
||||
package client;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedInputStream;
|
||||
|
@ -30,21 +30,54 @@ import java.util.concurrent.FutureTask;
|
|||
import java.util.function.Function;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import game.collect.Lists;
|
||||
import game.collect.Maps;
|
||||
import game.future.Futures;
|
||||
import game.future.ListenableFuture;
|
||||
import game.future.ListenableFutureTask;
|
||||
|
||||
import game.audio.AudioInterface;
|
||||
import game.audio.PositionedSound;
|
||||
import game.audio.SoundManager;
|
||||
import game.audio.Volume;
|
||||
import client.audio.AudioInterface;
|
||||
import client.audio.SoundManager;
|
||||
import client.audio.Volume;
|
||||
import client.gui.FileCallback;
|
||||
import client.gui.Font;
|
||||
import client.gui.Gui;
|
||||
import client.gui.GuiConsole;
|
||||
import client.gui.GuiInfo;
|
||||
import client.gui.GuiLoading;
|
||||
import client.gui.GuiMenu;
|
||||
import client.gui.GuiServer;
|
||||
import client.gui.Style;
|
||||
import client.gui.character.GuiChar;
|
||||
import client.gui.container.GuiContainer;
|
||||
import client.gui.container.GuiInventory;
|
||||
import client.gui.element.Textbox;
|
||||
import client.gui.ingame.GuiGameOver;
|
||||
import client.renderer.BlockRenderer;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.EntityRenderer;
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.ItemRenderer;
|
||||
import client.renderer.RenderGlobal;
|
||||
import client.renderer.blockmodel.ModelBlock;
|
||||
import client.renderer.blockmodel.ModelManager;
|
||||
import client.renderer.chunk.RenderChunk;
|
||||
import client.renderer.entity.RenderItem;
|
||||
import client.renderer.entity.RenderManager;
|
||||
import client.renderer.particle.EffectRenderer;
|
||||
import client.renderer.texture.EntityTexManager;
|
||||
import client.renderer.texture.TextureManager;
|
||||
import client.renderer.texture.TextureMap;
|
||||
import client.window.Bind;
|
||||
import client.window.Button;
|
||||
import client.window.DisplayMode;
|
||||
import client.window.KeyEvent;
|
||||
import client.window.Keysym;
|
||||
import client.window.Wheel;
|
||||
import client.window.Window;
|
||||
import client.window.WindowEvent;
|
||||
import game.biome.Biome;
|
||||
import game.block.Block;
|
||||
import game.collect.Lists;
|
||||
import game.collect.Maps;
|
||||
import game.color.Colorizer;
|
||||
import game.color.TextColor;
|
||||
import game.entity.Entity;
|
||||
|
@ -52,19 +85,9 @@ import game.entity.animal.EntityHorse;
|
|||
import game.entity.npc.Energy;
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.gui.Font;
|
||||
import game.gui.Gui;
|
||||
import game.gui.GuiConsole;
|
||||
import game.gui.GuiInfo;
|
||||
import game.gui.GuiLoading;
|
||||
import game.gui.GuiMenu;
|
||||
import game.gui.GuiServer;
|
||||
import game.gui.Style;
|
||||
import game.gui.character.GuiChar;
|
||||
import game.gui.container.GuiContainer;
|
||||
import game.gui.container.GuiInventory;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.ingame.GuiGameOver;
|
||||
import game.future.Futures;
|
||||
import game.future.ListenableFuture;
|
||||
import game.future.ListenableFutureTask;
|
||||
import game.init.BlockRegistry;
|
||||
import game.init.Config;
|
||||
import game.init.EntityRegistry;
|
||||
|
@ -81,13 +104,11 @@ import game.log.Log;
|
|||
import game.log.LogLevel;
|
||||
import game.log.Message;
|
||||
import game.material.Material;
|
||||
import game.model.ModelManager;
|
||||
import game.network.ClientLoginHandler;
|
||||
import game.network.ClientPlayer;
|
||||
import game.network.IThreadListener;
|
||||
import game.network.NetConnection;
|
||||
import game.network.NetHandler.ThreadQuickExitException;
|
||||
import game.network.ClientLoginHandler;
|
||||
import game.network.ClientPlayer;
|
||||
import game.network.PlayerController;
|
||||
import game.packet.CPacketAction;
|
||||
import game.packet.CPacketAction.Action;
|
||||
import game.packet.CPacketCheat;
|
||||
|
@ -98,26 +119,12 @@ import game.potion.Potion;
|
|||
import game.potion.PotionEffect;
|
||||
import game.potion.PotionHelper;
|
||||
import game.properties.IProperty;
|
||||
import game.renderer.BlockRenderer;
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.EntityRenderer;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.ItemRenderer;
|
||||
import game.renderer.RenderGlobal;
|
||||
import game.renderer.chunk.RenderChunk;
|
||||
import game.renderer.entity.RenderItem;
|
||||
import game.renderer.entity.RenderManager;
|
||||
import game.renderer.particle.EffectRenderer;
|
||||
import game.renderer.texture.EntityTexManager;
|
||||
import game.renderer.texture.TextureManager;
|
||||
import game.renderer.texture.TextureMap;
|
||||
import game.rng.Random;
|
||||
import game.sound.EventType;
|
||||
import game.sound.PositionedSound;
|
||||
import game.util.CharValidator;
|
||||
import game.util.ExtMath;
|
||||
import game.util.FileCallback;
|
||||
import game.util.FileUtils;
|
||||
import game.util.PerfSection;
|
||||
import game.util.Timing;
|
||||
import game.util.Util;
|
||||
import game.vars.BaseVar.VarFunction;
|
||||
import game.vars.BoolVar;
|
||||
|
@ -135,14 +142,6 @@ import game.vars.StringVar;
|
|||
import game.vars.StringVar.StringFunction;
|
||||
import game.vars.Variable;
|
||||
import game.vars.Variable.IntType;
|
||||
import game.window.Bind;
|
||||
import game.window.Button;
|
||||
import game.window.DisplayMode;
|
||||
import game.window.KeyEvent;
|
||||
import game.window.Keysym;
|
||||
import game.window.Wheel;
|
||||
import game.window.Window;
|
||||
import game.window.WindowEvent;
|
||||
import game.world.BlockPos;
|
||||
import game.world.BoundingBox;
|
||||
import game.world.Chunk;
|
||||
|
@ -2359,7 +2358,7 @@ public class Game implements IThreadListener {
|
|||
|
||||
private void startSound(boolean load) {
|
||||
if(load)
|
||||
SoundEvent.loadSounds();
|
||||
SoundManager.loadSounds();
|
||||
audio = new AudioInterface(this.soundFrameSize, this.soundBufferSize, !this.soundEnabled);
|
||||
boolean started = audio.start();
|
||||
Log.flushLog();
|
||||
|
@ -2585,7 +2584,7 @@ public class Game implements IThreadListener {
|
|||
if(func != null) {
|
||||
Bind.disableInput(key);
|
||||
if(!(this.open instanceof GuiLoading)) {
|
||||
this.soundManager.playSound(new PositionedSound(SoundEvent.CLICK, Volume.GUI));
|
||||
this.soundManager.playSound(new PositionedSound(SoundEvent.CLICK, EventType.UI_INTERFACE));
|
||||
func.runner.execute(key);
|
||||
}
|
||||
}
|
||||
|
@ -2598,6 +2597,7 @@ public class Game implements IThreadListener {
|
|||
Util.checkOs();
|
||||
Log.init(INSTANCE);
|
||||
Window.init();
|
||||
ModelBlock.setAsProvider();
|
||||
Registry.setup("Render thread");
|
||||
INSTANCE.run();
|
||||
Window.end();
|
|
@ -1,4 +1,6 @@
|
|||
package game.util;
|
||||
package client;
|
||||
|
||||
import game.util.Util;
|
||||
|
||||
public enum PerfSection {
|
||||
TIMING("Timing"),
|
|
@ -1,7 +1,5 @@
|
|||
package game.network;
|
||||
package client;
|
||||
|
||||
import game.Game;
|
||||
import game.audio.PositionedSound;
|
||||
import game.block.Block;
|
||||
import game.entity.Entity;
|
||||
import game.entity.npc.EntityNPC;
|
||||
|
@ -11,10 +9,12 @@ import game.item.ItemBlock;
|
|||
import game.item.ItemControl;
|
||||
import game.item.ItemStack;
|
||||
import game.material.Material;
|
||||
import game.network.ClientPlayer;
|
||||
import game.packet.CPacketAction;
|
||||
import game.packet.CPacketBreak;
|
||||
import game.packet.CPacketClick;
|
||||
import game.packet.CPacketPlace;
|
||||
import game.sound.PositionedSound;
|
||||
import game.world.BlockPos;
|
||||
import game.world.Facing;
|
||||
import game.world.State;
|
|
@ -1,4 +1,4 @@
|
|||
package game.util;
|
||||
package client;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
|
@ -1,4 +1,4 @@
|
|||
package game.util;
|
||||
package client;
|
||||
|
||||
public class Timing {
|
||||
public static long tmr_timer;
|
|
@ -1,4 +1,4 @@
|
|||
package game.audio;
|
||||
package client.audio;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -11,7 +11,6 @@ import javax.sound.sampled.LineUnavailableException;
|
|||
import javax.sound.sampled.SourceDataLine;
|
||||
|
||||
import game.collect.Lists;
|
||||
|
||||
import game.log.Log;
|
||||
|
||||
public class AudioInterface implements Runnable {
|
|
@ -1,15 +1,16 @@
|
|||
package game.audio;
|
||||
package client.audio;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import game.audio.jogg.Packet;
|
||||
import game.audio.jogg.Page;
|
||||
import game.audio.jogg.StreamState;
|
||||
import game.audio.jogg.SyncState;
|
||||
import game.audio.jorbis.Block;
|
||||
import game.audio.jorbis.Comment;
|
||||
import game.audio.jorbis.DspState;
|
||||
import game.audio.jorbis.Info;
|
||||
|
||||
import client.audio.jogg.Packet;
|
||||
import client.audio.jogg.Page;
|
||||
import client.audio.jogg.StreamState;
|
||||
import client.audio.jogg.SyncState;
|
||||
import client.audio.jorbis.Block;
|
||||
import client.audio.jorbis.Comment;
|
||||
import client.audio.jorbis.DspState;
|
||||
import client.audio.jorbis.Info;
|
||||
|
||||
public class CodecJOrbis
|
||||
{
|
|
@ -1,19 +1,28 @@
|
|||
package game.audio;
|
||||
package client.audio;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import client.Game;
|
||||
import game.collect.BiMap;
|
||||
import game.collect.HashBiMap;
|
||||
import game.collect.Lists;
|
||||
import game.collect.Maps;
|
||||
|
||||
import game.Game;
|
||||
import game.entity.npc.EntityNPC;
|
||||
import game.init.SoundEvent;
|
||||
import game.log.Log;
|
||||
import game.rng.Random;
|
||||
import game.sound.MovingSound;
|
||||
import game.sound.Sound;
|
||||
import game.util.ExtMath;
|
||||
import game.util.FileUtils;
|
||||
|
||||
public class SoundManager {
|
||||
private class Source {
|
||||
|
@ -67,6 +76,9 @@ public class SoundManager {
|
|||
}
|
||||
}
|
||||
|
||||
private static final Random RANDOM = new Random();
|
||||
private static final Map<SoundEvent, short[][]> BUFFERS = Maps.newEnumMap(SoundEvent.class);
|
||||
|
||||
private final Map<String, Sound> playingSounds = HashBiMap.<String, Sound>create();
|
||||
private final Map<Sound, String> invPlayingSounds = ((BiMap)this.playingSounds).inverse();
|
||||
private final List<MovingSound> tickableSounds = Lists.<MovingSound>newArrayList();
|
||||
|
@ -85,6 +97,46 @@ public class SoundManager {
|
|||
public SoundManager(Game gm) {
|
||||
this.gm = gm;
|
||||
}
|
||||
|
||||
public static void loadSounds() {
|
||||
for(SoundEvent entry : SoundEvent.values()) {
|
||||
short[][] buffers = new short[entry.getSounds().length][];
|
||||
for(int z = 0; z < entry.getSounds().length; z++) {
|
||||
String sound = entry.getSounds()[z];
|
||||
Log.SOUND.trace("Lade Sound %s", sound);
|
||||
buffers[z] = readOgg("sounds/" + sound + ".ogg");
|
||||
}
|
||||
BUFFERS.put(entry, buffers);
|
||||
}
|
||||
}
|
||||
|
||||
private static short[] readOgg(String filename) {
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = new BufferedInputStream(FileUtils.getResource(filename));
|
||||
return CodecJOrbis.readAll(in);
|
||||
}
|
||||
catch(FileNotFoundException e) {
|
||||
Log.IO.error("Fehler beim Lesen von OPUS-Datei '%s': Datei nicht gefunden", filename);
|
||||
return null;
|
||||
}
|
||||
catch(Exception e) {
|
||||
Log.IO.error("Fehler beim Lesen von OPUS-Datei '%s': %s", filename, e.getMessage());
|
||||
return null;
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
if(in != null)
|
||||
in.close();
|
||||
}
|
||||
catch(IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static short[] getBuffer(SoundEvent event) {
|
||||
return RANDOM.pick(BUFFERS.get(event));
|
||||
}
|
||||
|
||||
public void unload()
|
||||
{
|
||||
|
@ -183,7 +235,7 @@ public class SoundManager {
|
|||
if (volume > 0.0F)
|
||||
{
|
||||
String s = String.format("snd-%016x", this.eventId++);
|
||||
this.sources.put(s, new Source(sound.getSoundLocation().getBuffer(), sound.getChannelType(), sound.canRepeat(), s, sound.getXPosF(), sound.getYPosF(), sound.getZPosF(), sound.getAttenuationType(), attn, volume));
|
||||
this.sources.put(s, new Source(getBuffer(sound.getSoundLocation()), Volume.getByType(sound.getChannelType()), sound.canRepeat(), s, sound.getXPosF(), sound.getYPosF(), sound.getZPosF(), sound.getAttenuationType(), attn, volume));
|
||||
this.playingSoundsStopTime.put(s, this.playTime + 20);
|
||||
this.playingSounds.put(s, sound);
|
||||
if (sound instanceof MovingSound)
|
|
@ -1,25 +1,45 @@
|
|||
package game.audio;
|
||||
package client.audio;
|
||||
|
||||
import game.Game;
|
||||
import client.Game;
|
||||
import client.gui.element.Slider;
|
||||
import game.color.TextColor;
|
||||
import game.gui.element.Slider;
|
||||
import game.sound.EventType;
|
||||
import game.vars.CVar;
|
||||
import game.vars.CVarCategory;
|
||||
|
||||
public enum Volume implements CVar {
|
||||
MASTER("master", "Gesamt"),
|
||||
MUSIC("music", "Musik"),
|
||||
SFX("sfx", "Geräusche"),
|
||||
GUI("gui", "Oberfläche");
|
||||
SFX("sfx", "Geräusche", EventType.SOUND_EFFECT),
|
||||
GUI("gui", "Oberfläche", EventType.UI_INTERFACE);
|
||||
|
||||
private static final Volume[] LOOKUP = new Volume[EventType.values().length];
|
||||
|
||||
public final String id;
|
||||
public final String name;
|
||||
public final EventType type;
|
||||
|
||||
private int value = 100;
|
||||
|
||||
private Volume(String id, String name) {
|
||||
private Volume(String id, String name, EventType type) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
private Volume(String id, String name) {
|
||||
this(id, name, null);
|
||||
}
|
||||
|
||||
static {
|
||||
for(Volume volume : values()) {
|
||||
if(volume.type != null)
|
||||
LOOKUP[volume.type.ordinal()] = volume;
|
||||
}
|
||||
}
|
||||
|
||||
public static Volume getByType(EventType type) {
|
||||
return LOOKUP[type.ordinal()];
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jogg;
|
||||
package client.audio.jogg;
|
||||
|
||||
public class Buffer{
|
||||
private static final int BUFFER_INCREMENT=256;
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jogg;
|
||||
package client.audio.jogg;
|
||||
|
||||
public class Packet{
|
||||
public byte[] packet_base;
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jogg;
|
||||
package client.audio.jogg;
|
||||
|
||||
public class Page{
|
||||
private static int[] crc_lookup=new int[256];
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jogg;
|
||||
package client.audio.jogg;
|
||||
|
||||
public class StreamState{
|
||||
byte[] body_data; /* bytes from packet bodies */
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jogg;
|
||||
package client.audio.jogg;
|
||||
|
||||
// DECODING PRIMITIVES: packet streaming layer
|
||||
|
|
@ -24,9 +24,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
import client.audio.jogg.Packet;
|
||||
|
||||
public class Block{
|
||||
///necessary stream state for linking to the framing abstraction
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class ChainingExample{
|
||||
public static void main(String[] arg){
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
class CodeBook{
|
||||
int dim; // codebook dimensions (elements per vector)
|
|
@ -24,9 +24,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
import client.audio.jogg.Packet;
|
||||
|
||||
// the comments are not part of vorbis_info so that vorbis_info can be
|
||||
// static storage
|
|
@ -24,9 +24,12 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Packet;
|
||||
import client.audio.jogg.Page;
|
||||
import client.audio.jogg.StreamState;
|
||||
import client.audio.jogg.SyncState;
|
||||
|
||||
// Takes a vorbis bitstream from stdin and writes raw stereo PCM to
|
||||
// stdout. Decodes simple and chained OggVorbis files from beginning
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class Drft{
|
||||
int n;
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
public class DspState{
|
||||
static final float M_PI=3.1415926539f;
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
class Floor0 extends FuncFloor{
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
class Floor1 extends FuncFloor{
|
||||
static final int floor1_rangedb=140;
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
abstract class FuncFloor{
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
abstract class FuncMapping{
|
||||
public static FuncMapping[] mapping_P= {new Mapping0()};
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
abstract class FuncResidue{
|
||||
public static FuncResidue[] residue_P= {new Residue0(), new Residue1(),
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
abstract class FuncTime{
|
||||
public static FuncTime[] time_P= {new Time0()};
|
|
@ -24,9 +24,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
import client.audio.jogg.Packet;
|
||||
|
||||
public class Info{
|
||||
private static final int OV_EBADPACKET=-136;
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class InfoMode{
|
||||
int blockflag;
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
public class JOrbisException extends Exception{
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class Lookup{
|
||||
static final int COS_LOOKUP_SZ=128;
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class Lpc{
|
||||
// en/decode lookups
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
/*
|
||||
function: LSP (also called LSF) conversion routines
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
class Mapping0 extends FuncMapping{
|
||||
static int seq=0;
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class Mdct{
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
// psychoacoustic setup
|
||||
class PsyInfo{
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class PsyLook{
|
||||
int n;
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
class Residue0 extends FuncResidue{
|
||||
void pack(Object vr, Buffer opb){
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class Residue1 extends Residue0{
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class Residue2 extends Residue0{
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
class StaticCodeBook{
|
||||
int dim; // codebook dimensions (elements per vector)
|
|
@ -24,9 +24,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
import client.audio.jogg.Buffer;
|
||||
|
||||
class Time0 extends FuncTime{
|
||||
void pack(Object i, Buffer opb){
|
|
@ -1,4 +1,4 @@
|
|||
package game.audio.jorbis;
|
||||
package client.audio.jorbis;
|
||||
|
||||
class Util{
|
||||
static int ilog(int v){
|
|
@ -25,13 +25,15 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
package game.audio.jorbis;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import game.audio.jogg.*;
|
||||
package client.audio.jorbis;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import client.audio.jogg.Packet;
|
||||
import client.audio.jogg.Page;
|
||||
import client.audio.jogg.StreamState;
|
||||
import client.audio.jogg.SyncState;
|
||||
|
||||
public class VorbisFile{
|
||||
static final int CHUNKSIZE=8500;
|
|
@ -1,4 +1,4 @@
|
|||
package game.util;
|
||||
package client.gui;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -6,9 +6,9 @@ import java.io.IOException;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.texture.TextureUtil;
|
||||
import game.log.Log;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.texture.TextureUtil;
|
||||
import game.util.FileUtils;
|
||||
|
||||
public class Font {
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
public class FontChar {
|
||||
public final byte s;
|
|
@ -1,6 +1,6 @@
|
|||
package game.util;
|
||||
package client.gui;
|
||||
|
||||
import game.gui.element.Element;
|
||||
import client.gui.element.Element;
|
||||
|
||||
public interface Formatter<T extends Element> {
|
||||
String use(T elem);
|
|
@ -1,21 +1,20 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import client.Game;
|
||||
import client.gui.element.Dropdown;
|
||||
import client.gui.element.Dropdown.Handle;
|
||||
import client.gui.element.Element;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.GlState;
|
||||
import client.window.Bind;
|
||||
import client.window.Button;
|
||||
import client.window.Keysym;
|
||||
import game.collect.Lists;
|
||||
|
||||
import game.Game;
|
||||
import game.gui.element.Dropdown;
|
||||
import game.gui.element.Dropdown.Handle;
|
||||
import game.gui.element.Element;
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.GlState;
|
||||
import game.window.Bind;
|
||||
import game.window.Button;
|
||||
import game.window.Keysym;
|
||||
|
||||
public abstract class Gui {
|
||||
public static final String DIRT_BACKGROUND = "textures/background.png";
|
||||
public static final int HOVER_COLOR = 0x288080ff;
|
|
@ -1,9 +1,9 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Label;
|
||||
import game.gui.element.TransparentBox;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.TransparentBox;
|
||||
|
||||
public class GuiConfirm extends Gui implements ActButton.Callback {
|
||||
public static interface Callback {
|
|
@ -1,19 +1,20 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.GuiList;
|
||||
import client.gui.element.ListEntry;
|
||||
import client.gui.element.NavButton;
|
||||
import client.renderer.Drawing;
|
||||
import game.color.TextColor;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.GuiList;
|
||||
import game.gui.element.ListEntry;
|
||||
import game.gui.element.NavButton;
|
||||
import game.init.Config;
|
||||
import game.log.Log;
|
||||
import game.network.Player;
|
||||
import game.renderer.Drawing;
|
||||
import game.util.FileUtils;
|
||||
import game.util.Tuple;
|
||||
import game.util.Util;
|
|
@ -1,22 +1,21 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import client.Game;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.Fill;
|
||||
import client.gui.element.Textbox;
|
||||
import client.gui.element.Textbox.Action;
|
||||
import client.gui.element.TransparentBox;
|
||||
import client.window.Keysym;
|
||||
import game.collect.Lists;
|
||||
|
||||
import game.Game;
|
||||
import game.color.TextColor;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.Fill;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.element.Textbox.Action;
|
||||
import game.gui.element.TransparentBox;
|
||||
import game.network.Player;
|
||||
import game.packet.CPacketComplete;
|
||||
import game.util.ExtMath;
|
||||
import game.vars.BoolVar;
|
||||
import game.vars.CVar;
|
||||
import game.window.Keysym;
|
||||
import game.world.BlockPos;
|
||||
import game.world.HitPosition;
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import game.Game.FileMode;
|
||||
|
||||
import client.Game.FileMode;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.GuiList;
|
||||
import client.gui.element.ListEntry;
|
||||
import client.gui.element.NavButton;
|
||||
import client.renderer.Drawing;
|
||||
import game.color.TextColor;
|
||||
import game.dimension.Space;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.GuiList;
|
||||
import game.gui.element.ListEntry;
|
||||
import game.gui.element.NavButton;
|
||||
import game.log.Log;
|
||||
import game.renderer.Drawing;
|
||||
import game.util.FileCallback;
|
||||
import game.world.Converter;
|
||||
import game.world.Converter.SaveVersion;
|
||||
import game.world.Region;
|
|
@ -1,8 +1,8 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import client.gui.element.NavButton;
|
||||
import client.gui.element.TransparentBox;
|
||||
import game.color.TextColor;
|
||||
import game.gui.element.NavButton;
|
||||
import game.gui.element.TransparentBox;
|
||||
import game.init.Config;
|
||||
import game.log.Log;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import game.Game;
|
||||
import game.gui.element.Bar;
|
||||
import game.gui.element.Label;
|
||||
import client.Game;
|
||||
import client.gui.element.Bar;
|
||||
import client.gui.element.Label;
|
||||
|
||||
public class GuiLoading extends Gui {
|
||||
public static interface Callback {
|
|
@ -1,21 +1,20 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import client.Timing;
|
||||
import client.gui.character.GuiChar;
|
||||
import client.gui.character.GuiCharacters;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.NavButton;
|
||||
import client.gui.element.Textbox;
|
||||
import client.gui.options.GuiOptions;
|
||||
import client.renderer.Drawing;
|
||||
import client.window.Keysym;
|
||||
import game.color.TextColor;
|
||||
import game.gui.character.GuiChar;
|
||||
import game.gui.character.GuiCharacters;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Label;
|
||||
import game.gui.element.NavButton;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.options.GuiOptions;
|
||||
import game.init.Config;
|
||||
import game.renderer.Drawing;
|
||||
import game.rng.Random;
|
||||
import game.util.ExtMath;
|
||||
import game.util.Splashes;
|
||||
import game.util.Timing;
|
||||
import game.window.Keysym;
|
||||
|
||||
public class GuiMenu extends Gui {
|
||||
public static final GuiMenu INSTANCE = new GuiMenu();
|
|
@ -1,12 +1,12 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import client.gui.GuiConnect.ServerInfo;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.NavButton;
|
||||
import client.gui.element.Textbox;
|
||||
import client.gui.element.Textbox.Action;
|
||||
import game.color.TextColor;
|
||||
import game.gui.GuiConnect.ServerInfo;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.Label;
|
||||
import game.gui.element.NavButton;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.element.Textbox.Action;
|
||||
import game.init.Config;
|
||||
import game.network.Player;
|
||||
import game.vars.CVarCategory;
|
|
@ -1,4 +1,4 @@
|
|||
package game.util;
|
||||
package client.gui;
|
||||
|
||||
public abstract class Splashes {
|
||||
public static final String[] SPLASHES = {
|
|
@ -1,12 +1,12 @@
|
|||
package game.gui;
|
||||
package client.gui;
|
||||
|
||||
import game.properties.IStringSerializable;
|
||||
import game.util.Displayable;
|
||||
import game.util.Identifyable;
|
||||
import game.vars.CVarCategory;
|
||||
import game.vars.Variable;
|
||||
import game.vars.Variable.IntType;
|
||||
|
||||
public enum Style implements IStringSerializable, Displayable {
|
||||
public enum Style implements Identifyable, Displayable {
|
||||
DEFAULT("default", "Standard"), SHINY("shiny", "Glänzend"), GRAY("gray", "Grau"), BLUE("blue", "Blau"), CUSTOM("custom", "Angepasst");
|
||||
|
||||
public final String id;
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.character;
|
||||
package client.gui.character;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
|
@ -8,13 +8,34 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import game.Game;
|
||||
import game.Game.FileMode;
|
||||
import client.Game;
|
||||
import client.Game.FileMode;
|
||||
import client.SkinConverter;
|
||||
import client.gui.FileCallback;
|
||||
import client.gui.GuiLoading;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.Element;
|
||||
import client.gui.element.GuiList;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.ListEntry;
|
||||
import client.gui.element.NavButton;
|
||||
import client.gui.element.Slider;
|
||||
import client.gui.element.Textbox;
|
||||
import client.gui.element.Textbox.Action;
|
||||
import client.gui.element.TransparentBox;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.ItemRenderer;
|
||||
import client.renderer.entity.RenderManager;
|
||||
import client.renderer.texture.EntityTexManager;
|
||||
import client.window.Button;
|
||||
import game.collect.Lists;
|
||||
import game.dimension.DimType;
|
||||
import game.dimension.Dimension;
|
||||
|
@ -24,45 +45,25 @@ import game.entity.npc.EntityHuman;
|
|||
import game.entity.npc.EntityNPC;
|
||||
import game.entity.npc.SpeciesInfo;
|
||||
import game.entity.types.EntityLiving;
|
||||
import game.gui.GuiLoading;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Element;
|
||||
import game.gui.element.GuiList;
|
||||
import game.gui.element.Label;
|
||||
import game.gui.element.ListEntry;
|
||||
import game.gui.element.NavButton;
|
||||
import game.gui.element.Slider;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.element.TransparentBox;
|
||||
import game.gui.element.Textbox.Action;
|
||||
import game.init.EntityEggInfo;
|
||||
import game.init.EntityRegistry;
|
||||
import game.init.SpeciesRegistry;
|
||||
import game.init.UniverseRegistry;
|
||||
import game.init.SpeciesRegistry.ModelType;
|
||||
import game.init.UniverseRegistry;
|
||||
import game.log.Log;
|
||||
import game.network.Player;
|
||||
import game.packet.CPacketAction;
|
||||
import game.packet.CPacketMessage;
|
||||
import game.packet.CPacketSkin;
|
||||
import game.properties.IStringSerializable;
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.ItemRenderer;
|
||||
import game.renderer.entity.RenderManager;
|
||||
import game.renderer.texture.EntityTexManager;
|
||||
import game.rng.Random;
|
||||
import game.util.Displayable;
|
||||
import game.util.FileCallback;
|
||||
import game.util.FileUtils;
|
||||
import game.util.SkinConverter;
|
||||
import game.util.Identifyable;
|
||||
import game.util.Util;
|
||||
import game.vars.CVarCategory;
|
||||
import game.vars.EnumVar;
|
||||
import game.vars.EnumVar.EnumFunction;
|
||||
import game.vars.Variable;
|
||||
import game.window.Button;
|
||||
|
||||
public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
||||
{
|
||||
|
@ -206,7 +207,7 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
|||
}
|
||||
}
|
||||
|
||||
public static enum FilterType implements IStringSerializable, Displayable {
|
||||
public static enum FilterType implements Identifyable, Displayable {
|
||||
ALL("all", "Alle anzeigen"), CUSTOM("custom", "Nur eigene"), NPC("preset", "Nur vorgegebene"), SPECIES("species", "Nur Spezies"), SPECIES_CUSTOM("species_custom", "Spezies und eigene");
|
||||
|
||||
private final String name;
|
|
@ -1,17 +1,17 @@
|
|||
package game.gui.character;
|
||||
package client.gui.character;
|
||||
|
||||
import client.gui.GuiConfirm;
|
||||
import client.gui.GuiMenu;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.GuiList;
|
||||
import client.gui.element.ListEntry;
|
||||
import client.gui.element.NavButton;
|
||||
import client.gui.element.TransparentBox;
|
||||
import client.renderer.Drawing;
|
||||
import game.color.TextColor;
|
||||
import game.entity.npc.PlayerCharacter;
|
||||
import game.gui.GuiConfirm;
|
||||
import game.gui.GuiMenu;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.GuiList;
|
||||
import game.gui.element.ListEntry;
|
||||
import game.gui.element.NavButton;
|
||||
import game.gui.element.TransparentBox;
|
||||
import game.packet.CPacketAction;
|
||||
import game.renderer.Drawing;
|
||||
|
||||
public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> implements ActButton.Callback
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
package game.gui.character;
|
||||
package client.gui.character;
|
||||
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.GuiList;
|
||||
import game.gui.element.ListEntry;
|
||||
import game.gui.element.NavButton;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.GuiList;
|
||||
import client.gui.element.ListEntry;
|
||||
import client.gui.element.NavButton;
|
||||
import client.renderer.Drawing;
|
||||
import game.packet.CPacketAction;
|
||||
import game.renderer.Drawing;
|
||||
|
||||
public class GuiClass extends GuiList<GuiClass.ClassEntry> implements ActButton.Callback
|
||||
{
|
|
@ -1,15 +1,15 @@
|
|||
package game.gui.character;
|
||||
package client.gui.character;
|
||||
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.GuiList;
|
||||
import client.gui.element.ListEntry;
|
||||
import client.gui.element.NavButton;
|
||||
import client.renderer.Drawing;
|
||||
import game.entity.npc.SpeciesInfo;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.GuiList;
|
||||
import game.gui.element.ListEntry;
|
||||
import game.gui.element.NavButton;
|
||||
import game.init.EntityRegistry;
|
||||
import game.init.SpeciesRegistry;
|
||||
import game.packet.CPacketAction;
|
||||
import game.renderer.Drawing;
|
||||
|
||||
public class GuiSpecies extends GuiList<GuiSpecies.SpeciesEntry> implements ActButton.Callback
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.inventory.ContainerBrewingStand;
|
||||
import game.inventory.IInventory;
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.Game;
|
||||
import client.Game;
|
||||
import game.inventory.ContainerChest;
|
||||
import game.inventory.IInventory;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -6,24 +6,23 @@ import java.util.Set;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import client.gui.Gui;
|
||||
import client.gui.element.InventoryButton;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.ItemRenderer;
|
||||
import client.renderer.entity.RenderItem;
|
||||
import client.window.Button;
|
||||
import game.collect.Lists;
|
||||
import game.collect.Sets;
|
||||
|
||||
import game.color.TextColor;
|
||||
import game.gui.Gui;
|
||||
import game.gui.element.InventoryButton;
|
||||
import game.inventory.Container;
|
||||
import game.inventory.InventoryPlayer;
|
||||
import game.inventory.Slot;
|
||||
import game.item.CheatTab;
|
||||
import game.item.ItemStack;
|
||||
import game.packet.CPacketCheat;
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.ItemRenderer;
|
||||
import game.renderer.entity.RenderItem;
|
||||
import game.util.ExtMath;
|
||||
import game.window.Button;
|
||||
|
||||
public abstract class GuiContainer extends Gui
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.inventory.ContainerWorkbench;
|
||||
import game.inventory.InventoryPlayer;
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.inventory.ContainerDispenser;
|
||||
import game.inventory.IInventory;
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.color.TextColor;
|
||||
import game.enchantment.Enchantment;
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.inventory.ContainerFurnace;
|
||||
import game.inventory.IInventory;
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.Game;
|
||||
import client.Game;
|
||||
import game.inventory.ContainerHopper;
|
||||
import game.inventory.IInventory;
|
||||
import game.inventory.InventoryPlayer;
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.Game;
|
||||
import client.Game;
|
||||
import game.entity.animal.EntityHorse;
|
||||
import game.inventory.ContainerHorseInventory;
|
||||
import game.inventory.IInventory;
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.entity.npc.EntityNPC;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import game.Game;
|
||||
import client.Game;
|
||||
import game.inventory.ContainerMachine;
|
||||
import game.inventory.IInventory;
|
||||
import game.inventory.InventoryPlayer;
|
|
@ -1,13 +1,13 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.ItemRenderer;
|
||||
import game.inventory.ContainerMerchant;
|
||||
import game.inventory.InventoryPlayer;
|
||||
import game.item.ItemStack;
|
||||
import game.packet.CPacketAction;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.ItemRenderer;
|
||||
import game.village.MerchantRecipe;
|
||||
import game.village.MerchantRecipeList;
|
||||
import game.world.World;
|
|
@ -1,8 +1,8 @@
|
|||
package game.gui.container;
|
||||
package client.gui.container;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import game.Game;
|
||||
import client.Game;
|
||||
import game.inventory.Container;
|
||||
import game.inventory.ContainerRepair;
|
||||
import game.inventory.ICrafting;
|
|
@ -1,7 +1,7 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.util.Formatter;
|
||||
import game.window.Button;
|
||||
import client.gui.Formatter;
|
||||
import client.window.Button;
|
||||
|
||||
public class ActButton extends Element {
|
||||
public static enum Mode {
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import client.renderer.Drawing;
|
||||
import game.util.ExtMath;
|
||||
import game.util.Util;
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.gui.Font;
|
||||
import game.gui.Gui;
|
||||
import game.renderer.Drawing;
|
||||
import client.gui.Font;
|
||||
import client.gui.Formatter;
|
||||
import client.gui.Gui;
|
||||
import client.renderer.Drawing;
|
||||
import client.window.Button;
|
||||
import game.util.Displayable;
|
||||
import game.util.ExtMath;
|
||||
import game.util.Formatter;
|
||||
import game.util.Util;
|
||||
import game.window.Button;
|
||||
|
||||
public class Dropdown<T> extends Element {
|
||||
public class Handle extends Element {
|
|
@ -1,18 +1,18 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.Game;
|
||||
import game.audio.PositionedSound;
|
||||
import game.audio.Volume;
|
||||
import game.gui.Gui;
|
||||
import client.Game;
|
||||
import client.gui.Formatter;
|
||||
import client.gui.Gui;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.Drawing.Vec2i;
|
||||
import client.window.Button;
|
||||
import client.window.Keysym;
|
||||
import game.init.SoundEvent;
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.Drawing.Vec2i;
|
||||
import game.util.Formatter;
|
||||
import game.sound.EventType;
|
||||
import game.sound.PositionedSound;
|
||||
import game.util.Util;
|
||||
import game.window.Button;
|
||||
import game.window.Keysym;
|
||||
|
||||
public abstract class Element {
|
||||
protected final Game gm = Game.getGame();
|
||||
|
@ -266,6 +266,6 @@ public abstract class Element {
|
|||
}
|
||||
|
||||
public void playSound() {
|
||||
this.gm.getSoundManager().playSound(new PositionedSound(SoundEvent.CLICK, Volume.GUI));
|
||||
this.gm.getSoundManager().playSound(new PositionedSound(SoundEvent.CLICK, EventType.UI_INTERFACE));
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.Drawing.Vec2i;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.Drawing.Vec2i;
|
||||
|
||||
public class Fill extends Element {
|
||||
private final boolean left;
|
|
@ -1,19 +1,18 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import client.gui.Gui;
|
||||
import client.renderer.DefaultVertexFormats;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.RenderBuffer;
|
||||
import client.renderer.Tessellator;
|
||||
import client.window.Button;
|
||||
import game.collect.Lists;
|
||||
|
||||
import game.gui.Gui;
|
||||
import game.renderer.DefaultVertexFormats;
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.GlState;
|
||||
import game.renderer.RenderBuffer;
|
||||
import game.renderer.Tessellator;
|
||||
import game.util.ExtMath;
|
||||
import game.window.Button;
|
||||
|
||||
public abstract class GuiList<T extends ListEntry> extends Gui
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import client.renderer.Drawing;
|
||||
|
||||
public class InventoryButton extends Element {
|
||||
public InventoryButton(int x, int y, int w, int h) {
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import client.renderer.Drawing;
|
||||
import game.util.Util;
|
||||
|
||||
public class Label extends Fill {
|
|
@ -1,4 +1,4 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
public interface ListEntry
|
||||
{
|
|
@ -1,8 +1,8 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.Game;
|
||||
import game.gui.Gui;
|
||||
import game.renderer.Drawing;
|
||||
import client.Game;
|
||||
import client.gui.Gui;
|
||||
import client.renderer.Drawing;
|
||||
import game.util.Util;
|
||||
|
||||
public class NavButton extends ActButton {
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import client.renderer.Drawing;
|
||||
import game.util.Util;
|
||||
|
||||
public class SelectableButton extends ActButton {
|
|
@ -1,10 +1,10 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import client.gui.Formatter;
|
||||
import client.renderer.Drawing;
|
||||
import client.window.Button;
|
||||
import game.util.ExtMath;
|
||||
import game.util.Formatter;
|
||||
import game.util.Util;
|
||||
import game.window.Button;
|
||||
|
||||
public class Slider extends Element {
|
||||
public static interface Callback {
|
|
@ -1,9 +1,9 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import client.gui.Formatter;
|
||||
import client.window.Button;
|
||||
import game.util.Displayable;
|
||||
import game.util.Formatter;
|
||||
import game.util.Util;
|
||||
import game.window.Button;
|
||||
|
||||
public class Switch<T> extends Element {
|
||||
public static interface Callback<T> {
|
|
@ -1,18 +1,18 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import game.gui.Font;
|
||||
import game.renderer.Drawing;
|
||||
import game.renderer.Drawing.Offset;
|
||||
import game.renderer.Drawing.Vec2i;
|
||||
import client.Timing;
|
||||
import client.gui.Font;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.Drawing.Offset;
|
||||
import client.renderer.Drawing.Vec2i;
|
||||
import client.window.Button;
|
||||
import client.window.Keysym;
|
||||
import client.window.Window;
|
||||
import game.util.CharValidator;
|
||||
import game.util.ExtMath;
|
||||
import game.util.Timing;
|
||||
import game.util.Util;
|
||||
import game.window.Button;
|
||||
import game.window.Keysym;
|
||||
import game.window.Window;
|
||||
|
||||
public class Textbox extends Element {
|
||||
public static enum Action {
|
|
@ -1,9 +1,9 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import game.util.Formatter;
|
||||
import client.gui.Formatter;
|
||||
import client.renderer.Drawing;
|
||||
import client.window.Button;
|
||||
import game.util.Util;
|
||||
import game.window.Button;
|
||||
|
||||
public class Toggle extends Element {
|
||||
public static interface Callback {
|
|
@ -1,6 +1,6 @@
|
|||
package game.gui.element;
|
||||
package client.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import client.renderer.Drawing;
|
||||
|
||||
public class TransparentBox extends Textbox {
|
||||
private final boolean background;
|
|
@ -1,10 +1,10 @@
|
|||
package game.gui.ingame;
|
||||
package client.gui.ingame;
|
||||
|
||||
import client.gui.Gui;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.Label;
|
||||
import game.color.TextColor;
|
||||
import game.gui.Gui;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Label;
|
||||
|
||||
public class GuiGameOver extends Gui {
|
||||
public static final GuiGameOver INSTANCE = new GuiGameOver();
|
|
@ -1,9 +1,9 @@
|
|||
package game.gui.ingame;
|
||||
package client.gui.ingame;
|
||||
|
||||
import game.gui.Gui;
|
||||
import game.gui.element.NavButton;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.element.Textbox.Action;
|
||||
import client.gui.Gui;
|
||||
import client.gui.element.NavButton;
|
||||
import client.gui.element.Textbox;
|
||||
import client.gui.element.Textbox.Action;
|
||||
import game.network.ClientPlayer;
|
||||
import game.packet.CPacketSign;
|
||||
import game.world.BlockPos;
|
|
@ -1,11 +1,11 @@
|
|||
package game.gui.options;
|
||||
package client.gui.options;
|
||||
|
||||
import client.gui.Formatter;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.Label;
|
||||
import client.window.Bind;
|
||||
import game.color.TextColor;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Label;
|
||||
import game.util.Formatter;
|
||||
import game.window.Bind;
|
||||
|
||||
public class GuiBinds extends GuiOptions {
|
||||
protected GuiBinds() {
|
|
@ -1,15 +1,15 @@
|
|||
package game.gui.options;
|
||||
package client.gui.options;
|
||||
|
||||
import client.gui.Formatter;
|
||||
import client.gui.element.Dropdown;
|
||||
import client.gui.element.Element;
|
||||
import client.gui.element.Fill;
|
||||
import client.gui.element.Slider;
|
||||
import client.gui.element.Toggle;
|
||||
import client.window.Button;
|
||||
import client.window.DisplayMode;
|
||||
import client.window.Window;
|
||||
import game.color.TextColor;
|
||||
import game.gui.element.Dropdown;
|
||||
import game.gui.element.Element;
|
||||
import game.gui.element.Fill;
|
||||
import game.gui.element.Slider;
|
||||
import game.gui.element.Toggle;
|
||||
import game.util.Formatter;
|
||||
import game.window.Button;
|
||||
import game.window.DisplayMode;
|
||||
import game.window.Window;
|
||||
|
||||
public class GuiDisplay extends GuiOptions {
|
||||
private static final String[] DISTANCES = new String[] {"Gruselig", "Winzig", "Gering", "Normal", "Weit"};
|
|
@ -1,8 +1,8 @@
|
|||
package game.gui.options;
|
||||
package client.gui.options;
|
||||
|
||||
import game.gui.Gui;
|
||||
import game.gui.GuiMenu;
|
||||
import game.gui.element.NavButton;
|
||||
import client.gui.Gui;
|
||||
import client.gui.GuiMenu;
|
||||
import client.gui.element.NavButton;
|
||||
|
||||
public abstract class GuiOptions extends Gui {
|
||||
private static final GuiOptions[] PAGES = {lastPage = new GuiBinds(), new GuiStyle(), new GuiDisplay(), new GuiSound()};
|
|
@ -1,8 +1,8 @@
|
|||
package game.gui.options;
|
||||
package client.gui.options;
|
||||
|
||||
import game.audio.Volume;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import client.audio.Volume;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
|
||||
public class GuiSound extends GuiOptions {
|
||||
protected GuiSound() {
|
|
@ -1,16 +1,16 @@
|
|||
package game.gui.options;
|
||||
package client.gui.options;
|
||||
|
||||
import game.gui.Style;
|
||||
import game.gui.element.ActButton;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Dropdown;
|
||||
import game.gui.element.Element;
|
||||
import game.gui.element.SelectableButton;
|
||||
import game.gui.element.Slider;
|
||||
import game.gui.element.Switch;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.element.Textbox.Action;
|
||||
import game.gui.element.Toggle;
|
||||
import client.gui.Style;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ActButton.Mode;
|
||||
import client.gui.element.Dropdown;
|
||||
import client.gui.element.Element;
|
||||
import client.gui.element.SelectableButton;
|
||||
import client.gui.element.Slider;
|
||||
import client.gui.element.Switch;
|
||||
import client.gui.element.Textbox;
|
||||
import client.gui.element.Textbox.Action;
|
||||
import client.gui.element.Toggle;
|
||||
import game.vars.CVar;
|
||||
import game.vars.ColorVar;
|
||||
|
157
java/src/client/init/EntityRenderRegistry.java
Normal file
157
java/src/client/init/EntityRenderRegistry.java
Normal file
|
@ -0,0 +1,157 @@
|
|||
package client.init;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import client.renderer.entity.Render;
|
||||
import client.renderer.entity.RenderArachnoid;
|
||||
import client.renderer.entity.RenderArrow;
|
||||
import client.renderer.entity.RenderBat;
|
||||
import client.renderer.entity.RenderBlockEntity;
|
||||
import client.renderer.entity.RenderBoat;
|
||||
import client.renderer.entity.RenderBullet;
|
||||
import client.renderer.entity.RenderChicken;
|
||||
import client.renderer.entity.RenderCow;
|
||||
import client.renderer.entity.RenderCrystal;
|
||||
import client.renderer.entity.RenderDie;
|
||||
import client.renderer.entity.RenderDragon;
|
||||
import client.renderer.entity.RenderDynamite;
|
||||
import client.renderer.entity.RenderEntity;
|
||||
import client.renderer.entity.RenderEntityItem;
|
||||
import client.renderer.entity.RenderFallingBlock;
|
||||
import client.renderer.entity.RenderFireball;
|
||||
import client.renderer.entity.RenderFish;
|
||||
import client.renderer.entity.RenderFlyingBox;
|
||||
import client.renderer.entity.RenderHorse;
|
||||
import client.renderer.entity.RenderHumanoid;
|
||||
import client.renderer.entity.RenderItem;
|
||||
import client.renderer.entity.RenderItemEntity;
|
||||
import client.renderer.entity.RenderLeashKnot;
|
||||
import client.renderer.entity.RenderLightning;
|
||||
import client.renderer.entity.RenderManager;
|
||||
import client.renderer.entity.RenderMinecart;
|
||||
import client.renderer.entity.RenderMooshroom;
|
||||
import client.renderer.entity.RenderMouse;
|
||||
import client.renderer.entity.RenderNpc;
|
||||
import client.renderer.entity.RenderOcelot;
|
||||
import client.renderer.entity.RenderPig;
|
||||
import client.renderer.entity.RenderPotion;
|
||||
import client.renderer.entity.RenderRabbit;
|
||||
import client.renderer.entity.RenderSheep;
|
||||
import client.renderer.entity.RenderSlime;
|
||||
import client.renderer.entity.RenderSpaceMarine;
|
||||
import client.renderer.entity.RenderSquid;
|
||||
import client.renderer.entity.RenderTntMinecart;
|
||||
import client.renderer.entity.RenderTntPrimed;
|
||||
import client.renderer.entity.RenderWolf;
|
||||
import client.renderer.entity.RenderXpOrb;
|
||||
import client.renderer.model.ModelChicken;
|
||||
import client.renderer.model.ModelCow;
|
||||
import client.renderer.model.ModelHorse;
|
||||
import client.renderer.model.ModelMouse;
|
||||
import client.renderer.model.ModelOcelot;
|
||||
import client.renderer.model.ModelPig;
|
||||
import client.renderer.model.ModelRabbit;
|
||||
import client.renderer.model.ModelSheep2;
|
||||
import client.renderer.model.ModelSquid;
|
||||
import client.renderer.model.ModelWolf;
|
||||
import game.entity.Entity;
|
||||
import game.entity.animal.EntityBat;
|
||||
import game.entity.animal.EntityChicken;
|
||||
import game.entity.animal.EntityCow;
|
||||
import game.entity.animal.EntityDragon;
|
||||
import game.entity.animal.EntityHorse;
|
||||
import game.entity.animal.EntityMooshroom;
|
||||
import game.entity.animal.EntityMouse;
|
||||
import game.entity.animal.EntityOcelot;
|
||||
import game.entity.animal.EntityPig;
|
||||
import game.entity.animal.EntityRabbit;
|
||||
import game.entity.animal.EntitySheep;
|
||||
import game.entity.animal.EntitySquid;
|
||||
import game.entity.animal.EntityWolf;
|
||||
import game.entity.effect.EntityLightning;
|
||||
import game.entity.item.EntityBoat;
|
||||
import game.entity.item.EntityCart;
|
||||
import game.entity.item.EntityCrystal;
|
||||
import game.entity.item.EntityFalling;
|
||||
import game.entity.item.EntityFireworks;
|
||||
import game.entity.item.EntityItem;
|
||||
import game.entity.item.EntityLeashKnot;
|
||||
import game.entity.item.EntityNuke;
|
||||
import game.entity.item.EntityOrb;
|
||||
import game.entity.item.EntityTnt;
|
||||
import game.entity.item.EntityTntCart;
|
||||
import game.entity.item.EntityXp;
|
||||
import game.entity.item.EntityXpBottle;
|
||||
import game.entity.npc.SpeciesInfo;
|
||||
import game.entity.projectile.EntityArrow;
|
||||
import game.entity.projectile.EntityBox;
|
||||
import game.entity.projectile.EntityBullet;
|
||||
import game.entity.projectile.EntityDie;
|
||||
import game.entity.projectile.EntityDynamite;
|
||||
import game.entity.projectile.EntityEgg;
|
||||
import game.entity.projectile.EntityFireCharge;
|
||||
import game.entity.projectile.EntityFireball;
|
||||
import game.entity.projectile.EntityHook;
|
||||
import game.entity.projectile.EntityPotion;
|
||||
import game.entity.projectile.EntitySnowball;
|
||||
import game.init.Blocks;
|
||||
import game.init.Items;
|
||||
import game.init.SpeciesRegistry;
|
||||
import game.init.SpeciesRegistry.ModelType;
|
||||
|
||||
public class EntityRenderRegistry {
|
||||
public static void registerRenderers(Map<Class<? extends Entity>, Render<? extends Entity>> map,
|
||||
Map<ModelType, RenderNpc> models, RenderManager mgr, RenderItem ritem) {
|
||||
map.put(EntityPig.class, new RenderPig(mgr, new ModelPig()));
|
||||
map.put(EntitySheep.class, new RenderSheep(mgr, new ModelSheep2()));
|
||||
map.put(EntityCow.class, new RenderCow(mgr, new ModelCow()));
|
||||
map.put(EntityMooshroom.class, new RenderMooshroom(mgr, new ModelCow()));
|
||||
map.put(EntityWolf.class, new RenderWolf(mgr, new ModelWolf()));
|
||||
map.put(EntityChicken.class, new RenderChicken(mgr, new ModelChicken()));
|
||||
map.put(EntityOcelot.class, new RenderOcelot(mgr, new ModelOcelot()));
|
||||
map.put(EntityRabbit.class, new RenderRabbit(mgr, new ModelRabbit()));
|
||||
map.put(EntitySquid.class, new RenderSquid(mgr, new ModelSquid()));
|
||||
map.put(EntityBat.class, new RenderBat(mgr));
|
||||
map.put(EntityDragon.class, new RenderDragon(mgr));
|
||||
map.put(EntityCrystal.class, new RenderCrystal(mgr));
|
||||
map.put(Entity.class, new RenderEntity(mgr));
|
||||
// map.put(EntityPainting.class, new RenderPainting(mgr));
|
||||
// map.put(EntityFrame.class, new RenderItemFrame(mgr, ritem));
|
||||
map.put(EntityLeashKnot.class, new RenderLeashKnot(mgr));
|
||||
map.put(EntityArrow.class, new RenderArrow(mgr));
|
||||
map.put(EntitySnowball.class, new RenderItemEntity(mgr, Items.snowball, ritem));
|
||||
map.put(EntityOrb.class, new RenderItemEntity(mgr, Items.charged_orb, ritem));
|
||||
map.put(EntityEgg.class, new RenderItemEntity(mgr, Items.egg, ritem));
|
||||
map.put(EntityPotion.class, new RenderPotion(mgr, ritem));
|
||||
map.put(EntityXpBottle.class, new RenderItemEntity(mgr, Items.experience_bottle, ritem));
|
||||
map.put(EntityFireworks.class, new RenderItemEntity(mgr, Items.fireworks, ritem));
|
||||
map.put(EntityFireball.class, new RenderFireball(mgr, 0.75F));
|
||||
map.put(EntityFireCharge.class, new RenderFireball(mgr, 0.5F));
|
||||
map.put(EntityBox.class, new RenderFlyingBox(mgr));
|
||||
map.put(EntityItem.class, new RenderEntityItem(mgr, ritem));
|
||||
map.put(EntityXp.class, new RenderXpOrb(mgr));
|
||||
map.put(EntityTnt.class, new RenderTntPrimed(mgr));
|
||||
map.put(EntityFalling.class, new RenderFallingBlock(mgr));
|
||||
map.put(EntityTntCart.class, new RenderTntMinecart(mgr));
|
||||
map.put(EntityCart.class, new RenderMinecart(mgr));
|
||||
map.put(EntityBoat.class, new RenderBoat(mgr));
|
||||
map.put(EntityHook.class, new RenderFish(mgr));
|
||||
map.put(EntityHorse.class, new RenderHorse(mgr, new ModelHorse()));
|
||||
map.put(EntityDynamite.class, new RenderDynamite(mgr, Items.dynamite, ritem));
|
||||
map.put(EntityNuke.class, new RenderBlockEntity(mgr, Blocks.nuke.getState()));
|
||||
map.put(EntityMouse.class, new RenderMouse(mgr, new ModelMouse()));
|
||||
map.put(EntityDie.class, new RenderDie(mgr));
|
||||
map.put(EntityBullet.class, new RenderBullet(mgr));
|
||||
map.put(EntityLightning.class, new RenderLightning(mgr));
|
||||
models.put(ModelType.HUMANOID, new RenderHumanoid(mgr, 12, 12, "textures/entity/char.png"));
|
||||
models.put(ModelType.ARACHNOID, new RenderArachnoid(mgr));
|
||||
models.put(ModelType.SLIME, new RenderSlime(mgr));
|
||||
models.put(ModelType.DWARF, new RenderHumanoid(mgr, 10, 10, "textures/entity/dwarf.png"));
|
||||
models.put(ModelType.HALFLING, new RenderHumanoid(mgr, 8, 8, "textures/entity/goblin.png"));
|
||||
models.put(ModelType.SPACE_MARINE, new RenderSpaceMarine(mgr));
|
||||
for(int z = 0; z < SpeciesRegistry.SPECIMEN.size(); z++) {
|
||||
SpeciesInfo info = SpeciesRegistry.SPECIMEN.get(z);
|
||||
map.put(info.clazz, models.get(info.renderer));
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue