
chimera27
Members-
Posts
158 -
Joined
-
Last visited
Everything posted by chimera27
-
---------------
-
[1.7.10] "Something's taking too long!" using simplest mod class
chimera27 replied to Elyon's topic in Modder Support
--------------------------------- -
-------------
-
----------------
-
----------------
-
----------------
-
----------------
-
Did you make sure the part of the code stopping it is actually running? If it's actually being run, then you might wanna try e.setVelocity(0, 0, 0); that's what I normally use to modify velocities
-
----------------
-
---------------------
-
---------------------
-
[1.7.2][unsolved]Generating custom "vines"?
chimera27 replied to dude22072's topic in Modder Support
Under generate, just do: boolean shouldPlace = false; if(world.getBlock(xCoord + 1, yCoord, zCoord) == Blocks.wood)/** Or whatever block **/{ shouldPlace = true; } } if(world.getBlock(xCoord, yCoord, zCoord + 1) == Blocks.wood)/** Or whatever block **/{ shouldPlace = true; } } if(world.getBlock(xCoord - 1, yCoord, zCoord) == Blocks.wood)/** Or whatever block **/{ shouldPlace = true; } } if(world.getBlock(xCoord, yCoord, zCoord - 1) == Blocks.wood)/** Or whatever block **/{ shouldPlace = true; } if(shouldPlace){ world.setBlock(yourBlockName); //Or whatever function to generate the block } Keep in mind I just did this on the fly and you WILL have to modify it a bit, but you should be able to handle that... Another thing, the thing you're trying to do will be inherently laggy because it will likely have to run this code for EVERY block (or some constraint of blocks, like every block between y = 50 and y = 90 or whatever). This would apply to almost any solution for this though. (Unless you want the vines to only generate on your custom trees, in which case you could just make the vines generate as part of the tree and it would make about 8039x more sense then this ) -
Suggestions for creating a sword that gets stronger upon a kill.
chimera27 replied to Terraform's topic in Modder Support
The item's NBT is stored for that instance of the item, if you want it to be a stat that will stay even if the player looses their sword and makes a new one, you'll need an extendedplayer. There are a few tutorials on how to do that, they basically store an NBT to the player that will persist through relog, and if you want it to, player death -
----------------
-
[1.7.2][unsolved]Generating custom "vines"?
chimera27 replied to dude22072's topic in Modder Support
I would just make a world generator for your vines, and right before the setBlock function add a test to make sure one of the blocks next to it is wood. Here's a descent tutorial on adding worldgen: http://www.minecraftforge.net/wiki/Adding_World_Generation -
Suggestions for creating a sword that gets stronger upon a kill.
chimera27 replied to Terraform's topic in Modder Support
I would use a NBT compound for storing the kill count, a good tutorial for those is right here: http://www.minecraftforge.net/wiki/How_to_use_NBT_Tag_Compound -
How to make a weapon [gun] fire faster than default speed?
chimera27 replied to HappleAcks's topic in Modder Support
int tickssinceshot = 0; if(tickssinceshot = 0){ Do crap Tickssinceshot = 4; } Else { Tickssinceshot--; } Problem solved. -
Kind of a hacky solution, but you could make a custom air block or something of the sort generate at the max height of your dimension that is transparent but reduces the light level passing through it (I think there's an easy way to do this in the block, something along the lines of getTranslucency() that you can override)
-
How to make a weapon [gun] fire faster than default speed?
chimera27 replied to HappleAcks's topic in Modder Support
Why are you trying to store ticks in use as the max use duration? After your constructor, put int tickssincefired = 0; Then in the onUsingItem method put if (tickssincefired = 4){ //Fire the bullet }else { tickssincefired++; } I don't know why you're trying to store it somewhere, it doesn't need to persist across relog or anything like that, and that variable won't get reset any time other then that. -
How to make a weapon [gun] fire faster than default speed?
chimera27 replied to HappleAcks's topic in Modder Support
Just add a variable in your item class called tickssincefired, and every tick increase it by one, and if it = 4 then fire a bullet and set it to 0. This is basic logic.