Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I am currently working on a mod which needs to use the special renderer, but I am having a few issues.

For a start, the WorldRenderer class doesn't have the begin(); method that is required, I am also unable to add arguments for the TileEntity (extends TileEntitySpecialRenderer<TileEntity....>, I can't add <TileEntity....>) to the special renderer class (although this may not be an issue), and when loading a world, I get the following error:

 

Details:

Tag name: BlockLight

Tag type: 7

Stacktrace:

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.NBTTagList.read(NBTTagList.java:62)

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.CompressedStreamTools.func_152455_a(CompressedStreamTools.java:143)

at net.minecraft.nbt.CompressedStreamTools.func_152456_a(CompressedStreamTools.java:98)

at net.minecraft.nbt.CompressedStreamTools.read(CompressedStreamTools.java:93)

at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadChunk__Async(AnvilChunkLoader.java:121)

at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:20)

at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:12)

at net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:343)

at net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302)

at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:133)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:108)

at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:343)

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:113)

at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:130)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:500)

at java.lang.Thread.run(Unknown Source)

 

 

I believe that the renderer class is causing this because that is all that I have changed since last loading the game properly. The code I am using is:

 

 

public class LaptopRenderer extends TileEntitySpecialRenderer

{

private Minecraft mc = Minecraft.getMinecraft();

 

@Override

public void renderTileEntityAt(TileEntity te, double x, double z, double y, float p_180535_8_, int p_180535_9_)

{

IBlockState state = ComputerBlocks.laptop.getDefaultState().withProperty(BlockLaptop.TYPE, BlockLaptop.Type.SCREEN);

BlockPos pos = te.getPos();

 

bindTexture(TextureMap.locationBlocksTexture);

GlStateManager.pushMatrix();

{

GlStateManager.translate(x, y, z);

GlStateManager.translate(0.5, 0.5, 0.5);

GlStateManager.translate(-0.5, 0, -0.5);

 

GlStateManager.disableLighting();

 

Tessellator tessellator = Tessellator.getInstance();

WorldRenderer renderer = tessellator.getWorldRenderer();

//renderer.begin(7, renderer.getVertexFormat());

renderer.setTranslation(-pos.getX(), -pos.getY(), -pos.getZ());

 

BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();

IBakedModel ibakedmodel = mc.getBlockRendererDispatcher().getBlockModelShapes().getModelForState(state);

blockrendererdispatcher.getBlockModelRenderer().renderModel(getWorld(), ibakedmodel, state, pos, renderer, false);

 

renderer.setTranslation(0.0D, 0.0D, 0.0D);

tessellator.draw();

GlStateManager.enableLighting();

}

GlStateManager.popMatrix();

}

 

}

 

 

The renderer.begin(); is commented out because it gives the error: " The method begin(int, VertexFormat) is undefined for the type WorldRenderer "

 

It would be great if someone could help because I have spent a long time on this mod and I don't want to have to abandon it, having already spent a very long time searching for answers within the code and documentation on the internet.

All mod code here: https://github.com/TheXnator/TheXnatorsMods/tree/master/ComputerMod1.8.9/src/main/java/thexnator/computermod

  • Author

I have done what I believe you meant for me to do, but I am still getting this error when I try to load a world:

 

Description: Loading NBT data

 

java.io.EOFException: Unexpected end of ZLIB input stream

at java.util.zip.InflaterInputStream.fill(Unknown Source)

at java.util.zip.InflaterInputStream.read(Unknown Source)

at java.io.BufferedInputStream.fill(Unknown Source)

at java.io.BufferedInputStream.read1(Unknown Source)

at java.io.BufferedInputStream.read(Unknown Source)

at java.io.DataInputStream.readFully(Unknown Source)

at java.io.DataInputStream.readFully(Unknown Source)

at net.minecraft.nbt.NBTTagByteArray.read(NBTTagByteArray.java:36)

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.NBTTagList.read(NBTTagList.java:62)

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.CompressedStreamTools.func_152455_a(CompressedStreamTools.java:143)

at net.minecraft.nbt.CompressedStreamTools.func_152456_a(CompressedStreamTools.java:98)

at net.minecraft.nbt.CompressedStreamTools.read(CompressedStreamTools.java:93)

at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadChunk__Async(AnvilChunkLoader.java:121)

at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:20)

at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:12)

at net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:343)

at net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302)

at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:133)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:108)

at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:343)

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:113)

at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:130)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:500)

at java.lang.Thread.run(Unknown Source)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at java.util.zip.InflaterInputStream.fill(Unknown Source)

at java.util.zip.InflaterInputStream.read(Unknown Source)

at java.io.BufferedInputStream.fill(Unknown Source)

at java.io.BufferedInputStream.read1(Unknown Source)

at java.io.BufferedInputStream.read(Unknown Source)

at java.io.DataInputStream.readFully(Unknown Source)

at java.io.DataInputStream.readFully(Unknown Source)

at net.minecraft.nbt.NBTTagByteArray.read(NBTTagByteArray.java:36)

 

-- NBT Tag --

Details:

Tag name: BlockLight

Tag type: 7

Stacktrace:

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.NBTTagList.read(NBTTagList.java:62)

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.NBTTagCompound.readNBT(NBTTagCompound.java:517)

at net.minecraft.nbt.NBTTagCompound.read(NBTTagCompound.java:56)

at net.minecraft.nbt.CompressedStreamTools.func_152455_a(CompressedStreamTools.java:143)

at net.minecraft.nbt.CompressedStreamTools.func_152456_a(CompressedStreamTools.java:98)

at net.minecraft.nbt.CompressedStreamTools.read(CompressedStreamTools.java:93)

at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadChunk__Async(AnvilChunkLoader.java:121)

at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:20)

at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:12)

at net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:343)

at net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302)

at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:133)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:108)

at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:343)

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:113)

at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:130)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:500)

at java.lang.Thread.run(Unknown Source)

 

 

EDIT: It works when I create a new world, but when I place the block that I am trying to render, it doesn't work properly, only rendering the screen and not the base.

 

If you want to see the code it is all herehttps://github.com/TheXnator/TheXnatorsMods/tree/master/ComputerMod1.8.9/src/main/java/thexnator/computermod

  • Author

Turns out I was just being an idiot, and for some reason when I made the workspace it used the 1.8 forgesrc files rather than 1.8.9

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.