In Asteroid Belt you cant controll the player
mcenderdragon opened this issue ยท 2 comments
in Asteroid_belt you ant contro the player and see the player as if it was anothe rplayer form a multiplayer server. Clicking craches it (as you attack yourself)
caused by the planet json
{
"texture": "futurepack:textures/gui/asteroid_belt.png",
"name": "Asteroid Belt",
"upgrades": ["lifesupport", "thrusters.maneuver"],
"breathable_atmosphere": false,
"oxygen_spread_velocity": 5.5
}
so most likely "breathable_atmosphere": false,
sicne menelaus has not that problem
this code does this
@SubscribeEvent
public void airOverlayPre(RenderGameOverlayEvent.PreLayer event)
{
//FIXME: there is now a IIngameOverlay for this
if(event.getOverlay() == ForgeIngameGui.AIR_LEVEL_ELEMENT)
{
Minecraft mc = Minecraft.getInstance();
if(!AtmosphereManager.hasWorldOxygen(mc.level))
{
Entity e = mc.getCameraEntity();
if(mc.player == e)
{
//Minecraft.getInstance().setCameraEntity(new FakePlayerSP(mc.player));
}
}
}
}
@SubscribeEvent
public void airOverlayPost(RenderGameOverlayEvent.PreLayer event)
{
if(event.getOverlay() == ForgeIngameGui.AIR_LEVEL_ELEMENT)
{
Minecraft mc = Minecraft.getInstance();
if(!AtmosphereManager.hasWorldOxygen(mc.level))
{
if(mc.getCameraEntity().getClass()==FakePlayerSP.class)
{
//Minecraft.getInstance().setCameraEntity(mc.player);
}
}
if(System.currentTimeMillis() - lastUpdate < 2000)
{
int guiX=0, guiY=0;
guiX = Minecraft.getInstance().getWindow().getGuiScaledWidth()/2;
guiY = Minecraft.getInstance().getWindow().getGuiScaledHeight()-59;
int tank = Math.round(20 * tankFill);
for(int i=0;i<10;i++)
{
int id = tank >= 2 ? 30 : tank >= 1 ? 31 : 32;
HelperComponent.renderSymbol(event.getMatrixStack(), guiX + 83 -8 * (i), guiY, 0, id);//id 30-32
tank -= 2;
}
}
}
}
only happens witch computer craft cc-tweaked/CC-Tweaked#1079