Jump to content

Recommended Posts

Posted

Just started a test server with a friend, put my mod on it and there's a problem with the blocks and items, namely they aren't recognized by the server. Trying to pull them from the creative tabs caused the player to be booted (with this error showing on the server), Trying the "/give" command returned "no such item".

 

I'm assuming that this is because they haven't been created on the server, or something, soooo... Help plz (all code on github, link in signature, if you need directing to any specific classes which you can't find, just ask)

 

Thanks in advance.

Posted

The most common cause of that issue would be id mismatch between client/server, or the mod not being present on the server.

 

the source points to

ItemStack.java:

public int getItemDamage()

    {

        return this.getItem().getItemDamageFromStack(this);

    }

 

as being the cause of the issue.  (likely caused by a null Item reference in the ItemStack)

 

In a few recent Forge releases there were some issues with calling getItemDamage() causing NPE when called with certain items (i don't remember the exact circumstances though...) -- so if neither of the first problems is your issue, you might try updating the Forge/FML on both your client(s) and server.

Posted

On another note, error appears to be a packet handling issue, which is strange because you have a packet handler....but its strange cuz i can't find a regular block id for what is in your creative tab....

I took over Hunting Traps Mod and work on helping the forge community as much as I can. View my work here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1443756-1-7-2-1-6-4-1-5-2-1-4-7-hunting-traps-mod-v-0-4-0

Posted

Yeah, I thought it was a server client disparity, wasn't too sure. As for forge we were using the latest available version. I will double check that my friend installed it properly on the server, but still a bit confused by it.

 

I think the packet handling is vanilla, not something I've caused (as far as I can tell). I think it was because the server can't find a block/item at that ID to send to the client (client requests it from inventory then server sends as packet)

 

Still not sure what caused it but I will bug him when he's next online  :-\

Posted

hard code a default id into your mod then make the config read the hard code.

 

unless someone has changed their ids that might fix your error. it all depends on the root of your issue that is not evident on the crash log.

I took over Hunting Traps Mod and work on helping the forge community as much as I can. View my work here: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1443756-1-7-2-1-6-4-1-5-2-1-4-7-hunting-traps-mod-v-0-4-0

Posted

no apparently the server config is identical :/

 

also it's beyond the point where i can tweak things in that release without removing loads of code, so I think i'll just leave it for now. Thanks anyway.

 

Also there are hard coded id's (the default ids increment from 700)

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • You would have better results asking a more specific question. What have you done? What exactly do you need help with? Please also read the FAQ regarding posting logs.
    • Hi, this is my second post with the same content as no one answered this and it's been a long time since I made the last post, I want to make a client-only mod, everything is ok, but when I use shaders, none of the textures rendered in RenderLevelStageEvent nor the crow entity model are rendered, I want them to be visible, because it's a horror themed mod I've already tried it with different shaders, but it didn't work with any of them and I really want to add support for shaders Here is how i render the crow model in the CrowEntityRenderer<CrowEntity>, by the time i use this method, i know is not the right method but i don't think this is the cause of the problem, the renderType i'm using is entityCutout @Override public void render(CrowEntity p_entity, float entityYaw, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { super.render(p_entity, entityYaw, partialTick, poseStack, bufferSource, packedLight); ClientEventHandler.getClient().crow.renderToBuffer(poseStack, bufferSource.getBuffer(ClientEventHandler.getClient().crow .renderType(TEXTURE)), packedLight, OverlayTexture.NO_OVERLAY, Utils.rgb(255, 255, 255)); } Here renderLevelStage @Override public void renderWorld(RenderLevelStageEvent e) { horrorEvents.draw(e); } Here is how i render every event public void draw(RenderLevelStageEvent e) { for (HorrorEvent event : currentHorrorEvents) { event.tick(e.getPartialTick()); event.draw(e); } } Here is how i render the crow model on the event @Override public void draw(RenderLevelStageEvent e) { if(e.getStage() == RenderLevelStageEvent.Stage.AFTER_ENTITIES) { float arcProgress = getArcProgress(0.25f); int alpha = (int) Mth.lerp(arcProgress, 0, 255); int packedLight = LevelRenderer.getLightColor(Minecraft.getInstance().level, blockPos); VertexConsumer builder = ClientEventHandler.bufferSource.getBuffer(crow); Crow<CreepyBirdHorrorEvent> model = ClientEventHandler .getClient().crow; model.setupAnim(this); RenderHelper.renderModelInWorld(model, position, offset, e.getCamera(), e.getPoseStack(), builder, packedLight, OverlayTexture.NO_OVERLAY, alpha); builder = ClientEventHandler.bufferSource.getBuffer(eyes); RenderHelper.renderModelInWorld(model, position, offset, e.getCamera(), e.getPoseStack(), builder, 15728880, OverlayTexture.NO_OVERLAY, alpha); } } How i render the model public static void renderModelInWorld(Model model, Vector3f pos, Vector3f offset, Camera camera, PoseStack matrix, VertexConsumer builder, int light, int overlay, int alpha) { matrix.pushPose(); Vec3 cameraPos = camera.getPosition(); double finalX = pos.x - cameraPos.x + offset.x; double finalY = pos.y - cameraPos.y + offset.y; double finalZ = pos.z - cameraPos.z + offset.z; matrix.pushPose(); matrix.translate(finalX, finalY, finalZ); matrix.mulPose(Axis.XP.rotationDegrees(180f)); model.renderToBuffer(matrix, builder, light, overlay, Utils .rgba(255, 255, 255, alpha)); matrix.popPose(); matrix.popPose(); } Thanks in advance
    • Same issue - I have no idea
    • I am trying to develop a modpack for me and my friends to use on our server. Does anyone know how to develop a modpack for a server or could they help take a look at my modpack to potentially help at all?
    • un server de armas realista.  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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