Jump to content

ZhabaKlava

Members
  • Posts

    17
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ZhabaKlava's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks but unfortunately I do not own the server so I can't change any files there. I'll ask the administrator to change my player's dimension when he will appear online, but I was looking for a quick solution to proceed playing as soon as possible.
  2. I'm trying to get out of some dimension provided by the mod which isn't mine. Basically I went to it's portal and when I appeared in that dimension my client crashed. Now it is constantly crashing when I'm logging in to the server. It's a bug in that mod. And I am currently trying to get back to the Overworld. What I really need is just to send single chat message before crash so the server could teleport me to the Overworld
  3. So, for some crazy reason I need to keep minecraft client running despite any encountered "exception" and so on. I have to not get it crashed even if the most terrible things occurred. How can I do this?
  4. Yeah, but what about survival. You can't attack within 4 blocks which is block reach distance in survival mode. EDIT: I see it is possible within less than 4. But the code doesn't check if you are in creative mode, so you can attack within less than 6 blocks while being in survival mode using cheats.
  5. But using legal mouse clicks it is not possible to attack even within 4 blocks, is it? The code is from 1.7.10 but I guess this behavior hasn't changed in further versions.
  6. Let's consider the class net.minecraft.network.NetHandlerPlayServer The method processUseEntity handles interactions with entities: public void processUseEntity(C02PacketUseEntity packetIn) { WorldServer worldserver = this.serverController.worldServerForDimension(this.playerEntity.dimension); Entity entity = packetIn.getEntityFromWorld(worldserver); this.playerEntity.markPlayerActive(); if (entity != null) { boolean flag = this.playerEntity.canEntityBeSeen(entity); double d0 = 36.0D; if (!flag) { d0 = 9.0D; } if (this.playerEntity.getDistanceSqToEntity(entity) < d0) { if (packetIn.getAction() == C02PacketUseEntity.Action.INTERACT) { this.playerEntity.interactWith(entity); } else if (packetIn.getAction() == C02PacketUseEntity.Action.ATTACK) { if (entity instanceof EntityItem || entity instanceof EntityXPOrb || entity instanceof EntityArrow || entity == this.playerEntity) { this.kickPlayerFromServer("Attempting to attack an invalid entity"); this.serverController.logWarning("Player " + this.playerEntity.getCommandSenderName() + " tried to attack an invalid entity"); return; } this.playerEntity.attackTargetEntityWithCurrentItem(entity); } } } } Why does it allow to attack within 6 blocks? What is going to break in the game if I skip attacks with distance more than 2 or something like that?
  7. I achieved my goal using playerController.windowClick. Thanks
  8. So the class EntityPlayer has the field inventoryContainer. That's what you're telling me about, right? I've tried to do some manipulations with slots, however it seems that the server doesn't allow me to do that in such a way or doesn't know what I've done there. //Take 2 items from the first slot in the hotbar. Just imagine you have 2 stone blocks in your first hotbar slot ItemStack s1 = player.inventoryContainer.getSlotFromInventory(player.inventory, 0).decrStackSize(1); ItemStack s2 = player.inventoryContainer.getSlotFromInventory(player.inventory, 0).decrStackSize(1); // |1|2| //Now put obtained ItemStacks to the crafting grid. It has the following slot numbering: |3|4|. Craft result slot is number 0 player.inventoryContainer.putStackInSlot(1, s1); player.inventoryContainer.putStackInSlot(2, s2); //Finally put the result to the first hotbar slot player.inventory.addItemStackToInventory(player.inventoryContainer.getSlot(0).decrStackSize(0));
  9. It should get crafted on some event. If that matters, I need it to get crafted on PlayerTickEvent when some conditions are satisfied. And the output should go to the player's inventory, preferably some empty slot in the hotbar.
  10. I need to craft exactly the stone pressure plate and nothing else.
  11. Let's suppose I have two stone blocks in the player's inventory. How can I now craft stone pressure plate without a human interaction?
  12. I think I already found. Just to confirm - I can see this in the method "addEntityToTracker" of the class "net.minecraft.entity.EntityTracker", right?
  13. Thanks, that's what I need to know. And yet one thing, where in the source code can I find that fact?
  14. Undoubtedly sounds like a cheat mod. Actually, I want to make a command that is able to list all players which are inside a sphere centered at the player with radius R, where R is an argument of my command (e.g. /near 500). Maybe I just need to bound R variable. Anyway I would like to know what players are included in the list.
  15. I need my mod, which is client-side only, to retrieve and process posX, posY and posZ of every player on the server. I found some list I think is appropriate Minecraft.getMinecraft().theWorld.playerEntities; After some tests I figured out that there are indeed some players but not all. The list is missing the players which are far away from me or something like this. I don't really understand what criteria a player has to meet to be in that list. Is it some kind of security feature not to give such an information to a client?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.