Everything posted by chimera27
-
(SOLVED!!)[1.6.4] Checking if the player is in 3rd person
Thanks!!
-
(SOLVED!!)[1.6.4] Checking if the player is in 3rd person
I was wondering what the best way to check what view mode the player is in. I was unable to find a function that returned it anywhere in the EntityPlayer class, does anyone know what the best way to get it is? Note: I'm trying to make an entity that only renders when the player is in 3rd person, just incase that makes too much of a diference
-
[1.6.4] Stopping the player from slowing down when using an item
Anyone? I'm seriously stumped on this...
-
[1.6.4] Stopping the player from slowing down when using an item
I've been trying for a while now to figure out a way to make it so when the player starts using my item, they don't get slowed down. I've tried increasing the players speed when they're using it, but that makes the FOV go crazy, zooming in when I start using it and zooming out when I stop (which is unacceptable seeing as this item sometimes needs to be used rapidly.) I've tried changing the FOV depending on wheather it's starting or stopping using it, but to no avail. I've also tried using player.setEating(false); Which did absolutely nothing. Here's the code for my item ATM: I have no idea where to go from here, and am probs missing something obvious that I should be able to see, but anyone know what the heck I should do?
-
[1.6.4] Changing the players size
I was wondering if anyone had a good way of changing the players size without needing to be a coremod. There's no method I've found to do the job and player.boundingBox is final Also I have absolutely no idea how the game does it when the player is sneaking, if someone could point me to where the game handles sneaking that would be great too!
-
Changing collision box for a block
I'm trying to make a block that when the player is near it, they get a potion effect. Adding it when an entity collides with the block works, but I have yet to find a way to change the entity collision size of the block. I tried using public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { float f = 0.525F; return AxisAlignedBB.getAABBPool().getAABB((double)par2 - f, (double)par3 - f, (double)par4 - f, (double)(par2 + f), (double)((float)(par3 + f)), (double)(par4 + f)); } But to no avail, that just kinda derped it and made it render huge but keep it's hitbox... Any ideas on how to do this? Also i'm trying to avoid custom AABB's because i'm not familiar with how they work or how to use them other then that they select everything inside them somehow...
-
[Solved] Changing the players dimension with a GUI button
I suspected something like that, thanks!
-
[Solved] Changing the players dimension with a GUI button
I've been making a block with a GUI that has a number of buttons on it, each of which will teleport the player to a different dimension. The problem, however, is that I can't seem to find a way to do this. I looked at how a standard portal does it, but that requires a worldserver as a parameter, which I don't know how to access from there. The function the button's code runs in is as follows: public void actionPerformed(GuiButton button){ switch(button.id){ case 0: /**Button code is here**/ case 1: case 2: } } Anyone know how I would go about doing this?
-
How to Make a GUI
Vanilla code works a bit differently then mod code in some cases, so just copying and modifying it isn't usually the best option. It's better to simply make it yourself so you get the experience anyway, instead of just modifying pre-written code. A good tutorial on it is here:
-
[Solved] Changeing custom rendered item model depending on what 'mode' it's in
DEEEEEEEERRRRRRRRPPPPPPP nevermind I thought there was some strange bug making it not able to change when that was static, turns out it was working right the whole time....
-
[Solved] Changeing custom rendered item model depending on what 'mode' it's in
The problem is that I can only change what 3D model to use by making that variable static, and I can't switch modes in game with the variable being static... which defies the point having it use different models because the mode can't be changed! Even if I did use the damage I wouldn't be able to access that from RenderBeam because it isn't static
-
[Solved] Changeing custom rendered item model depending on what 'mode' it's in
I'm trying to make an item that is 3D rendered, but changes it's model depending on what 'mode' the player is in, where mode is a int in the item's file that changes how the item behaves. I have a custom renderer working, and have the item's 'mode' feature working, but have run into a roadblock in getting the custom renderer to render the right mode. The problem is, to be accessible by the renderer class, the variable 'mode' has to be static, but for the mode to be able to be changed in game, it can't be static!! I'm probs just being a stupid java noob and the answer is likely obvious to more seasoned modders, but I can't see a good way around it other than making a new item for each 'mode' and having a tick handler switch what item it is on button press (which get's VERY cumbersome and broken seeing as there are a number of upgrades for each mode, all of which are accounted for in the item file as is, but would ALL require they're own item file if I were to do this). I have been able to change the item's icon based on mode, and would assume there would be SOME way to change it's model aswell. I'll post my item and renderer file below, as well as anything else anyone asks me to put up, but I can't figure out a good solution for this! Any advice would be greatly appreciated!! Item file: And the renderer file:
-
Dimension not generating the right blocks [Solved!!]
Thanks SO much, I would have NEVER figured that out!
-
Dimension not generating the right blocks [Solved!!]
Oh lol srry, it's generating stone bricks instead of dark stone, and brown mushroom blocks as dark dirt
-
Homing projectile
I still haven't been able to get this to work, I don't know where to set up the AABB, or what to do with the entity selected
-
[MC 1.6.2] How do I make an item take damage after each use
The mod EE3 is open source and has an item that does this called the Minium Stone, I would check that out! All his code is really readable too, so it should be quite easy to track down how he did that!
-
Dimension not generating the right blocks [Solved!!]
Hello! My dimension is deciding to be stubborn, and not generate the blocks it's supposed to! I've been trying to solve this for months, with no luck! Does anyone know what's causing this? I'll put all the files relating to my dimension here: ChunkProviderDarkAether: WorldProviderDarkAgon: BiomeGenDarkAgon Do you need my main? I'll put it here just in case: Main: I'm fairly certain it's something related to my biome, because I mistakenly registered it with forge and the dark agon biome generated in the overworld, and the same thing happened http://static.minecraftforum.net//public/style_emoticons/default/wacko.png[/img] .
-
Homing projectile
Hmm ok I got the AABB set up but am not sure what to do with it, IE how to redirect my projectile towards said entity. I don't see a way to get the coords of the entity either, did I do it right? This is what I did: AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(this.posX - 16, this.posY, this.posZ - 16, this.posX + 16, this.posY + 16, this.posZ + 16); public void getNearestEntity(){ List<IMob> entities = worldObj.getEntitiesWithinAABB(IMob.class, bb); Iterator iter = entities.iterator(); while(iter.hasNext()){ if(iter.next() instanceof IMob){ IMob ent = (IMob)iter.next(); //What do I do from here? } } } Sorry if it's really obvious and i'm just really stupid, i'm still not too experienced (IK java i'm just not used to working with it in this way)
-
[1.6.2]Entity not Rendering?
I'm still having this same problem, I tried to use AnnihilatorBoltModel.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); But couldn't make a static reference to a non-static variable
-
Homing projectile
I meant I couldn't find anything about finding the nearest entity, but thanks for the idea about the AABB, i'll try it out!
-
Homing projectile
I'm trying to make a projectile that will home in on the nearest enemy, but have no idea where to start. Is there any function that can give coords of the nearest mob or something like that? I really don't know what to do, there isn't much documentation on this...
-
Dimension not generating the right blocks
Nobody? This is REALLY weird and annoying, i've been trying to solve it for over a month now and can't seem to find out what's wrong with it!!
-
Crash on world load only in release form [Solved!!]
Thanks SO much!! I looked a bit but I posted about it before a while back and since nobody responded I thought it must be some weird thing with MCP or something, and kinda just started working on other stuff...
-
Crash on world load only in release form [Solved!!]
Here you go:
-
Crash on world load only in release form [Solved!!]
When I try to test my mod in eclipse it runs fine, but outside of it I get this error: Anyone know what's causing this?
IPS spam blocked by CleanTalk.