Everything posted by Babelincoln1809
-
Itemstack based Cooldown Tracker
Getting the cooldown to work basically. I got it so it doesn't crash the game whenever I right click, which is a step in the right direction, but still doesn't do the item cool down
-
Itemstack based Cooldown Tracker
Okay, so I override that and just attach the capability through there in the item class? [Edit] I got it to work by doing that, so how do I fix the cooldown issue exactly?
-
Itemstack based Cooldown Tracker
I add it here, and originally used it here too. Thinking about it, yeah it really doesn't make sense for me to implement it into my item I'm gonna make it be used there, like I originally had it, instead of in the class. I guess cause I was looking around other classes and thought something in the line of IVanishable it needed to be implemented in my item class
-
Itemstack based Cooldown Tracker
Oh shoot sorry! Didn't realize I sent that one by accident, was in a bit of a rush earlier. Here's the capability class
-
Itemstack based Cooldown Tracker
Here's the capability:
-
Itemstack based Cooldown Tracker
I'm trying to make an item that has a cool down that is itemstack based, not player based, so that it can be dual-wielded without creating a duplicate item that just creates clutter. I created a capability, and it works, but the issue is trying to apply the cool down, or using any method from the CooldownTracker class. Basically crashes the game. Any idea on what the issue could be or just something that achieves something similar that I can reference would be much appreciated Code (Both Pastebin and Hastebin aren't working rn for some reason):
-
Error with adding listener to Capability
I don't even know why I didn't think of that in the first place, thank you! It worked! I was WAY overthinking it lolol
-
Error with adding listener to Capability
I'm doing my first capability, and I followed what I was referencing pretty closely albeit had to change things for my own capability. The issue comes in when running my mod, it says it needs an "addGenericListener" rather than "addListener" when the thing I'm referencing doesn't use that anywhere. I really don't how to fix the issue I'm still new to making capabilities, and I hope I explained my issue well, so any help is much appreciated. Code: Registering the Capability in the FmlCommonSetup: https://pastebin.com/5wMSrM5N ICoolDown Interface: https://pastebin.com/jHZPwuNY DefaultCoolDownCapability class: https://pastebin.com/pDiH3eev CoolDownStorage class: https://pastebin.com/7e59wfuR CoolDownProvider class: https://pastebin.com/dgCv94iG CoolDownHandler class: https://pastebin.com/CuhG1wFR CoolDownCapability class: https://pastebin.com/7E7Yg9Bh
-
Issue with mirroring block (1.16.4)
I created a block and referenced most of the code from the end rod, cause I wanted it to be directional. The only issue I'm really stumped on is that it won't mirror the voxel shape at all. I've looked at how other blocks do the mirror method, but all seem to be not what I'm looking for. Any help? [Edit] I've looked around various forum sites and haven't found anything on them either Code : https://pastebin.com/mdUR2SS7
-
Issue with Event (1.16.4)
Alright, I rewrote the entire event, and fixed the infinite fire event and I believe it also fixes the multiple players issue as well. Although, I can't really test that at the moment. Here's the code: https://pastebin.com/CTj6jbtY
-
Issue with Event (1.16.4)
I did not notice that was there! Probably made it's way back from undoing code so many times lol Good point, for some reason thought it would fix the issue lol What should I be looking for to get that to not be shared across players, but only to the one who has the item in their inventory? I haven't really thought about that being an issue until I made the post, and I'm focused on fixing that rather than the fire issue now
-
Issue with Event (1.16.4)
I'm running into a bug with an event of mine where when a player has a certain item in their inventory it'll cause whatever mob they hit to set on fire. I set the setfire method to 3 ticks, but keeps on going infinitely until the mob is dead. If throw the item out of my inventory after I hit the mob, then it'll last the intended amount of time. I tried multiple ways on fixing the issue and trying different methods of getting this to work, but to no avail. Any help would be much appreciated. Here's how I currently have it: https://pastebin.com/SHT97LJd I'm also having thoughts that multiple players will be able to cause mobs to be set on fire if only one player as the item in their inventory on a server, but that has yet to be tested, and is another bug for another day
-
Event Won't Spawn Projectile
Got it to work! Thank you!
-
Event Won't Spawn Projectile
I see what you mean. How would I go about that exactly? The OnlyIn annotation above the subscribe event? That's all I can really think of when making the server aware of the event
-
Event Won't Spawn Projectile
Wait, never mind. I've tried putting an if statement over the method spawning the entity saying only if the world isn't remote, but it didn't do anything
-
Event Won't Spawn Projectile
That was easier than what I imagined lol, thank you!
-
Event Won't Spawn Projectile
I'm creating a weapon that when left clicked it'll fire a projectile and play a noise. I got the noise to work, but the projectile won't fire no matter what I do or alter. Any help would be much appreciated Here's the code: https://pastebin.com/EGQ85QqZ
-
Adding Custom Attack Speed Bonus (1.16.4)
I was wondering how to make a custom attack, like sweeping edge for swords, but for when my custom weapon's attack speed cooldown thing is fully back up. Nothing is in the SwordItem code that mentions this, so I don't know where in the reference libraries this exact thing I'm looking for would be in. I'm sorry if I didn't describe that well lol
-
Projectile Keeps Duplicating Itself (1.16.4)
That worked! Thank you!!!
-
Projectile Keeps Duplicating Itself (1.16.4)
I'm creating projectile that when it is removed from the world it'll sorta create an area effect by spawning multiples of itself. The issue is that it keeps multiplying and multiplying. I've been referencing the SlimeEntity code when it is killed and seeing what I can do to help fix the issue, but I've hit a stump. I need some sort of parameter in the if statement where it'll only accept the original projectile, like how the SlimeEntity will only accept it if it is above 1 in its size, maybe making the multiples clones of the original? Here's my code: https://pastebin.com/63w55irr
-
Get rid of arrow bounce back (1.16.4)
I was wondering on how to get rid of arrow bounce back when a mob is doing the hurt animation, I don't know where specifically in the AbstractArrowEntity class is causing that to happen or if it's being caused by something else somewhere else entirely. Maybe an event? This topic has been brought up all the back in 1.8 so it wasn't much help. Any lead on where to look or just a solution all together would be much appreciated.
-
Modifying Vanilla Loot Tables (1.16.4)
Thank you!!
-
Modifying Vanilla Loot Tables (1.16.4)
I was wondering how to modify/inject vanilla loot tables and add my own items into them, like adding my own items into the simple dungeon loot table. Most guides on this subject are pretty outdated and can't find anything recent. Any guide that I can reference and look at would be much appreciated!
-
Asyncing Item Cooldown Among Itemstacks
I was thinking about this while making a capability for it, but could I create a new instance of the CooldownTracker class within my Repeater class? and reference what the PlayerEntity class does to create the cooldown?
-
Weird Cross Block Render Issue (1.16.1)
Thank you! That was a much needed reference to look at
IPS spam blocked by CleanTalk.