
xanderindalzone
Members-
Posts
81 -
Joined
-
Last visited
Everything posted by xanderindalzone
-
I fixed the bug by overriding this method in the Gun's class and removing the others that prevented mining: but now it doesnt call onItemRightClick(shoot) when the player is aiming(holding left click) while looking to a non-solid block(glass, flower, etc). And by the way, is there a way to also set destroy speed to 0 on creative while holding the item? because if I remove the left click interaction on creative it still lags the player movement while aiming and looking to any block.
-
Hi, I have a weird issue, I dont know why but when I hold left click with a Gun Item(to aim) in the main hand, looking at grass, flowers, or torches, the player gets stuck and cant move until I stop holding left click or stop looking at the grass, flower, torch, etc,.... How could I fix this? I think i've checked all the methods from the Gun class and all the events that relate to this issue, but none is making this happen. PD: in creative mode it has a different, it just causes the player movement to lag, and its triggered by holding left click with any block. Here's the repo: Gun class Footage:
-
is this ok now? I'm using the first List I had, List<Item>, because you said the issue was in the "static" initializing thing. I'm creating a new SortedItemList object in CommonSetup so I can get the predifined List for the Comparator, then I use the Mod Class instance field to access that mod object's Comparator field. its still working as expected ingame at least 😅 Overriden method in the ItemGroup class:
-
thx for the guide... and thx for the update... its working For anyone interesed on the end result, here it is: 1.I made a class to store the static comparator with a static list with all the items in the order I want 2. I overriden the fill() method in the CustomTab class that I wanted to sort, sorting the item list after calling super:
-
I've seen a lot of posts about this topic but most were outdated, talking about overriding this method in your item's class: but the tooltip field was List<String>, so I dont know how to deal with ITextComponent. I also saw another post where they recomended using this event.... but I dont know which is the correct tag, or if i'm doing it correctly or not... this probably sounds like an easy thing/topic but I cant find the anwser anywhere😅
-
[1.15.2] Projectile acting weird sometimes
xanderindalzone replied to xanderindalzone's topic in Modder Support
ok, i've managed to fix my issue by getting the block hit coords and setting the entity pos to these hit coords, and its working The impact effect is always reacting as expected, but sometimes, rarely, particles dont spawn, but the sound effect does play properly, so thats a bit weird. -
[1.15.2] Projectile acting weird sometimes
xanderindalzone replied to xanderindalzone's topic in Modder Support
Yep, it has something to do with the bullet speed, I made the bullet a lot slower and its reacting always as expected when it hits glass etc etc, but I obviously cant make the bullet go slow, it wouldnt feel like a real gun anymore.... Is there a way to make the game update the bullet position faster? -
[1.15.2] Projectile acting weird sometimes
xanderindalzone replied to xanderindalzone's topic in Modder Support
any help? 😅 -
Sometimes when I shoot a bullet and it hits a glass block, it acts like it hits ground, or sometimes it traspasses it. I have coded the bullet to break vanilla glass and spawn particles when it hits IRON material blocks, which does,.... sometimes... Could it be that the bullet's position is not updating in time before it hits? PistolBulletEntity class Init entities White cloud is the ground impact event and the crit particles are the iron material effect(thats armored glass)
-
Oh yeah, I'm dumb, I copypasted the code and forgot to change the method name in the parameter :P, thx XD I sometimes change code too fast that I dont realize of these silly mistakes XD Its now joining the world without crashes thx
-
Now I'm getting this null exception when I join the world :V (CODE UPDATED on Github) Isnt this the way it has to be implemented? PD: I think I got this line from another post.
-
I'm getting a null error when I try to get the player's custom capability, I dont know why.... I must have missed something but I dont know where.... if someone could tell where's the problem i would be grateful. Main Mod class Capability package with providers Event that attatches capabilities to the player Event Handler where I call the capability