Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

chubel10

Members
  • Posts

    51
  • Joined

  • Last visited

Everything posted by chubel10

  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!
  15. My mod works fine in my workspace and I already finished it (its my first mod). When I use the "gradlew build" command and put the jar in my mods folder it gives me an error. Here is my log. I would greatly appreciate some help. Thanks in advance! btw: (yes, it is a mod about obamium. I hope it makes you laugh)
  16. Since DeferredWorkQueue is deprecated, what should I use instead in order to have threadsafe code? Help would be appreciated.
  17. I solved it, you just don't do anything for the onHit() method for an entity. I am ashamed of this next question, how do I change the title to add the [solved] tag? thanks!
  18. Hello! I wanted to change the collision for a projectile I'm making such that it doesn't collide with entities and only activated the onHit() method when colliding with a block. What would be the correct approach to this or what vanilla code could I look at? Thanks in advance!
  19. Sorry, just one last question. Where can I change this collision box?
  20. Hello! Sorry for taking so long to reply. Thank you for providing some code! But how did you deal with the obfuscated names? Like did you climb definitions until you reached a method without obfuscated names in order to understand it? Thanks for the tip. How could I go about updating my forge? do I have to do the whole setup thing again and copy my code or is there some fancy terminal code that I should learn? All of your stack explanations were really helpful and they are much obliged. I'll look into your code and try to implement it ! Thanks in advance!
  21. To be completely honest, I don't actually know (sorry). All I can tell you is that probably: -It could be an issue with the renderer rather than the model itself. -Modded entity exports as Java code (but only supports up to 1.14 natively but the changes that need to be done are small). -I think that armor models are handled in .JSON files rather than classes but I could be completely wrong. I hope this tutorial can help in some way: https://www.youtube.com/watch?v=MGt11dr0f2o I hope you figure it out.
  22. Just to add on to what I said: I'm mostly confused because I thought the model controlled everything having to do with hitboxes, sizes and stuff but I already completely changed my model and the hitbox and length of the entity is unchanged —as well as the code of the renderer which I copy pasted from another vanilla class but I can't really read or understand due to all of the weird "func_227860_a_"s and the like which don't really help. Thanks in advance!
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.