You got diesieben wrong..he wasnt saying that you need to set kt to null. He was saying you are passing a variable in that line that is null by The time you are using it.
well this works great if I try to walk through one of those blocks. but if I stack two of them it wont let me pass and i start taking dmg, like im stuck inside a wall
Hey everyone,
I am triing to make a block that its owner can walk through. I found out that my solution might be overwriting isPassable in the class, but it seems like this isnt getting called every time someone tries to walk through.
So right now I am out of ideas and could use some input
If you want examples, here you got an example for like everything.
For everything else, start learning java, start watching tutorials on how to mod.
https://github.com/TheGreyGhost/MinecraftByExample
The event you are looking for should be GuiOpendedEvent (or sth like that) there you should check if The opened gui is The Main Menu.
Have in mind that The player comes back to The Main Menu when logging out of a game, so you should check if your player is already logged in that 3rd Party thingy
You should consider learning Java before writing a mod. It wont work any other way.
Also read guides, there are enough talking about basics like registration of blocks
You should check for !isRemote on the worldObj in your onBlockActivated, so it gets only processed on server side and the server sends all needed informations to the client.
@SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true)
public void onEvent(NameFormat event)
{
if (event.username.equalsIgnoreCase("failender"))
{
event.displayname = event.username+" the modder";
}
}
This works for me. As for changing colors.. I dont know sorry
Maybe show some code?
One way to save string Arrays to NBT is use a Standard compound, set one integer Holding the length and then writing with a loop The compound,using String.valueOf(i) as key. But there might be better ways to do so
obviously bc i am dumb.
I was just so deep in the code that I was like okay. minecraft is using one class for all the ores. so i should check for the unlocalized name. dumb me ill better go to bed now.