Everything posted by ipsq
-
Intercepting Packets sent from the server to the client
Could you give an example of that? I'm not experienced with the reflection api..
-
Intercepting Packets sent from the server to the client
I'm creating a mod that is completely client side so modding the server side is not an option. I'm not altering the players health, I'm acting based on the current (nothing with the player itself).
-
Intercepting Packets sent from the server to the client
Is it possible to overwrite the standard packet handler from Minecraft? So I can alter the way the client handles stuff like health changes etc.?
-
Multiplayer Events
So those events are server side only? Is there a way to intercept the packets that the server sends to the client in case of stuff like health change etc?
-
Multiplayer Events
Do all events from Forge also work in multiplayer servers? @SubscribeEvent public void onHurt(LivingHurtEvent e) { System.out.println(e.entity.getClass()); } I find this doens't work in multiplayer servers. Is this correct?
-
Debugging in online mode
Ok, and does it matter if the account is migrated? Do I have to specify email or username?
-
Debugging in online mode
How do I debug in online mode? What steps do I have to take and what parameters do I have to add to my run configuration? I couldn't find anything on the wiki or the forum about this.
-
[1.7.10] Check if icon of two items is the same
Because my mod is mostly used on multiplayer servers I have to account for the fact that the item in question can sometimes have a different name etc.
-
How can I get the location of the master block in a multiblock? [SOLVED]
You don't need those parameters, this is the fixed code: @Override public TileEntity createNewTileEntity() { return new TileEntityDistillationChamberGag(); } @Override public TileEntity createNewTileEntity() { return new TileEntityDistillationChamberGag(new TileEntityDistillationChamberFrame()); }
-
How can I get the location of the master block in a multiblock? [SOLVED]
When you create the class, you could pass in the reference in the constructor and then assign it to a property. You could also create a method in the class that accepts the reference and does something with it. There are numerous ways to pass along reference to instances. ClassCastExceptions arise when one tries to cast an instance of an ObjectA to ObjectB when ObjectA doesn't extend or implement ObjectB. For example if you have an ArrayList, a ClassCastExceptions will be thrown when you try to cast this to a Map. A good way to prevent this is to check before you cast: if (ObjectA instanceof ObjectB) { /** Do your stuff **/ } NullPointers arise when one uses a variable or a property while it hasn't been assigned yet. So if you create a variable like `String foo;` or `String foo = null;` and you start calling methods on it like foo.equalsIgnoreCase("bar") it throws an exception because foo is used as a string while it's a null. When you come across this a lot, try assigning values in your constructors more or make sure a value has been set before using it: if (foo != null) { /** Do your stuff **/ } Hope this helps.
-
[1.7.10] Check if icon of two items is the same
So since stuff like iconString and unlocalizedName are protected and there isn't an easy way to get those (plus I'm not sure if Bukkit gives those items another name then default, then this value might differ), is there maybe a way to compare the itemIcon property?
-
How can I get the location of the master block in a multiblock? [SOLVED]
If the field is public and you have a reference to that class, it's pretty straightforward.
-
[1.7.10] Right Clicking an item in the hotbar
I already found a working solution. Thanks for the help anyway!
-
[1.7.10] Right Clicking an item in the hotbar
I just want to to trigger a right click action on this item. The server needs to know I pressed the right mouse button. There is nothing going on, on the client side.
-
[1.7.10] Right Clicking an item in the hotbar
public ItemStack useItemRightClick(World p_77957_1_, EntityPlayer p_77957_2_) { return this.getItem().onItemRightClick(this, p_77957_1_, p_77957_2_); } public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { return p_77659_1_; } This doesn't appear to do a lot?
-
[1.7.10] Right Clicking an item in the hotbar
How do I do it then?
-
[1.7.10] Right Clicking an item in the hotbar
I want to trigger it and I already found it. For the peeps interested: minecraft.playerController.sendUseItem(player, player.getEntityWorld(), inventory.getCurrentItem());
-
[1.7.10] Right Clicking an item in the hotbar
Is there a way to right click an item in the hotbar? I'm not talking about food, I want to right click a stick. Is this possible?
-
Selecting a hotbar slot
I'm not trying to destroy an item. I'm trying to select a hotbar slot.
-
Selecting a hotbar slot
Neither this: player.inventory.currentItem = 0; Nor this: player.inventory.changeCurrentItem(0); Appears to be working...
-
Selecting a hotbar slot
But does this spawn a new item or does it just select it?
-
Selecting a hotbar slot
I'm trying to select a hotbar slot with a certain item in it by first grabbing the inventory and scanning through the list of items to find a match. If I find a match, I want to select this slot but this is where I'm stuck. I can't find any method in the Inventory or Player API that let's me do that. Is this possible or did I overlook something?
IPS spam blocked by CleanTalk.