Electrobob99
Members-
Posts
173 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Electrobob99
-
OK great news, I finally got the code to work, so simple I passed it over, all I had to do was add a Boolean that is set to false at the start of the class, then make it get set to true in the onBlockDestroyedByPlayer method, and then have the Boolean as one of the attributes of the if statement within the onNeighborBlockChange method. Really shrunk my old code. Who needs it to break in a 3x3x3 cube.
-
Hmm... So going to assume I should use a for loop to simplify the checking of blocks on each side and make each block set themselves to air? But wouldn't this make the blocks break if any neighbor change, like if you break a stone that is next to said block? Also it seems that when I use a code similar to this: I don't seem to be able to make a block break in a 3x3x3 cube. What's wrong with it? edit-- Ok I have tried to make it check the blocks around it I think, but now it makes it so when I place any block near one of mine it makes the ones it directly touches to disappear. This is the code:
-
hmm, so guessing it's not possible to make a block (when destroyed by player) to break all blocks of itself. Like if you lay a block in an indefinite line and break one of them anywhere in said line it would result in the whole line breaking, and giving the drop at the one broken only?
-
I've been wondering for a while. Would it be possible to make a block to detect if a block touching it is broken or set to air. Because I currently have a block that breaks nearby blocks of it's name, but I would like to try to make it cause all blocks of itself that it is touching... I can assume it has to do with NeighborBlockchange, or similar method, but not sure how to do it. I will say, sugarcane and cactus could be a similar comparison, except it needs to not drop items, except for the one destroyed by player.
-
I've been trying in vane to simplify a code of mine to make a certain block spread. Started with basic vanilla grass code, which allowed me to speed up the spreading to see if I coded right, which worked. But I thought about changing it so it wouldn't spread as randomly, but within a flat 3x3 square. I was able to code a working code for that, but no matter what I seem to try it doesn't seem to spread at all. Codes below: Vanilla's updateTick method: Current modded updateTick method: And I'm not asking for code, I'm asking for explanation, please help this has been bugging me.
-
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
So I'm still trying to simplify this code within my spreading block: And this code is within this after this code in the updateTick method with old vanilla grass spread commented out: I would appreciate any help given -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
anyone? -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
So, how do I get it to work neatly? -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
Or what are you asking? -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
Basically I want it to be able to spread to certain blocks that are next to each of it's sides except for direct top and direct bottom of the block that does this. And possibly turn other blocks into a block of a different metadata. Like block B turns into Block A.0, block C turns into block A.1, etc -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
hmm, so how do I fix it? because I just modified the code that worked from the BlockGrass class, and it did seem to speed up when I changed the basic code from 4 to 97? -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
Ok this is from the updateTick Method of my block class with the code suggested: I also plan to use similar working code for a block to be able to "destroy" not mine blocks nearby if those blocks are the same within a 3x3x3 cube area, which would reside within a onBlockDestroyedByPlayer method. -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
Ok, I may have put it in the wrong place, because for some reason it doesn't seem to spread now. I put the new code in the for (int l = 0; l < 97; ++l) method where I changed the default growth speed of '4' to 97 to see effects quicker than grass growth. can I know why it doesn't spread now? -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
Ok, I've gotten the hang of making a spreading block, and wanted to make it spread in a more controlled state, i.e only turn blocks surrounding it in a 3x3 area, and the following code does work, but I would like to know if there is a way I could simplify this, since I want it to turn certain blocks into other different blocks, may use subBlocks with metadata: *vanilla blocks as placeholders -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
Ok, now I have figured out how to utilize metadata to create subBlocks, aswell as multisided textures for blocks. Now I need a little help in a few things. For one I wouldn't mind a bit of an explanation on how to code a block that spreads like grass and why it does it. As well as how to make a specified block texture to rotate towards the player when placed, like a furnace. I mean I could look at the vanilla codes, but some of it doesn't make sense completely. Any help is appreciated -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
Thank you, I thought that would be what I had to do... Also would I do something similar to that if I wanted a certain block to break and drop itself when hit by or touching water source/still, without changing it's material to circuits? And would it be possible to allow the placement of torches on the side of a block with the material set to glass? Also another question... I'm trying to make a block mineable by Iron Pickaxe and up, but for some reason the gold pickaxe won't mine it aswell, how could I get that to work. Also for future usage, how can I utilize the ore dictionary for my blocks and items, as well as how to use metadata for blocks? -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
Well I was able to get it to work with this coding : and following it with the method to run when it's destroyed, though it does seem to only break the blocks right next to it, and not every block of it that is touching -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
No I mean if I want to make a single class for similar blocks, like a glass type, and I want to have this ability only happen for one of the types of glass based on name, what could I do? Also how could I have a given attribute from a method go to another method in a block class? -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
would it be possible to utilize that in an if statement? edit-- ok, seems that even with that code in the latest recommended version, it still seems that the block doesn't destroy other blocks next to it that are the same block. Other words, what I want it to be able to break other blocks that are the same as itself when they are touching, or do I just utilize similar code from old code -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
hmm.. welp, I tried to get the Duplex block to work, so far I have been able to replicate the 9 drop ratio. But I can't for the life of me get the old ability that occurs after it's broken to break all connecting blocks of itself and only drop 9. This is the code of it from 1.2.5 that I assume dealt with the ability, probably changed with updates: And this is what someone who ported it to 1.6.4 changed it to: also for future reference.. How would I get to setting up blocks with metadata? any help is appreciated -
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Electrobob99 replied to Electrobob99's topic in Modder Support
I thought that was what I had to do, I just have to hope that I can figure out some of the stuff the original modder added. -
As the subject suggests, I would like some advice on porting a mod to 1.7.2 and possibly beyond. The mod I plan to port is open Sourced, and went by the name of Rise of The Automatons, and stopped being Officially updated in 1.2.5 minecraft. I have ideas for it that could change it drastically, which is one reason for my efforts. I may just need a push in the right direction, or the source is really jumbled. All I know is the source code is quite incoherent for me atleast. Any help will be appreciated.