Why will that not work on a server? Looks like everything should...
I thought that it maybe probably might, but I wasn't sure (I've only been using Java/Forge/MCP for a week as of today), and if you're not 100% sure of something, it's a really bad idea to just pretend that you know what you're doing and go off teaching other people something that may turn out to be utterly wrong.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Oh LivingUpdateEvent was being registered as a tick handler. Going to my IDE to change that...
EDIT: It worked, now would it be possible to use the EventHandler to set shaders and option settings? (There is an "invert mouse" option which would keep your controls when flipped.)
Oh LivingUpdateEvent was being registered as a tick handler. Going to my IDE to change that...
EDIT: It worked, now would it be possible to use the EventHandler to set shaders and option settings? (There is an "invert mouse" option which would keep your controls when flipped.)
Shaders and events are separate.
There's a chance you can flip the screen without shaders using LWJGL, but worst case, you can just make your own flip-screen shader (luckily not very complicated) and copy how the super secret settings work. I'd suggest googling about how too flip the screen view in Java.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
@Override
public void onEntityCollidedWithBlock(World w, int x,
int y, int z, Entity e) {
// do gravity stuff, (use e)
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World w, int x, int y, int z)
{
return null;
}
What do you mean? Do I call the EventHandler or do I put the EventHandler code in there? Also, I don't think that will keep your gravity when you exit the block hitbox, right?
For that I'd recommend IExtendedProperties or whatever it's called, simply have a boolean FALSE by default, then when the entity goes into the block set it to TRUE. Then in you update event, check what the boolean is on the specified entity ( if TRUE change gravity if FALSE don't change it or whatever you'd like)
So, say I wanted the block to change metadata when I right clicked it with a specific tool (which would change the direction it makes you go) how would I do that? Is there some metadata integer or double that I could increase by one, until it reaches 5 and I reset it to 0?
//When the block is right clicked, check if the player is using the desired item
//then:
int meta = world.getBlockMetadata(x,y,z); //x, y, z of the block
int newMeta = (meta + 1) % 5 //(x + 1) % (modulus) n will cycle from 0 to n-1
//Now update the block metadata
world.setBlockMetadataWithNotify(x,y,z,newMeta, 3);
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
I meant could sheep and minecarts be affected by it.
So, everything is in working order but I cannot enter my block. I set it to material.air but it makes the block pretty much the same as a barrier block. isOpaqueCube is false for when I make it a TileEntity.
You aren't using the method I provided, getCollisionBoundingBoxFromPool();
that method "removes" the visual and "physical" collision, meaning you will be able to walk through it, but in the code it still triggers the entity collision thing in the blocks class.
So, how do I do that boolean thing? When the player collides with the block, it's return true, right? But then how do I get it to start out false? Sorry, I am not experienced with plain java.
EDIT: Where do I put the method? It throws errors in the class body and constructor, and making it a void method doesn't do anything.
Why will that not work on a server? Looks like everything should...
Be sure to quote my post if you want a reply.
lol @ Cameronazzi copy-pasting my sig into his
I thought that it maybe probably might, but I wasn't sure (I've only been using Java/Forge/MCP for a week as of today), and if you're not 100% sure of something, it's a really bad idea to just pretend that you know what you're doing and go off teaching other people something that may turn out to be utterly wrong.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
EDIT: It worked, now would it be possible to use the EventHandler to set shaders and option settings? (There is an "invert mouse" option which would keep your controls when flipped.)
Let's do some math.
1/3 = 0.333...
1/3 * 3 = 1
0.333... * 3 = 0.999...
1 = 0.999...
1 - 0.999... = 0.999... - 0.999...
0.0...1 = 0
0.0...1 * 10... = 0 * 10...
1 = 0
Shaders and events are separate.
There's a chance you can flip the screen without shaders using LWJGL, but worst case, you can just make your own flip-screen shader (luckily not very complicated) and copy how the super secret settings work. I'd suggest googling about how too flip the screen view in Java.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Let's do some math.
1/3 = 0.333...
1/3 * 3 = 1
0.333... * 3 = 0.999...
1 = 0.999...
1 - 0.999... = 0.999... - 0.999...
0.0...1 = 0
0.0...1 * 10... = 0 * 10...
1 = 0
if custom:
Art by me: MrPancakeWolfie@DeviantArt
What do you mean? Do I call the EventHandler or do I put the EventHandler code in there? Also, I don't think that will keep your gravity when you exit the block hitbox, right?
Let's do some math.
1/3 = 0.333...
1/3 * 3 = 1
0.333... * 3 = 0.999...
1 = 0.999...
1 - 0.999... = 0.999... - 0.999...
0.0...1 = 0
0.0...1 * 10... = 0 * 10...
1 = 0
Art by me: MrPancakeWolfie@DeviantArt
EDIT: Will that technique apply to all entities? I would eventually like all entities to be affected.
Let's do some math.
1/3 = 0.333...
1/3 * 3 = 1
0.333... * 3 = 0.999...
1 = 0.999...
1 - 0.999... = 0.999... - 0.999...
0.0...1 = 0
0.0...1 * 10... = 0 * 10...
1 = 0
Art by me: MrPancakeWolfie@DeviantArt
Let's do some math.
1/3 = 0.333...
1/3 * 3 = 1
0.333... * 3 = 0.999...
1 = 0.999...
1 - 0.999... = 0.999... - 0.999...
0.0...1 = 0
0.0...1 * 10... = 0 * 10...
1 = 0
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Every entity that can be used in the update event.
or do you mean that when one entity passes through, all entities are affected?
Art by me: MrPancakeWolfie@DeviantArt
So, everything is in working order but I cannot enter my block. I set it to material.air but it makes the block pretty much the same as a barrier block. isOpaqueCube is false for when I make it a TileEntity.
Let's do some math.
1/3 = 0.333...
1/3 * 3 = 1
0.333... * 3 = 0.999...
1 = 0.999...
1 - 0.999... = 0.999... - 0.999...
0.0...1 = 0
0.0...1 * 10... = 0 * 10...
1 = 0
that method "removes" the visual and "physical" collision, meaning you will be able to walk through it, but in the code it still triggers the entity collision thing in the blocks class.
Art by me: MrPancakeWolfie@DeviantArt
So, how do I do that boolean thing? When the player collides with the block, it's return true, right? But then how do I get it to start out false? Sorry, I am not experienced with plain java.
EDIT: Where do I put the method? It throws errors in the class body and constructor, and making it a void method doesn't do anything.
Let's do some math.
1/3 = 0.333...
1/3 * 3 = 1
0.333... * 3 = 0.999...
1 = 0.999...
1 - 0.999... = 0.999... - 0.999...
0.0...1 = 0
0.0...1 * 10... = 0 * 10...
1 = 0
Art by me: MrPancakeWolfie@DeviantArt