TheXFactor117
Forge Modder-
Posts
82 -
Joined
-
Last visited
Everything posted by TheXFactor117
-
That's what I'm doing. Manually adding the NBT data to the item seems to override the default AttributeModifiers, which I think is the only way to do this.
-
I am trying to change attributes like attack damage and attack speed of existing items, but I'm wondering what the best way to do this would be. Right now, I can change the values perfectly fine through creating and setting a new NBTTagCompound to the item. However, I'm wondering if this is the best way to do it, or even if it's the only way. I noticed a few limitations, considering it basically rewrites ItemSword's tooltip in favor of a blue text instead, though, with this, the Attack Speed value displayed isn't necessarily correct. Sword's by default have a -2.4 attack speed modifier, but changing the attributes like I did means the number won't get added to the player's base attack speed (which is 4, which would equal 1.6). The Attack Speed gets correctly set but is instead displayed as a negative number, which can be misleading. I've tried changing the tooltip, but retrieving the value in the attribute is hard to get, and when I do retrieve it, it is always the default -2.4. I feel like I'm not doing this right, but if anyone knows a way around this or has a better way of doing it, I would appreciate it.
-
Awesome, works perfectly.
-
This looks like it won't be possible, considering it seems to be hardcoded, but I might be overlooking something. Is there anyways to change the tooltip background color? For instance, it has that dark blue-ish color, but I'm looking at changing that color to something else. If there isn't a way to change that color, could I somehow override the default tooltip and replace it with my own for certain items?
-
Overriding Minecraft's Health System Question
TheXFactor117 replied to TheXFactor117's topic in Modder Support
Yes, but I think through events and capabilities you can re-work the health system. It would just rely on the specific events getting called last. However, compatibility issues will likely arise with mods that change max health as well (and possibly those that alter the HUD Gui). I'm working on implementing it right now, and will test how everything works with other mods. Right now, I don't know of a way to fix any issues with other mods changing max health. -
Overriding Minecraft's Health System Question
TheXFactor117 replied to TheXFactor117's topic in Modder Support
I'm expecting a few incompatibilities here and there, but I'm going to at least attempt to do this now. I'll see how far I get, and try to make it as compatible as possible. -
Overriding Minecraft's Health System Question
TheXFactor117 replied to TheXFactor117's topic in Modder Support
I know how I would go about doing it, I guess I was just looking for some answers on what would happen compatibility wise (but I guess since no one has really done it, no one really knows). If no one posts here with any issues that might arise, I'm definitely going to try and overwrite the health system for one of my mods. If it works out and is successful, I might actually make it a standalone mod for people interested in changing things up. But I'm not going to get too far of myself, I'm sure there will be a lot of work involved to get it running properly. -
I was just curious as to if this would be possible first and for most, along with how it would effect certain aspects of the game and even mod compatibility (because I assume it might break a lot of things potentially). It's not something I am 100% wanting to implement, but I have just been toying around the idea and was wondering the feasibility behind it. To explain a bit better, I was thinking about removing the health system in place in favor of my own, which would essentially increase the amount of health everyone house to "points" instead of hearts. For instance, 10 hearts would be equivalent to say 2000 points of health in my new system. To do so, I figured I would just use a formula to convert hearts to points. With that being said, damage would also have to be changed too. All in all, if what I am envisioning is possible, how would that affect mod compatibility? Is there a way I could run through every entity registered and change the values of health/damage of their entities? And what about changes authors might do during a LivingHurtEvent for example that modifies damage? I'm just curious as to what I would be dealing with if I did decide to go for it.
-
[SOLVED][1.9.4/1.10.2]Issue with LootTables
TheXFactor117 replied to NovaViper's topic in Modder Support
There is no name entry though... you need a name entry for your entire pool. Here's a reference. -
[Solved] [1.10.2] Sending Packet When Attaching Capabilities
TheXFactor117 replied to TheXFactor117's topic in Modder Support
Awesome it's working properly now. I appreciate all the help. -
[Solved] [1.10.2] Sending Packet When Attaching Capabilities
TheXFactor117 replied to TheXFactor117's topic in Modder Support
So something like this should work properly? Edit: the entity here is getting passed as null, possibly because the entity hasn't joined the world yet? (as that is where the packet is being fired) -
[Solved] [1.10.2] Sending Packet When Attaching Capabilities
TheXFactor117 replied to TheXFactor117's topic in Modder Support
That makes sense - I tried updating the capability from inside the packet but I couldn't ever get it to work, must have did it wrong then. I'll see if I can get it to work this time. -
I'm trying to add a capability to entities (specific mobs) that gives them a certain level. I've got the capability working, everything works fine server-side, I just have to get this information to the player to render it on the screen whenever the player looks at the mob. The problem I'm having is getting this information to the player. From what I can tell, the AttachCapabilitiesEvent is fired both client and server. Changing this to fire only on one side doesn't work, because the capability doesn't seem attached on the other side (or am I wrong because if I am this would likely fix my issue). I originally set the value of the level when attaching the capability, but I don't think I can do that because that's where I would need to send my packet. I've tried setting the level using EntityJoinWorldEvent and sending the packet from there, but the client doesn't get notified (according to the RenderGameOverlayEvent), yet the packet prints out the correct level on the client-side. This leads me to believe that the way I'm accessing the capability from RenderGameOverlayEvent isn't correct (I'm almost certain this is the problem now). In the end, I'm kind of just stuck, so any help is appreciated. - AttachCapabilitiesEvent - EntityJoinWorldEvent - RenderGameOverlayEvent If you need more code, everything should be accessible from GitHub.
-
[1.10] Procedurally Generated Structures
TheXFactor117 replied to TheXFactor117's topic in Modder Support
I do have one question though - how would I go about rotating newer rooms and placing them off of the one procedurally generated before that. I can generate and move new rooms around the main room through using EnumFacing, but using EnumFacing's rotation methods don't seem to work as I thought they would. Is that a way you can handle rotating it, or is there a different way? Here's what I have now, and bear with me as things might be kinda messy - just a lot of experimentation right now. I've tried several different variations of essentially the same code, though they all produce relatively similar results (placing down a room with the same facing each time, just on different sides of the room beforehand). -
[1.10] Procedurally Generated Structures
TheXFactor117 replied to TheXFactor117's topic in Modder Support
Sounds simple enough. But as you said, I did run into the issue with generating in chunks I believe. Could you possibly elaborate on how to handle the chunks properly? Actually I take that back - just a simple issue with the recursion. Other than that, thanks for the tips! I think doing it this way is definitely very simple and straightforward, so thank you for that. -
I'm looking into creating procedurally generated structures, or more like dungeons, though I'm just wondering what the best way to handle this would be. Looking at how Strongholds are handled, it sure looks to be one hell of a process. I would think there would be a much simpler, efficient way of doing that though. What I'm looking at doing is just spawn the entrance of the dungeon first, then randomly test if more rooms are able to connect to it, if so, randomly pick a room, and the process continues, of course with a decrease in probability as the rooms generate. If anyone has some ideas on how to accomplish this, I'd love to hear them.
-
Look out how I've done some of my entities, just change up which class you're extending to be an animal.
-
What kind of entity are you looking for? Monster? Animal? Projectile? I have some code you can find here that you can use as a reference. For any of the ones above, you'll just need the Entity's class, a way to render it, and a way to register it. You're likely not going to find any detailed tutorials for 1.9+, but older tutorials should also work decently. Rendering is one of the main things that has changed from previous versions.
-
I'm still trying to figure out a way around this: RenderingRegistry.registerEntityRenderingHandler(EntityProjectile.class, RenderProjectile::new); This throws the following error: The target type of this expression must be a functional interface I don't understand how this error is getting thrown when other people are using the same exact code and is working perfectly fine for them. I'm still assuming it's an issue with Eclipse somehow, but I don't understand why Eclipse would be throwing this error either, even after updating it. Not too sure if this is an issue with Forge or not, but hopefully I can at least get pointed into the right direction.