Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.15.2]Why am I getting this error?
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
LeiteDesnatado

[1.15.2]Why am I getting this error?

By LeiteDesnatado, November 18, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

LeiteDesnatado    0

LeiteDesnatado

LeiteDesnatado    0

  • Tree Puncher
  • LeiteDesnatado
  • Members
  • 0
  • 14 posts
Posted November 18, 2020

I'm making an entity and I'm getting this error in the class ModEntityTypes in the entity penguin when registering it (before I created the penguin entity my another entity was working fine)

 

Error  in eclipse: https://prnt.sc/vlmsev

 

Github: https://github.com/LeiteDesnatado/Mod

 

Class ModEntityTypes: https://pastebin.com/U8qnCFCd

 

Class PenguinEntity: https://pastebin.com/mQfPtiYu

  • Quote

Share this post


Link to post
Share on other sites

poopoodice    109

poopoodice

poopoodice    109

  • Dragon Slayer
  • poopoodice
  • Members
  • 109
  • 884 posts
Posted November 18, 2020

It looked right, for me at least.

  • Quote

Share this post


Link to post
Share on other sites

ChampionAsh5357    160

ChampionAsh5357

ChampionAsh5357    160

  • World Shaper
  • ChampionAsh5357
  • Members
  • 160
  • 1011 posts
Posted November 19, 2020

A simple case of generics. You are specifying that the type must be at least that of AnimalEntity. Therefore, you cannot guarantee that the generic is a PenguinEntity.

  • Like 1
  • Quote

Share this post


Link to post
Share on other sites

LeiteDesnatado    0

LeiteDesnatado

LeiteDesnatado    0

  • Tree Puncher
  • LeiteDesnatado
  • Members
  • 0
  • 14 posts
Posted November 19, 2020
28 minutes ago, ChampionAsh5357 said:

A simple case of generics. You are specifying that the type must be at least that of AnimalEntity. Therefore, you cannot guarantee that the generic is a PenguinEntity.

How could I fix that?

  • Quote

Share this post


Link to post
Share on other sites

ChampionAsh5357    160

ChampionAsh5357

ChampionAsh5357    160

  • World Shaper
  • ChampionAsh5357
  • Members
  • 160
  • 1011 posts
Posted November 19, 2020

Specify the generic parameter to be a subclass of PenguinEntity instead of AnimalEntity

  • Like 1
  • Quote

Share this post


Link to post
Share on other sites

LeiteDesnatado    0

LeiteDesnatado

LeiteDesnatado    0

  • Tree Puncher
  • LeiteDesnatado
  • Members
  • 0
  • 14 posts
Posted November 19, 2020

 

9 hours ago, ChampionAsh5357 said:

Specify the generic parameter to be a subclass of PenguinEntity instead of AnimalEntity

It worked thank you!

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • T1ps
      GUI Documentation

      By T1ps · Posted 4 minutes ago

      @Draco18s Ok... That's weird lmao umm is there any completed documentation for it or am I just gonna need to mess around?
    • _HungTeen_
      [1.15.2] Invalid criterion trigger

      By _HungTeen_ · Posted 18 minutes ago

      I am making a new Criterion trigger called SunAmountTrigger. First I create SunAmountTrigger class like the default did : https://github.com/HungTeen/pvzmod/blob/dev/src/main/java/com/hungteen/pvz/advancement/SunAmountTrigger.java And then I register it in AdvancementHandler : https://github.com/HungTeen/pvzmod/blob/dev/src/main/java/com/hungteen/pvz/advancement/AdvancementHandler.java Here is the json file of the custom advancement : https://github.com/HungTeen/pvzmod/blob/dev/src/main/resources/data/pvz/advancements/sunny_days.json But When I run mc, I didn't see the advancements and got log like this: [m[1;31m[11:11:47] [Server thread/ERROR] [minecraft/AdvancementManager]: Parsing error loading custom advancement pvz:sunny_days: Invalid criterion trigger: minecraft:sun_amount   I don't know why it's Invalid, tysm if someone can help me figure out.
    • monkeysHK
      [1.16] Transparent Picture Render in GUI

      By monkeysHK · Posted 20 minutes ago

      It was a really good reference to look at. I am trying to define a RenderState and use their constructor and their setup and clear functions. But it still wouldn't work. I don't know where the problem is. private static final RenderState.AlphaState HALF_ALPHA = new RenderState.AlphaState(0.5F); minecraft.getTextureManager().bindTexture(new ResourceLocation("minecraft", "textures/gui/widgets.png")); matrixStack.push(); HALF_ALPHA.setupRenderState(); { matrixStack.translate(instru_pos[currentNbo.ordinal()][0], instru_pos[currentNbo.ordinal()][1], 0); matrixStack.scale((255/20f)*scale, (255/20f)*scale, (255/20f)*scale); this.blit(matrixStack, 0, 0, 0, 146, 20, 20); } HALF_ALPHA.clearRenderState(); matrixStack.pop();  
    • DaemonUmbra
      Mods work in singleplayer but not in multiplayer

      By DaemonUmbra · Posted 25 minutes ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • DaemonUmbra
      not all my mods are showing up in a 1.12.2 server

      By DaemonUmbra · Posted 26 minutes ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

    • T1ps
      2
      GUI Documentation

      By T1ps
      Started Tuesday at 10:14 PM

    • _HungTeen_
      0
      [1.15.2] Invalid criterion trigger

      By _HungTeen_
      Started 18 minutes ago

    • monkeysHK
      2
      [1.16] Transparent Picture Render in GUI

      By monkeysHK
      Started Yesterday at 12:19 AM

    • __SmolMight__
      1
      Mods work in singleplayer but not in multiplayer

      By __SmolMight__
      Started 3 hours ago

    • uglyswed@gmail.com
      1
      not all my mods are showing up in a 1.12.2 server

      By uglyswed@gmail.com
      Started 3 hours ago

  • Who's Online (See full list)

    • AurenX
    • T1ps
    • DaemonUmbra
    • sarkozi
    • _HungTeen_
    • ChampionAsh5357
    • NobleSammk117
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.15.2]Why am I getting this error?
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community