Electrobob99
Members-
Posts
173 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Electrobob99
-
[1.7.2] How to check if player is in creative mode
Electrobob99 replied to Electrobob99's topic in Modder Support
ok here it is, I may have figured it out: https://gist.github.com/9bef37a383dc19a767c9.git -
[1.7.2] How to check if player is in creative mode
Electrobob99 replied to Electrobob99's topic in Modder Support
Yes I have -
[1.7.2] How to check if player is in creative mode
Electrobob99 replied to Electrobob99's topic in Modder Support
*facepalm I should have tried that, works now thank you.... Now I have a quick question, how do I get my block to spread and update. I was able to get a working spread block, but haven't been able to get it to work with metadata blocks. This is the updateTick of the working spreadBlock *based on vanilla grass: -
[1.7.2] How to check if player is in creative mode
Electrobob99 replied to Electrobob99's topic in Modder Support
Hmm, then why doesn't this not seem to work?: -
[1.7.2] How to check if player is in creative mode
Electrobob99 replied to Electrobob99's topic in Modder Support
Ok, how was I supposed to know to get that? and I'm guessing I'm not supposed to put it in the if statement, because it doesn't seem to be working This is just Ironic, I get 98s in advanced java coding courses in college, and yet this makes no sense. -
[1.7.2] How to check if player is in creative mode
Electrobob99 replied to Electrobob99's topic in Modder Support
Ok how do I do that exactly. Do I make a new PlayerCapabilities at the top like this to start it off: I just don't understand what is meant by fetch, i'm probably over thinking it *facepalm -
[1.7.2] How to check if player is in creative mode
Electrobob99 replied to Electrobob99's topic in Modder Support
I basically say this for this instance because it keeps saying: "Cannot make a static reference to the non-static field" anytime I try And this is the method where I'm trying to work it in: -
[1.7.2] How to check if player is in creative mode
Electrobob99 replied to Electrobob99's topic in Modder Support
Hmm.. Guessing you mean PlayerCapabilities.isCreativeMode... But how so. Because I know it would never work in an if statement due to certain reasons. -
Basically I want to know how I could check whether a player is in creative or not and use it within an if statement. Mainly need this because one of my blocks drops it's drop in creative upon being broken.
-
Ok, quick update. Got the breakBlock method working, thanks to a switch. But the spreading is still bugged. So any help with the block spread code would be very helpful. Said code is last code from last post.
-
So for this: I should replace par6 with meta, or do I change the int in front of it to metadata for it to work correctly? Basically how do I "use the metadata parameter passed to the method to the 6th parameter" of the method above?... And this is the current spread code that is currently borked, I've used various combos of flags:
-
Now that I'm using that breakBlock method it always seems to be taking the metadata of zero even for the other blocks of the subblocks *code posted in previous post. Also I'm trying to have these metadata blocks spread like grass, but for some reason the changes don't show until I close out of the world and reload it. How do I fix this?
-
ok, I will use breakBlock, but dumb question what are all the attributes for. Also whenever I try to get the metadata of the block It does the same thing for each block when broken.:
-
Ok, now my new question is, how to I code a block to essentially place a block in it's place. Am I correct in assuming that destroyedbyPlayer replaced the onBlockRemoval method? if so, how would I get it to happen with explosions, or is that player like?
-
Got it more or less settled, but I do want to know how I'd be able to utilize a vanilla texture as a side of my block to allow for updates to the side if the texture is changed.
-
Ok, that I know... But how do I get it to texture correctly. Like where do I put it if not in the for loop? Because even if I don't have it use the i variable but the subBlocks.length variable it still does the same thing.
-
So any ideas?
-
ok:
-
Ok tried this and now all my sub blocks have the same texture
-
Basically I want to make a set of block that looks similar to grass, but grows on other blocks, and shows the side as the grass growing on the side
-
Ok I can't seem to get this to work with my current block code
-
Well technically for now it's just a group of blocks that will spread to different block types. Like if it spreads to dirt it will change metadata and have a different texture than if it spread to sand/clay, etc.
-
You mean something like using getBlockWithMetaData with some If statements, or with a switch? Never could figure out switches
-
I'm wondering is it possible to make subBlocks with metadata also have multisided textures. I know how to do it separately, but not together. So is it possible, and if so how?
-
Ok, my question is. Is it possible to code a block to utilize 2 textures as it's texture, in which one texture is of the original block preferably transparent, and the other being the texture of the block under it? Like if my basic texture of it is similar to grass minus the dirt, and the block under it is wood, it would make the side of my block look like grass growing on wood. I think similar to Thaumcraft taint on beehives.