May 27, 20214 yr Author im not talking about spawning mods items. I want to make a mod that spawns a item. I'm making a block that mines blocks but right now you cant get the blocks it has ben mined I could use invtorys but I want to be simple so I want to spawn items on top of the block instead.
May 27, 20214 yr 20 minutes ago, Arealcoder said: im not talking about spawning mods items. I want to make a mod that spawns a item. I'm making a block that mines blocks but right now you cant get the blocks it has ben mined I could use invtorys but I want to be simple so I want to spawn items on top of the block instead. create a new ItemEntity and and it to the world
May 28, 20214 yr 5 hours ago, Luis_ST said: create a new ItemEntity and and it to the world It's easier to use InventoryHelper#spawnItemStack also note that BlockPos stand for the bottom corner of the block, you need to properly offset the spawning position
May 28, 20214 yr 7 hours ago, Arealcoder said: I'm making a block that mines blocks but right now you cant get the blocks it has ben mined Within the method that performs the mining action you can find a list of ItemEntities mined with getEntitiesWithinAABB() of the block's position, and filter to only find dirt, stone, etc. Once you have the entities you can teleport them to the block position above the mining block with teleportTo() or something similar. Edited May 28, 20214 yr by urbanxx001
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.