saxon564
Forge Modder-
Posts
490 -
Joined
-
Last visited
-
Days Won
1
Everything posted by saxon564
-
With how I've found ticking to work, adding a method to the list of things to do seems to tick an extra time. Could just be some faulty testing, but if that is the case, then when it ticks the entity for a worldObj, it will return null because it cant find the entity so the worldObj would also be null. So even if it is talking about worldObj, it is only null because the entity is null. and because the entity is null and causing the NPE to throw, it tags Ticking Entity, if the BlockPos was null, but the entity wasnt, it should say something else. Now if I'm wrong, I'm sure one of the forum moderators will correct me, but I am speaking from all the NPEs I've has with the Ticking Entity tag.
-
take a look at any vanilla block file that is in the model.item package, it will give you a good idea on what to do
-
Please show what you have for your main class. It is looking like you are using something in a crafting recipe before you have initialized it.
-
As in, the line it is pointing to in the crash report? this.worldObj.createExplosion(this, mop.getBlockPos().getX(), mop.getBlockPos().getY(), mop.getBlockPos().getZ(), 1.5F, true); So only two possibilities are: worldObj is null(impossible), or mop.getBlockPos() is null(also impossible) Yeah, that is why I was stumped, too. Perhaps it will help figure it out that the following file for 1.7.10 worked. https://bitbucket.org/The_Fireplace/devons-random-things/src/f24522e68bb28fd2b065836a9f564eaf30e9dbc1/src/main/java/the_fireplace/devonmod/entities/EntityChargedCoal.java?at=master Then.. Try debugging to find exactly what is null. The crash tells you what is null! It is a NPE Ticking Entity. So the entity is null, try killing the entity after you create the explosion.
-
[1.8] [SOLVED] Spawning Particles Behind the Player
saxon564 replied to saxon564's topic in Modder Support
oh, ok, I did need to take into account what he said, I was quickly reading it earlier, but after I read it again I made the adjustments. -
[1.8] [SOLVED] Spawning Particles Behind the Player
saxon564 replied to saxon564's topic in Modder Support
Im not using the look vectors y anyway. ive got everything working right now. Thanks for the help. -
[1.8] [SOLVED] Spawning Particles Behind the Player
saxon564 replied to saxon564's topic in Modder Support
Oh, derp I should have figured that! I think I knkw what I need to do now. -
The inventory model is obtained by making a json file in your item folder for your block, which uses your blocks block model as it's parent.
-
[1.8] [SOLVED] Spawning Particles Behind the Player
saxon564 replied to saxon564's topic in Modder Support
Oh, ok, looking at that it makes perfect sence. This is something Ive never done before, so seeing the code has really helpped me understand what you are saying. Thank You guys for the help. I think this will work when Im at my computer and can try it. EDIT: He mentioned reversing the look vector, would that be adding/subtracting 180 or multiplying by -1? -
Extra Utilities seems to be outdated with the Buildcraft API, you will want to checm for a new version of Extra Utilies, if there isnt a new version, then you will want to find out what version of buildcraft you should have.
-
Well overriding onLivingUpdate will stop the entity from moving, and chances are, he will be overriding onUdate anyway. Plus as long as you dont give the entity any tasks it wont try to move anyway.
-
[1.8] [SOLVED] Spawning Particles Behind the Player
saxon564 replied to saxon564's topic in Modder Support
So you're saying to do float deltaZ = MathHelper.cos((float)(-yaw * 180.0/Math.PI - Math.PI)*2.0F); float deltaX = MathHelper.sin((float)(-yaw * 180.0/Math.PI - Math.PI)*2.0F); to spawn the particles at make the spawn 2 blocks behind the player once put into the x and y? If so, that doesnt make any sence as to how that would work. -
You can actually override onUpdate and onLivingUpdate, and that will stop it from acting like a living entity.
-
[1.8] [SOLVED] Spawning Particles Behind the Player
saxon564 replied to saxon564's topic in Modder Support
As I said, I was spawning them on the player trying to figure out how to spawn behind them and that is where I left the code. Ok. My biggest issue is knowing how to convey the deltaX and deltaZ to player relational positions. Do I simply have to add them to the value of posX and posZ? -
What I need to do is spawn particles behind the player. I know I have seen topics on this, but I can never seem to find them when I start looking for them. So my question is, what is the best way to spawn particles behind the player? Here is the code I have right now for spawning particles, and it does it right on the player instead of behind them. https://github.com/saxon564/Flatulence/blob/master/src/main/java/me/saxon564/flatulence/events/FlatulenceEventHandler.java
-
Sure you can: [nobbc][/nobbc]. [nobcc][nobbc][/nobbc][/nobbc] works like magic I wasnt event aware of that tag
-
That would be a simple solution, yes. But there is no reason you should ever edit a base class. If you find yourself trying to edit a base class to do something, then you need a core mod. If you dont know how to make a core mod, then you should just stop trying what you are doing and go learn how to, or ask if there is another way to accomplish it.
-
When making a new thread please state what version you are working with eg [1.7.10] or [1.8], this is make it easier for people to answer your questions accurately. This particular question cannot be answered 100% right unless we know what version you are using.
-
take a look at my network proxy here: https://github.com/saxon564/MoChickens/blob/Dev/src/main/java/com/saxon564/mochickens/network/FireMessage.java and my event handler here: https://github.com/saxon564/MoChickens/blob/Dev/src/main/java/com/saxon564/mochickens/events/FireEventHandler.java You should cross check it with your code.
-
Blocks that spawn a certain of other blocks
saxon564 replied to The Great Duck's topic in Modder Support
To find if the block has a certain block next to it you would use Block#onNeighborBlockChange and check if the neighbor is the block you want it to be, then use World#setBlock to place the block you want placed, after which you would set your block to air to get rid of it. As to determining what block is crafted, you could make several different blocks for each possible block. Otherwise you would have to use NBT data because metadata isn't large enough to cover every possibility. Finally making it so you cannot mine it you can do what Ernio said, or you can let them mine it and set Block#getItemDropped to null. Note that all this is for 1.7.10 there are some differences in 1.8. As you do no specify what version you are using I can only assume you are with the majority that are still using 1.7.10.