Jump to content

NoName_

Members
  • Posts

    17
  • Joined

  • Last visited

NoName_'s Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I have been researching existing topics related to this question for a while, but unfortunately, they are all outdated. I tried to understand the principle of such rendering from the debug code (displaying the view direction, displaying hitboxes), but to no avail. In one of the topics (Forum link) where this question was discussed, there was a reference to "some really old code, but has the relevant math" (GitHub link), which I tried to update (spoiler below), but it didn't yield any results. Nothing gets rendered. Does anyone know of projects that use custom rendering of simple shapes (lines/squares/circles) so that I can investigate their source code? Or can anyone help fix existing code? In general, any information on this matter would be helpful) More information about the code: The code is called for two blocks located on the same level. The initiation of this code call is through the RenderLevelStageEvent event, where the getStage method returns the value AFTER_TRIPWIRE_BLOCKS. The drawLine method is precisely called on the necessary blocks, and there are no error messages during this process.
  2. Is there an easy way to check if a block is intangible? I mean blocks that can be passed through, like grass, air, torch, etc.
  3. I am trying to change the position of the player's view, I can not find a method that would perform this task. I can move the character, but I cannot make him look the other way upd: before it was advised to use the fields of the object in the variable player, such as rotationYaw, but now this field is not there
  4. Perhaps the slotClick method will help, but I do not fully understand where to get the parameters to pass to the method. public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) At the end of the method: this.detectAndSendChanges(); Perhaps this will help inform the server that the location of the object has changed. First, use the method to take an item from the slot, and then to put it. This kind of imitation will be. Well, as I understand it
  5. The function simply cannot be added. There are many dependencies How to implement it? Again, I thought to mimic the transfer of things using the Robot class. But then you need to know the location of the cells (the coordinates in pixels)
  6. I do not understand how it works. This is not good. Besides, why add the whole mod if I need one function. In addition, it would not be bad to understand this issue.
  7. 1.12.2 Yes, only on the client, because it is necessary for the mod to work on other servers
  8. For example, if the tool breaks. Why is it important?
  9. User does not do anything. The mod itself under certain circumstances moves the item in the inventory.
  10. Packets? I do not know how to properly call it. (NetHandlerPlayClient and NetHandlerPlayServer) I need a method that changes the place of an item in the inventory. I do with the example of a hoe. I'm looking for a hoe in the inventory, when I found it, I move it to the first location of the inventory. for (int i = 1; i < 36; i++) { if(Minecraft.getMinecraft().player.inventory.getStackInSlot(i).getItem() instanceof ItemHoe){ Minecraft.getMinecraft().player.inventory.setInventorySlotContents(0, Minecraft.getMinecraft().player.inventory.getStackInSlot(i).copy()); Minecraft.getMinecraft().player.inventory.setInventorySlotContents(i, ItemStack.EMPTY); break; } }
  11. Minecraft.getMinecraft().player.inventory.setInventorySlotContents(0, Minecraft.getMinecraft().player.inventory.getStackInSlot(i).copy()); Minecraft.getMinecraft().player.inventory.setInventorySlotContents(i, ItemStack.EMPTY); It does not work on a server. A server does not know that I moved the item. I understand me need to use the exchange of packages?
  12. I don't know. So it will be?)) Will it work on the client side?
  13. As I understand it, this will not work?
×
×
  • Create New...

Important Information

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