I'm new to forge so sorry if this is a bad question I couldn't find anything else, rn i'm trying to use mc.player.world.addBlockEvent(), I need pos, block, eventid, and eventparam, i'm wondering what event id and event param is and what I should put in there, thanks.
that's rly it, How can I place a block like a player would. rn I have position in inventory, specifically hotbar if that would be of any importance, thx.
1 I know, that's why I said that I only used them in not java
2 I know, i'm wondering if there a variable I can shorten them into, like creating public minecraft mc = Minecraft.getMinecraft(), I tried with double but it kept crashing for some reason
note: is there also a way to put these in a vector, by vector I mean multiple cords, like vector4<cord1, cord2, cord3, cord4> (only used these in unity c# so sry if I'm completely wrong with the syntax
kiuo.23 When you use i, it won't use a variable called i, it will create a new intiger because i is what a new intiger is called, it's just a throwaway, Capital I is not i, so it won't create a new variable and will use a variable that is called I.
1 let's just ignore the first point it doesn't matter
2 well I don't know what your saying then, it seems like I'm doing what you said but I guess i'm not, could you go into a bit more detail thx, specifically wdym by "instances", thx.
1 if I use i as an intiger, it create a new thing i bcs it's just what java does, if i use CAPITAL I it doesn't and I can use my custom variable
2 that's what it does (I think), it gets the stack in slot I, which will increase 9 times from 0-8, and then it sees if it's equal to "obi" aka new ItemStack(Blocks.OBSIDIAN)
(1) i is a generic integer, capital I is not, so I made an int I because it was simple and easy to remember
(2) I know, I assume getSTACKinslot would use an itemstack, I made a new itemstack(Blocks.OBSIDIAN) and named it obi.
how would I do that in a for loop, I tried to solo it but i'm dum so I only got this
for(int i = 0; i<9; i++) {
I++;
if(mc.player.inventory.getStackInSlot(I) == obi) {
System.out.print("workin fine :D");
Debug.log("workin fine :D");
}
}
note: i isn't I, I is a int I made for this