
Mopop
Members-
Posts
27 -
Joined
-
Last visited
Everything posted by Mopop
-
Yeah it's hard to find specific guides, and the docs leave a bit more to be desired. Maybe the modding community of the past never thought to write some guides for the future modders, but this game is getting kind of old too...maybe they are waiting for Minecraft 2?
-
Uhm... what? I have no idea what you are talking about. Probably worded it poorly again. I was asking if I had to subcribe to an event to fire it, or if I can just call it in another block of code. Say like once the enemy was set on fire it would start the tick event to count 8 seconds and execute code I wrote instead of having it listen for ticks the whole time, hopefully it's worded better. http://www.planetminecraft.com/blog/forge-tutorial-capability-system/ I followed this guide. I know about interfaces, but I was wondering how I could get entity data from it, this guy uses his implementation to get a mana value he sets. Then the whole NBT thing was a headscratcher too. Thanks for the help.
-
All set up! But how to actually get going?
Mopop replied to intermediateuser's topic in Modder Support
Whoops. https://bedrockminer.jimdo.com/modding-tutorials/set-up-minecraft-forge/set-up-fast-setup/ I agree that it's hard to find good detailed info of the API, but then again this game is like going on what 6-7 years? -
All set up! But how to actually get going?
Mopop replied to intermediateuser's topic in Modder Support
Did you import build.gradle? If so you should have a gradle window to the left. Then under Tasks should be forgegradle. Select setupDecompWorkspace and then genIntelliJRuns. Then at the top right at the drop down menu, then Edit config, after that go to Use classpath of module and point to your main folder. edit: Whoops saw that was eclipse. Not IntelliJ... edit2: Here this looks like a good set by step quick guide to getting you up and running, what kind of mod are you making? -
Well I looked at capabilities, whew, kind of a brain scratcher. The docs don't tell me much, the few tutorials left a lot of questions too. Is there a good resource I can look at for help? I was always wondering if the was possible in my main block of code with all the entity data if I could call WorldTickEvent, instead of subscribing to it?
-
Get the new version of Forge, make a new work environment and put your code in there and see what errors come up and deal with them one at a time? What I would do, but there might be a better way.
-
I've been working on a mod that makes all mobs during sunlight. Problem is that the witches heal, and then the mobs drop a ton of crap. I wanted to set it that after the mob burns for 8 seconds it will kill them. I messed around with WorldTickEvent and make some kind of a timer, but the problem was I couldn't get any information from the LivingUpdate method holding all the entity information. I then tried just having them start to burn, then kill them off immediately, but it looked very unnatural. Then I tried what I'm posting below... That locks my code up also the StingyMobs method when used they'll still drop items. So I've been at a lost on what to do and really could use some direction, thank you.
-
[1.11] [SOLVED] Making sure players don't spawn in deep water/ocean areas.
Mopop replied to Mopop's topic in Modder Support
I threw this at the end of my code e.player.preparePlayerToSpawn(); After 30 respawns I haven't spawned in a tree, it looks like this method checks to make sure that a player can spawn properly? Thank you so much for your patience and help. I think I'm going to list this one as solved! -
[1.11] [SOLVED] Making sure players don't spawn in deep water/ocean areas.
Mopop replied to Mopop's topic in Modder Support
There is all my spawn code. Well I put it in there because if it looped around it would need another random spawn then I noticed, it never was getting another spawn point. so I rewrote it and it seems to be working, tried 15 times only problem was once I spawned in a tree...I thought MC checked to see if it's a spawnable block before placing you? Or is this something I have to write myself? Here is the new code btw. -
[1.11] [SOLVED] Making sure players don't spawn in deep water/ocean areas.
Mopop replied to Mopop's topic in Modder Support
I know the basics at the very least. I've never been too advanced of a coder but I do have a grip on scope, variables, and using the debugger. I even set up my IDE to filter out from stepping into the APIs so I don't have to step out of thousands of line of code. I've stepped through the code it says that it is an Ocean biome, but yet it doesn't try to grab another spawnpoint. I'm guessing I'm just using the wrong calls due to an ignorance of the forge API. I do know of a good java coders discord server, so maybe I'll run somethings past those guys too. I do try very hard to come up with answers myself, I usually do not post until I've tried several approaches, google my problem , read other modders source code. I know how much coding forums hate people asking for them to write the code and I'm not trying to do that. I will reassess my code though, thank you for your help and responding kindly. -
[1.11] [SOLVED] Making sure players don't spawn in deep water/ocean areas.
Mopop replied to Mopop's topic in Modder Support
I'm also having problems getting the TickEvent to work for me. I just need a timer to count 8 seconds whenever the mob is set on fire. I've been working on it a couple hours and it either doesn't work, or looks very unnatural. I've tried looking on google and tried finding source code to read with stuff I would suspect had timers, but did not. -
[1.11] [SOLVED] Making sure players don't spawn in deep water/ocean areas.
Mopop replied to Mopop's topic in Modder Support
Ah whoops, I'm still kinda rusty right now at coding. I'm guessing the logic part is also wrong in the while statement? Because I moved all the code up to the do statement and I still spawn in water, and sometimes it just spawns me in this weird dark place and the game locks up. Thanks for helping me out. -
[1.11] [SOLVED] Making sure players don't spawn in deep water/ocean areas.
Mopop replied to Mopop's topic in Modder Support
So the while statement is broke? Heres how I -thought- it worked. -while the biome equals ocean or the block the player is going to be spawned to is in water - Set another spawn location with the randomSpawn() method - Get the new spawn location information and assign it to the spawnPos variable -From the spawnPos field find write over the biome field so that it can find the new biome instead of it staying on the old biome. -back to the while statement to see if the information to see if the biome is an ocean or the block is water. Where did I go wrong along the way? -
[1.11] [SOLVED] Making sure players don't spawn in deep water/ocean areas.
Mopop replied to Mopop's topic in Modder Support
Ok after messing with that and other things I'm writing. I got this code, but of course, it doesn't work. I'm sure I'm miss using the BiomeDictonary but I couldn't find much documentation on it. Also bonus points if someone knows how I can delay my code like sleep.thread() without it making Minecraft freeze. I'm trying to wait 8 seconds then it kills a mob. I can get it to pause for like a second then do it, but it looks so unnatural like that. Also how do you set it so that a mob doesn't drop anything? I set entity.setDropItemsWhenDead() to false and it still drops their items on death. Sorry for the question inside a question, didn't want to make a whole new topic if I didn't have to. Thanks in advance. -
[1.11] [SOLVED] Making sure players don't spawn in deep water/ocean areas.
Mopop replied to Mopop's topic in Modder Support
Hmm. I was looking into that. I'll mess around with it now. I'll probably have some poorly written code coming up soon! -
[SOLVED]Checking to see what entity is being hit by sunlight.
Mopop replied to Mopop's topic in Modder Support
That did it! Thanks so much. -
[SOLVED]Checking to see what entity is being hit by sunlight.
Mopop replied to Mopop's topic in Modder Support
In intelliJ using the Gradle sidebar. build->clean->jar -
[SOLVED]Checking to see what entity is being hit by sunlight.
Mopop replied to Mopop's topic in Modder Support
Ok I changed the code as recommended. I'm still getting the error when it's live, but it still works in debug mode on the IDE. I put a breakpoint on the line it's complaining about and it seems to run the entity.getEntityWorld() fine. However I did notice this when I looked at the crash report Is the null EntityType causing this? What is different about the game when running it through the IDE? -
[SOLVED]Checking to see what entity is being hit by sunlight.
Mopop replied to Mopop's topic in Modder Support
I was just poking around and trying different things. I originally used entity.getEntityWorld Here is the full method. -
[SOLVED]Checking to see what entity is being hit by sunlight.
Mopop replied to Mopop's topic in Modder Support
Cool, it all seems to work when I run it in debug mode. As soon as I jar it and put it into a live game it crashes when the world loads. This is line 39 (Along with the old call I had in there, that gave me the same error) World world = Minecraft.getMinecraft().theWorld; //entity.getEntityWorld(); Why would it say the method doesn't exist? I'm sure it's probably some little nuance I'm doing wrong, but why would it work on the debug server too? I've removed all other mods too and it still crashes. -Thank you so much for all of your help so far. -
[SOLVED]Checking to see what entity is being hit by sunlight.
Mopop replied to Mopop's topic in Modder Support
Well I'm going to head to bed. I have it working, but it keeps burning NPCs and Players. Is there a simple way of just checking what entity is what? -
[SOLVED]Checking to see what entity is being hit by sunlight.
Mopop replied to Mopop's topic in Modder Support
Okay cool I almost have it all re-written and ready to go but I'm not sure what this line means? And what it wants. super.onLivingUpdate(); Once I have that figured out I can test it out.