change mob spawners

This commit is contained in:
Sen 2025-06-16 17:58:55 +02:00
parent 9e5ca9dd95
commit d45a1a8c4a
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
22 changed files with 190 additions and 459 deletions

View file

@ -27,6 +27,6 @@ public class GuiTile extends GuiContainer
this.drawString(this.tile.getStatus().color + this.tileInv.getCommandName() + " - " + this.tile.getStatus().name, 8, 6);
this.drawString(this.playerInv.getCommandName(), 8, this.ySize - 96 + 2);
this.drawString(String.format("Temperatur: %d °", this.tile.getTemperature()), 8, 18);
this.drawString(this.tile.formatDisplay(), 8, 28);
this.drawString(this.tile.formatDisplay((ContainerTile)this.inventorySlots), 8, 28);
}
}

View file

@ -168,8 +168,8 @@ public class ClientLoginHandler implements IClientLoginHandler {
this.connection.closeChannel("Der Server unterstützt keine der vorhandenen\nAuthentifizierungsmethoden\n\nUnterstützt vom Server: " +
(!passwordAuth && !pubkeyAuth ? "Keine" : ((passwordAuth ? "Passwort" : "") + (passwordAuth && pubkeyAuth ? " und " : "") + (pubkeyAuth ? "Pubkey" : ""))) +
"\n\nVorhanden in Konfiguration für '" + this.server.getName() + "': " + (this.server.getPassword().isEmpty() && this.server.getKeypair() == null ? "Keine" :
((this.server.getPassword().isEmpty() ? "Passwort" : "") +
(this.server.getPassword().isEmpty() && this.server.getKeypair() != null ? " und " : "") + (this.server.getKeypair() != null ? "Pubkey" : ""))));
((!this.server.getPassword().isEmpty() ? "Passwort" : "") +
(!this.server.getPassword().isEmpty() && this.server.getKeypair() != null ? " und " : "") + (this.server.getKeypair() != null ? "Pubkey" : ""))));
return;
}
if(auth && pubkeyAuth && this.server.getKeypair() != null) {

View file

@ -1,38 +0,0 @@
package client.renderer.tileentity;
import org.lwjgl.opengl.GL11;
import client.Client;
import common.entity.Entity;
import common.tileentity.TileEntityMobSpawner;
public class TileEntityMobSpawnerRenderer extends TileEntitySpecialRenderer<TileEntityMobSpawner>
{
public void renderTileEntityAt(TileEntityMobSpawner te, double x, double y, double z, float partialTicks, int destroyStage)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)x + 0.5F, (float)y, (float)z + 0.5F);
renderMob(te, x, y, z, partialTicks);
GL11.glPopMatrix();
}
/**
* Render the mob inside the mob spawner.
*/
public static void renderMob(TileEntityMobSpawner mobSpawnerLogic, double posX, double posY, double posZ, float partialTicks)
{
Entity entity = mobSpawnerLogic.createRenderEntity(mobSpawnerLogic.getWorld());
if (entity != null)
{
float f = 0.4375F;
GL11.glTranslatef(0.0F, 0.4F, 0.0F);
GL11.glRotatef((float)(mobSpawnerLogic.getPrevMobRotation() + (mobSpawnerLogic.getMobRotation() - mobSpawnerLogic.getPrevMobRotation()) * (double)partialTicks) * 10.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
GL11.glScalef(f, f, f);
entity.setLocationAndAngles(posX, posY, posZ, 0.0F, 0.0F);
Client.CLIENT.getRenderManager().renderEntity(entity, 0.0D, 0.0D, 0.0D, partialTicks);
}
}
}

View file

@ -11,7 +11,6 @@ import common.entity.Entity;
import common.tileentity.TileEntity;
import common.tileentity.TileEntityBanner;
import common.tileentity.TileEntityChest;
import common.tileentity.TileEntityMobSpawner;
import common.tileentity.TileEntityPiston;
import common.tileentity.TileEntitySign;
import common.util.BlockPos;
@ -47,7 +46,6 @@ public class TileEntityRendererDispatcher
private TileEntityRendererDispatcher()
{
this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());

View file

@ -695,18 +695,6 @@ public class WorldClient extends AWorldClient
this.playSoundAtPos(blockPosIn, SoundEvent.GLASS, 1.0F);
break;
case 2004:
for (int k = 0; k < 20; ++k)
{
double d3 = (double)blockPosIn.getX() + 0.5D + ((double)this.rand.floatv() - 0.5D) * 2.0D;
double d5 = (double)blockPosIn.getY() + 0.5D + ((double)this.rand.floatv() - 0.5D) * 2.0D;
double d7 = (double)blockPosIn.getZ() + 0.5D + ((double)this.rand.floatv() - 0.5D) * 2.0D;
this.spawnParticle(ParticleType.SMOKE_NORMAL, d3, d5, d7, 0.0D, 0.0D, 0.0D);
this.spawnParticle(ParticleType.FLAME, d3, d5, d7, 0.0D, 0.0D, 0.0D);
}
return;
case 2005:
ItemDye.spawnBonemealParticles(this, blockPosIn, data);
}