Everything posted by Draco18s
-
[1.7.2] java.lang.OutOfMemoryError when adding a bunch of recipes.
Huh? But to answer the question: yes, you can. But you probably shouldn't.
-
Explosion Event -- detecting / stopping / manipulating explosions?
Yes, but that's not useful in his case. He wants a block at (0,70,0) to protect blocks in a 16 block range from being damaged by explosions. So the block at (0,70,0) needs to know when an explosion goes off over at (12,70,0) so that the blocks at (10,70,0), (10,70,1), (10,70,-1), etc. don't get destroyed.
-
[1.7.2] java.lang.OutOfMemoryError when adding a bunch of recipes.
Use the ore dictionary.
-
[1.6.4]Player position problem.
int playerPosX = (int)mc.thePlayer.posX; int playerPosY = (int)mc.thePlayer.posY; int playerPosZ = (int)mc.thePlayer.posZ; What did you think was going to happen when you truncated doubles down to ints?
-
Compiled Mod Causes Error [SOLVED -> never use func_...!]
"Explicit" is the word you're looking for there.
-
[1.7.2] openGui Problem (onBlockActivated)
It means: "Bad modder. No cookie."
-
minecraft is crashing
That depends on what you want the recipe to be.
-
[1.7.2] create dimensions midgame
I don't know. I haven't delved into the mysteries of dimensions personally, I just know a handful of tangential operations that come up when using them.
-
[1.6.4] how do i move parts of the world?
Random question: Does your structure API handle sand held up by torches?
-
minecraft is crashing
Also please don't put your mod inside the minecraft package...
-
Compiled Mod Causes Error [SOLVED -> never use func_...!]
Ditto. The error is a NoClassDefFoundError which is stemming from a ClassNotFoundException, which I pretty sure is a missing class, not a badly-reobfuscated* func_ *For some value of "badly."
-
Creating new flowers...
No they don't. Whoever said that was dumb. Anyway, TileEntities are for blocks that need to know more information than the limits of metadata. Like the furnace or a chest. TEs can also be used for things that need complex rendering, like BuildCraft's engines.* Though such things should be used sparingly as TEs have a higher overhead than regular blocks. *Which have extra data associated with them too, but the comparison is still accurate.
-
[1.6.4] how do i move parts of the world?
Torches, doors, pistons all tended to fail more often than not. As for entities, there's a function something along the lines of setPositionAndUpdate. Given that I was just doing it because I could, I didn't care if it failed in some situations.
-
[1.7.2] create dimensions midgame
Yeah. You do. nextAvailableDim just tells you what dimID is available.
-
[1.7.2] create dimensions midgame
So create a dimension like you would at any other time. There's a function for nextAvailableDim, but you'll have to look for it. Check the DimensionManager. If you don't know how to create a dimension at all, then you need to take baby steps and start simply.
-
[1.6.4] how do i move parts of the world?
I sliced across time. Rather than using a loop, I had a variable that incremented every time the entity got an update, and that was the Z value (or X or Y, depending on how you want to do it) for that time slice. Essentially, first I'd read, taking an approximated "height" of the landscape (so looking for known-natural blocks like dirt, stone, and sand). Next I'd wait for player input for the destination (actually, a direction to look, whereupon it would scan farther and farther away looking for a valid place to plop things down; ie. above water), then I'd scan the destination for landscape height (the same way), then the blending on those two matricies, then I'd place the old blocks in the new location, then I'd go back and delete the old blocks. Last, I attempted to teleport non-block entities. It wasn't perfect though. Due to the fact that I couldn't build bottom up (the place-blocks to achieve desired landscape in the blended areas only had a height value and stopped placing blocks by going down on Y until a stop condition) and that my time slices were across Z, it had trouble placing torches (and other can-stay-here blocks like rails), gravity effected blocks (top down, remember?), and pistons. If the piston head was copied/deleted before the base I wouldn't get a base.
-
Any one have an idea how to do this?
Pretty sure that ISimpleBlockRenderingHandler works the same in 1.7 as it does in 1.6, given that it's an fml class.
-
Make a block with a lightlevel >15
canBlockSeeTheSky just does a loop check looking for not-air blocks* until it hits the world ceiling. If it finds one, it returns false. If it doesn't, it returns true. *Pretty sure it doesn't do fancy things like looking for entirely transparent blocks. Been a while since I looked at it.
-
Any one have an idea how to do this?
You want to render something. Without a renderer. No. That is not possible. There's also this nice thing called an ISimpleBlockRenderingHandler. It renders cubes.
-
Make a block with a lightlevel >15
That function exists in 1.6 as well. It's just another way to specify 0-15.
-
[1.6.4] how do i move parts of the world?
Wow. I missed this thread. Only a week after you started it, look at what I did: http://binarymage.com/forum/viewtopic.php?f=10&t=1882
-
[1.6.4] Block registers twice?
Slot 259 is already occupied by net.minecraftforge.common.MinecraftForge$1@760881b1 <-- not your block Use a different ID.
-
[1.7.2] Updating GUI
Seriously, you can't figure this out? Use a damn integer. int myInt = 10; String myString = "This value is: " + myInt; Integers can be added to and subtracted from and will update in the GUI just fine.
-
[1.7.2] Block, for specified player
Hmm. That is true. In which case: Hope you don't need a lot of them.
-
[1.7.2] Block, for specified player
You've got the same access with a ISimpleBlockRenderingHandler as you do with a TileEntity, by the way: neither are passed a player reference at any point during rendering. (ISimpleBlockRenderingHandler renders normal blocks, normal blocks take up less CPU to keep in the world) And given that rendering stuff is client side, that would be an appropriate use for Minecraft.getMinecraft().thePlayer
IPS spam blocked by CleanTalk.