Cant controll player and see player as 3rd person
mcenderdragon opened this issue ยท 6 comments
Minecraft Version
1.18.x
Version
1.100.4
Details
This only happens in custom dimensions with custom worldgen. I have no idea what is happening but removing CC:Tweaked fixes the issue and I have only encountered it with CC so far. I have no idea why its only happening in 1 dimension and not any others. vanilla and json dimension with vanilla worldgen work fine.
Logs dot contain anything interesting.
https://gist.github.com/mcenderdragon/20f949d9126fc68cc88ee35a12b2ee04
https://gist.github.com/mcenderdragon/d510ab900969346e9864583de1036db1
also debugging and stepping trough everything hasnt showed anything usefull.
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;
}
}
}
}
for some reasons this breaks when CC:tweaked is installed
I managed to isolate this further I think - i only happens in combination with registered planets (when I reigster them)