Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/14/20 in all areas

  1. Sweet thanks for the help. Do I need to make my own 'shouldRemove()' method? I have this right now but shouldRemove isn't a real method if (!worldIn.isRemote) { if (!entityLiving.getActivePotionEffects().isEmpty()) { Iterator<EffectInstance> itr = entityLiving.getActivePotionEffects().iterator(); do { EffectInstance effectInstance = itr.next(); int duration = effectInstance.getDuration(); int amplifier = effectInstance.getAmplifier(); duration -= 600; Effect effectPotion = effectInstance.getPotion(); if(shouldRemove(effectInstance)) { entityLiving.removeActivePotionEffect(effectPotion); entityLiving.addPotionEffect(new EffectInstance(effectPotion, duration, amplifier)); } } while (itr.hasNext()); } } Let me know if I have something wrong.
    1 point
  2. I got it to work! I needed to add this: sourceSets { main { resources { srcDirs += "src/generated/resources" } } } to my build.gradle. Honestly don't know how I missed that.
    1 point
  3. I think you can change that in your build.gradle (haven't tried it yet myself) to make it generate them right in the src/main/resources I would guess changing that src/generated/resources to src/main/resources would do it. However, I don't know if it clears out anything before it writes them, so make sure you have a backup or something just in case lol
    1 point
  4. The main benefit(s) I can see are not having to make sure your json syntax is spot on, using code completion in your IDE for the method names, and being able to make loops where things are similar. That being said, I have yet to use them myself, since I'm a tinkerer more than a modder making a mod. https://wiki.mcjty.eu/modding/index.php?title=Tut14_Ep7 McJty has a pretty good starting point, also forge has some examples, and the net.minecraftforge.client.models.generators package has BlockState/Model generators, https://github.com/MinecraftForge/MinecraftForge/blob/1.15.x/src/test/java/net/minecraftforge/debug/DataGeneratorTest.java has examples of those I think.
    1 point
  5. Thanks for the links There's good information in there EDIT: Man your first link is actually gold, helped me a lot!
    1 point
  6. Pretty sure Champion is talking about how the client gets notified that a container was opened. NetworkHooks is a good place to start looking on that front.
    1 point
  7. I have already implemented a system like this in 1.14.4, and am working on porting it to 1.15.2. From your post and your account age, my impression is that you don't understand much of what is necessary to do this. Here is an example of what it ended up looking like for me when I tried. It required a lot of coremodding, including rewriting the raytracing methods to account for rotated AABBs. I would like to further mention that "AABB" stands for axis-aligned bounding box, and there was a lot of vector math required to get things to trace these oxymorons. I would not recommend to new people to try adding this feature. To actually answer your question, you would need to do these things: Coremod the GameRenderer (if I remember right) to enable custom client tracing logic. Create some sort of RotatedAABB (I used a wrapped AABB that rotated the input and output tracing vectors) Rotate these correctly to the relevant entities during the trace call. If you want custom behavior based on where the attack hits, you need to send that information either before the vanilla attack packet, or in place of the vanilla attack packet. Profit
    1 point
  8. I've been working on my mod dimension for three days and I still don't get what I'm doing but here are the best links (for dimensions and general world generation): http://jabelarminecraft.blogspot.com/p/minecraft-forge-1721710-biome-quick-tips.html https://jabelarminecraft.blogspot.com/p/minecraft-modding-custom-dimension.html https://gist.github.com/Commoble/ac7d7b57c9cbbfcae310c4ab110c3cc0
    1 point
×
×
  • Create New...

Important Information

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