Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

chubel10's Achievements

Stone Miner

Stone Miner (3/8)



  1. I see! thank you. But only the constructors that are client side take an argument for affectedBlockPositionsIn which I need. How could I go about adding specific blocks to the List<BlockPos> affectedBlockPositions field without using reflection? Thanks in advance!
  2. I am having an issue regarding a NoSuchMethodError but only when connected to my server. Here is the crash report: And here is the class for the entity that is giving me trouble: https://github.com/Chubel10/ObamiumMod/blob/master/src/main/java/com/chubel/obamiummod/entity/ModFloatingEntity.java Help would be greatly appreciated!
  3. Are you sure it's under assets/<modid>/models/block/<block>.json? and is your blockstate under assets/<modid>/blockstates/<block>.json? For the model and the blockstate respectively?
  4. Sorry for taking so long to reply, I was checking the natural spawn of the entity. And by the way it's solved! thank you so much! Here's my new code (It might not be very good practice what I did) : https://github.com/Chubel10/ObamiumMod/blob/master/src/main/java/com/chubel/obamiummod/init/ModEntities.java
  5. Apparently even with that tag being that of the minecraft:pig i think it IS only client-side because it's making the noises of my entity
  6. I checked and it apparently is a pig (I used F3 and it said what the image said). As for my code: https://github.com/Chubel10/ObamiumMod Thank you for taking the time!
  7. Thank you! that's fixed now. My egg spawns a pig instead now which is weird but thank you for everything else!
  8. Thank you very much for your fast response! I'm afraid that to my knowledge I can't use RegistryObject as a static reference to my EntityType because I need to do the .get() in order to access the EntityType needed elsewhere which causes the Registry Object not present error becuase it's lacking registration (I'm sorry if i'm missing something)
  9. So by doing this I have to create a static reference to my entity now for things like the rendering of the model correct? So I have to make a new class with the @ObjectHolder annotation just for this one entity? I don't mean to sound presumptuous but why are you dissuading me from registering to the map directly? It just seems unnecessary to do the former. This is a genuine question. Im curious to see your reasoning. Or maybe there's an easier way to do it without the @ObjectHolder classthat I don't know about. Anyway, thank you for your help!
  10. I will try this and get back. Thank you!
  11. Also, regarding this, is there a way to check the SRG equivalent to and MCP name? And If the answer is to use the MCPbot do you know of any tutorial or forum topic that discusses this? Thanks in advance.
  12. But the SpawnEggItem constructor takes in an argument of type EntityType<?>. This means that if I want to do super(typeIn, primaryColorIn, secondaryColorIn, builder); () my first argument must be ModEntities.<entity-name>.get() as I am using the deferred register for my entities. In doing this I cause a Registry Object not present exception because items are loaded before entities. How can I get around this without adding things to the map manually? I really appreciate the help and hope you can help me figure this out.
  13. Hello, diesieben07 thanks for answering. I'm not familiar with the concept of SRG names would you care to explain please? Surely! Since I'm making a spawn egg, I can't register an item that references an entity because of the order in which entities and items are loaded so I created a method to register only the spawn eggs at lowest priority once entities have already been loaded like so: @SubscribeEvent(priority = EventPriority.LOWEST) public static void registerEggs(RegistryEvent.Register<EntityType<?>> event) { ModSpawnEgg.registerEggs(); } This method adds my spawn egg to the field I used reflection to get in order to load it. Here is the code to the class in case you want to see: I must mention that this code is not original but I got this concept by reading into cadiboo's example mod. Do you by any chance know another method for registering spawn eggs? Again, thanks for the reply and I hope you can continue to help me!
  14. Thank you for your help and I wish that would've fixed it but I updated my code to the latest forge and also changed the client to the same version and now I get this: This is referring to this part of my code: private static final Map<EntityType<?>, SpawnEggItem> EGGS = ObfuscationReflectionHelper.getPrivateValue(SpawnEggItem.class, null, "EGGS"); But it works fine in my workspace (which is now the same version). I would really appreciate the help!
  • Create New...

Important Information

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