fix unneccesary debug classes
This commit is contained in:
parent
5534531416
commit
493230c4a6
7 changed files with 30 additions and 389 deletions
|
@ -54,6 +54,7 @@ import client.gui.element.Area;
|
|||
import client.gui.ingame.GuiGameOver;
|
||||
import client.network.ClientLoginHandler;
|
||||
import client.network.ClientPlayer;
|
||||
import client.network.DummyConnection;
|
||||
import client.renderer.BlockRenderer;
|
||||
import client.renderer.Drawing;
|
||||
import client.renderer.EntityRenderer;
|
||||
|
@ -106,9 +107,11 @@ import common.block.Block;
|
|||
import common.collect.Lists;
|
||||
import common.collect.Maps;
|
||||
import common.color.TextColor;
|
||||
import common.dimension.Space;
|
||||
import common.entity.Entity;
|
||||
import common.entity.animal.EntityHorse;
|
||||
import common.entity.npc.Energy;
|
||||
import common.entity.npc.EntityCpu;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.npc.PlayerCharacter;
|
||||
import common.entity.types.EntityLiving;
|
||||
|
@ -297,7 +300,7 @@ public class Client implements IThreadListener {
|
|||
public boolean jump;
|
||||
public boolean sneak;
|
||||
public boolean debugCamEnable;
|
||||
public boolean noResolve;
|
||||
public boolean debugWorld;
|
||||
public boolean zooming;
|
||||
public boolean sprint;
|
||||
public boolean renderOutlines;
|
||||
|
@ -577,11 +580,29 @@ public class Client implements IThreadListener {
|
|||
}, "Server connector").start();
|
||||
}
|
||||
|
||||
public void joinDebugWorld() {
|
||||
ClientPlayer player = new ClientPlayer(this, new DummyConnection());
|
||||
this.debugWorld = true;
|
||||
this.charEditor = false;
|
||||
this.controller = new PlayerController(this, player);
|
||||
WorldClient world = new WorldClient(this, Space.INSTANCE);
|
||||
this.loadWorld(world, EntityRegistry.getEntityID(EntityCpu.class));
|
||||
this.player.setId(0);
|
||||
this.displayGuiScreen(null);
|
||||
this.player.flying = true;
|
||||
this.player.noclip = true;
|
||||
this.player.addEffect(new PotionEffect(Potion.FLYING, Integer.MAX_VALUE, 1));
|
||||
this.player.setHeight(2.0f);
|
||||
world.setGravity(this.gravity = 1.0f);
|
||||
world.setTimeFactor(this.timeFactor = 1);
|
||||
this.dayCycle = true;
|
||||
}
|
||||
|
||||
public void unloadWorld() {
|
||||
ClientPlayer netHandler = this.getNetHandler();
|
||||
if(netHandler != null)
|
||||
netHandler.cleanup();
|
||||
this.noResolve = false;
|
||||
this.debugWorld = false;
|
||||
this.charEditor = false;
|
||||
this.viewEntity = null;
|
||||
this.connection = null;
|
||||
|
@ -1891,7 +1912,7 @@ public class Client implements IThreadListener {
|
|||
BlockPos pos = this.pointed.block;
|
||||
State block = this.world.getState(pos);
|
||||
|
||||
if(!this.noResolve) {
|
||||
if(!this.debugWorld) {
|
||||
block = block.getBlock().getActualState(block, this.world, pos);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue