You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
for this goal, mobchip.ai.goal.PathfinderRemoveBlock, the constructor takes in a Bukkit Block
The actual NMS goal takes in an NMS Block (which in Minecraft land represents the type of a BlockState)
I noticed internally you are doing this: ((CraftBlock)p.getBlock()).getNMS().b()
This is essentially getting the NMS BlockState (or IBlockData as Bukkit calls it) and then getting the NMS Block to use in the NMS goal
The issue with this contractor is you'd have to use a Bukkit Block actually placed in the world, which may never actually exist for a type we may want.
What I would like to recommend is having a constructor using Bukkit's BlockData and/or Bukkit's Material so that we don't have to reference a specific block in the world.
CraftBlockData has a method getState() which returns BlockState (IBlockData) which you could get the Minecraft Block required for the Minecraft goal. CraftBlockData#getState().getBlock() or CraftBlockData#getState().b()(when obfuscated)
Jesus I can blab on, I really hope that makes sense to you.
The text was updated successfully, but these errors were encountered:
for this goal, mobchip.ai.goal.PathfinderRemoveBlock, the constructor takes in a Bukkit Block The actual NMS goal takes in an NMS Block (which in Minecraft land represents the type of a BlockState) I noticed internally you are doing this: ((CraftBlock)p.getBlock()).getNMS().b() This is essentially getting the NMS BlockState (or IBlockData as Bukkit calls it) and then getting the NMS Block to use in the NMS goal
The issue with this contractor is you'd have to use a Bukkit Block actually placed in the world, which may never actually exist for a type we may want.
What I would like to recommend is having a constructor using Bukkit's BlockData and/or Bukkit's Material so that we don't have to reference a specific block in the world. CraftBlockData has a method getState() which returns BlockState (IBlockData) which you could get the Minecraft Block required for the Minecraft goal. CraftBlockData#getState().getBlock() or CraftBlockData#getState().b()(when obfuscated)
Jesus I can blab on, I really hope that makes sense to you.
After some investigating, I have come to the following conclusion:
PathfinderRemoveBlock's Block Field represents a Material, not a BlockData instance, because there is usually a map of properties that represent the additional data used in BlockData (without it it's just represented as a Material), i.e. Advancements.
I'm going to add a constructor for a Material and deprecate some API methods, but it's not possible to convert from the Block instance to a BlockData interface.
Feature Type
Optimization
Description of Feature
Ok let me try keep this short and simple.
for this goal, mobchip.ai.goal.PathfinderRemoveBlock, the constructor takes in a Bukkit Block
The actual NMS goal takes in an NMS Block (which in Minecraft land represents the type of a BlockState)
I noticed internally you are doing this:
((CraftBlock)p.getBlock()).getNMS().b()
This is essentially getting the NMS BlockState (or IBlockData as Bukkit calls it) and then getting the NMS Block to use in the NMS goal
The issue with this contractor is you'd have to use a Bukkit Block actually placed in the world, which may never actually exist for a type we may want.
What I would like to recommend is having a constructor using Bukkit's BlockData and/or Bukkit's Material so that we don't have to reference a specific block in the world.
CraftBlockData has a method
getState()
which returns BlockState (IBlockData) which you could get the Minecraft Block required for the Minecraft goal.CraftBlockData#getState().getBlock()
orCraftBlockData#getState().b()
(when obfuscated)Jesus I can blab on, I really hope that makes sense to you.
The text was updated successfully, but these errors were encountered: