Jump to content

Wehavecookies56

Members
  • Posts

    33
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    United Kingdom
  • Personal Text
    Kingdom Keys Dev

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Wehavecookies56's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So if I use a custom Ingredient class I should be able to fix this, thanks!
  2. So in my mod I have a bunch of materials that are all the same item but with different NBT data which means in order to use them as ingredients in recipes I need to use the type minecraft:item_nbt or make a IngredientFactory, both methods cause the same issues I that I will explain after this. So here is my recipe json file first of all { "type": "forge:ore_shapeless", "ingredients": [ { "type": "minecraft:item_nbt", "item": "kk:synthesismaterial", "nbt": { "material": "sm.mythrilcrystal", "rank": "sm.rank.s" } }, { "type": "forge:ore_dict", "ore": "gemDiamond" } ], "result": { "item": "kk:mythrilinfuseddiamond" } } So as you can see it's a shapeless recipe that uses a diamond and the material from my mod with some NBT tags.The NBT sensitive ingredient works or at least appears to work fine. Now the first problem is that when using the recipe book, the diamond is placed into the crafting grid but not the material from my mod however, it will not show as craft able if you don't have the material. Only really a minor problem. A major problem I have is that the recipe will only work if my mod material is placed in the grid with a stack size of 1. As you can see in the image below the recipe works However if the stack size is greater than 1 when placed in the grid it will not work It will work though if I increase the stack size afterwards like so But after I take the result out this happens And if the stack size of the diamond is greater than 1 as well as the material from my mod the same thing happens with both If the material from my mod has a stack size of 1 but the diamonds have a stack size greater than 1 it will take 1 diamond and work as intended. So this is quite a major issue as it allows for easy duplication. I'm have no clue what's causing this but I think it's something I need to do to fix it rather than a forge/vanilla issue as I haven't seen anyone else have this issue. Any help is appreciated, thanks.
  3. Now that you mention where it's been registered... It's all my fault just checked again where I had it registered and well it was registered in both the init and postInit, now it makes sense why it was firing twice So no problem here everything is working fine
  4. So am I right in saying that ClientTickEvent should fire twice each tick? 1 for the start phase and 1 for the end phase. Since I have found that it fires twice per phase each tick, I simply made it print the phase and I get this: [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: START [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: START [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: END [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: END [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: START [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: START [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: END [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: END [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: START [11:33:11] [main/INFO] [STDOUT]: [uk.co.wehavecookies56.kk.client.core.handler.ClientEventHandler:onClientTick:26]: START Here's my event handler code: @SubscribeEvent public void onClientTick(TickEvent.ClientTickEvent event) { System.out.println(event.phase); } This means that even after checking for a phase everything is run twice in the same tick. Which seemingly I can't prevent as any checks to prevent things from running a second time do not work as they happen at the same time. If I am wrong about how the event works and that it firing twice per phase is how it is supposed to work how should I prevent code being run twice in the end or start phase?
  5. Here it is, just happened again [21:18:25] [Netty Server IO #7/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected] [21:18:25] [Netty Local Client IO #3/ERROR] [FML]: HandshakeMessageHandler exception java.lang.ClassCastException: net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ServerHello cannot be cast to net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ModList at net.minecraftforge.fml.common.network.handshake.FMLHandshakeClientState$3.accept(FMLHandshakeClientState.java:99) ~[FMLHandshakeClientState$3.class:?] at net.minecraftforge.fml.common.network.handshake.FMLHandshakeClientState$3.accept(FMLHandshakeClientState.java:94) ~[FMLHandshakeClientState$3.class:?] at net.minecraftforge.fml.common.network.handshake.HandshakeMessageHandler.channelRead0(HandshakeMessageHandler.java:48) ~[HandshakeMessageHandler.class:?] at net.minecraftforge.fml.common.network.handshake.HandshakeMessageHandler.channelRead0(HandshakeMessageHandler.java:30) ~[HandshakeMessageHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [MessageToMessageDecoder.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:53) [ChannelRegistrationHandler.class:?] at net.minecraftforge.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:36) [ChannelRegistrationHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:274) [EmbeddedChannel.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:390) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:274) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:74) [NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:443) [LocalChannel.class:4.1.9.Final] at io.netty.channel.local.LocalChannel.access$500(LocalChannel.java:49) [LocalChannel.class:4.1.9.Final] at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:397) [LocalChannel$5.class:4.1.9.Final] at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) [DefaultEventLoop.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112] [21:18:25] [Netty Local Client IO #3/ERROR] [FML]: NetworkDispatcher exception java.lang.ClassCastException: net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ServerHello cannot be cast to net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage$ModList at net.minecraftforge.fml.common.network.handshake.FMLHandshakeClientState$3.accept(FMLHandshakeClientState.java:99) ~[FMLHandshakeClientState$3.class:?] at net.minecraftforge.fml.common.network.handshake.FMLHandshakeClientState$3.accept(FMLHandshakeClientState.java:94) ~[FMLHandshakeClientState$3.class:?] at net.minecraftforge.fml.common.network.handshake.HandshakeMessageHandler.channelRead0(HandshakeMessageHandler.java:48) ~[HandshakeMessageHandler.class:?] at net.minecraftforge.fml.common.network.handshake.HandshakeMessageHandler.channelRead0(HandshakeMessageHandler.java:30) ~[HandshakeMessageHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[MessageToMessageDecoder.class:4.1.9.Final] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:53) ~[ChannelRegistrationHandler.class:?] at net.minecraftforge.fml.common.network.handshake.ChannelRegistrationHandler.channelRead0(ChannelRegistrationHandler.java:36) ~[ChannelRegistrationHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) ~[DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) ~[DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:274) ~[EmbeddedChannel.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:390) ~[NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:274) ~[NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:74) ~[NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:443) [LocalChannel.class:4.1.9.Final] at io.netty.channel.local.LocalChannel.access$500(LocalChannel.java:49) [LocalChannel.class:4.1.9.Final] at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:397) [LocalChannel$5.class:4.1.9.Final] at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) [DefaultEventLoop.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
  6. This is still happening for me on 14.21.1.2443
  7. I tried doing that, the problem is getting it perfectly aligned with the player. I have some really bad memories associated with aligning models with players... I was rendering a .obj model as a sword and I just to keep on trying with different numbers and then restart minecraft, till I found the perfect match. It was a painstaking process that took a long time. Then after I finished spending hours on trying to align it, I found out that in debugging mode, it will change it without you having to restart minecraft. So, just run it in debug mode and try looking for the perfect numbers, till its aligned with the player. But even if I do this it does not rotate with the player so it would be misaligned as soon as I move.
  8. I tried doing that, the problem is getting it perfectly aligned with the player.
  9. While that kinda would solve that, the legs are rendered above the body which suggests it is rendering the models upside down.
  10. I'm making a set of armour that isn't a set of items so you don't put anything in the armour slots in your inventory.
  11. Hello, I am trying to render a model over the player similar to armour but cannot align the position of the models with the player. I have been using ModelBiped but would much rather be able to use the armour model. I cannot figure out how to render it in the same position as the player while also rotating it with the player. What I ultimately want to achieve is to render armour on the player with my textures while keeping the player rendered underneath. So I have 2 questions. How can I align the model with the player? How can I render the armour model rather than player model? I am using PlayerRenderEvent.Post to render it, here's the code. @SubscribeEvent public void onRenderPlayer(RenderPlayerEvent.Post event){ Minecraft mc = Minecraft.getMinecraft(); ModelBiped main = event.renderer.getMainModel(); ModelBiped drive = new ModelBiped(); float base = 0.0625f; GL11.glPushMatrix(); mc.renderEngine.bindTexture(new ResourceLocation("kk:textures/armour/Valor_A.png")); //Body and arms ModelBiped.copyModelAngles(main.bipedBody, drive.bipedBody); ModelBiped.copyModelAngles(main.bipedLeftArm, drive.bipedLeftArm); ModelBiped.copyModelAngles(main.bipedRightArm, drive.bipedRightArm); drive.bipedBody.render(base); drive.bipedLeftArm.render(base); drive.bipedRightArm.render(base); //Legs mc.renderEngine.bindTexture(new ResourceLocation("kk:textures/armour/Valor_B.png")); ModelBiped.copyModelAngles(main.bipedLeftLeg, drive.bipedLeftLeg); ModelBiped.copyModelAngles(main.bipedRightLeg, drive.bipedRightLeg); drive.bipedLeftLeg.render(base); drive.bipedRightLeg.render(base); GL11.glPopMatrix(); } This produces: It looks fine it's just upside down and doesn't rotate with the player. Although the arms and legs move when walking. I'm clearly doing something wrong or have missed out something. Any help is appreciated, thanks.
  12. That's probably because your rendering class is never being called. It's called when your custom entity item is spawned, and you haven't done that yet. Your entity class and rendering class looks good, you just need to subscribe to the EntityJoinWorldEvent and spawn your custom entity item there. EDIT: Not sure if the custom entity item is assigned to your item by overriding item methods like you did above. If you don't get that working, I would try the suggestion above. The entity is spawning fine, I checked that by making it print stuff. Item#createEntity handles the spawning so there is no need to use EntityJoinWorldEvent unless you are changing the entity of a vanilla item like Ernio stated. Although the custom entity spawns fine the render class doesn't seem to work at all.
×
×
  • Create New...

Important Information

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