CopperGolem 5.46.0
Extends Mob
Bedrock values (entities/copper_golem.json, 1.21.110): 12 health, 0.6x0.98, movement 0.2, panics at 1.5x, wanders. Moves items from copper chests to chests (see CopperGolemTransportItemsGoal); the carried items are shown in its hand, dropped when it dies and handed to a player who interacts with an empty hand. Oxidizes one stage every 420-460 minutes (actor property minecraft:oxidation_level, vanilla 504000-552000 ticks) unless waxed with honeycomb; an axe removes the wax or scrapes off one stage, and so does a lightning strike. Once fully oxidized, every tick has a 0.58% chance to turn it into an oxidized copper golem statue facing the same way (vanilla CopperGolem.turnToStatue), if its block is free; scraping an unoxidized statue with an axe brings it back (see \pocketmine\block\CopperGolemStatue). Can wear a poppy (minecraft:has_flower), sheared off. Loot (loot_tables/entities/copper_golem.json): 1-3 copper ingots, plus the poppy. Pressing copper buttons is not implemented.
Constants
OXIDATION_LEVELS
public const OXIDATION_LEVELS = ["unoxidized", "exposed", "weathered", "oxidized"]OXIDATION_MAX_TICKS
public const OXIDATION_MAX_TICKS = 552000OXIDATION_MIN_TICKS
public const OXIDATION_MIN_TICKS = 504000Ticks between two oxidation stages (vanilla nextIntBetweenInclusive(504000, 552000)).
TAG_HAS_FLOWER
public const TAG_HAS_FLOWER = "HasFlower"TAG_OXIDATION
public const TAG_OXIDATION = "OxidationLevel"TAG_OXIDATION_TIMER
public const TAG_OXIDATION_TIMER = "OxidationTimer"TAG_WAXED
public const TAG_WAXED = "IsWaxed"TURN_TO_STATUE_CHANCE
public const TURN_TO_STATUE_CHANCE = 0.0058Chance per tick for a fully oxidized golem to turn into a statue.
Methods
canBeLeashed()
public function canBeLeashed() : boolentityBaseTick() protected
protected function entityBaseTick(int $tickDiff = 1) : boolgetDrops()
public function getDrops() : arraygetInitialSizeInfo() protected
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
public function getName() : stringgetNetworkTypeId()
public static function getNetworkTypeId() : stringgetOxidationLevel()
public function getOxidationLevel() : inthasFlower()
public function hasFlower() : boolinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisWaxed()
public function isWaxed() : boolonInteractWithItem() protected
protected function onInteractWithItem(\pocketmine\player\Player $player, \pocketmine\item\Item $item) : boolonStruckByLightning()
public function onStruckByLightning(\pocketmine\entity\object\LightningBolt $bolt) : voidLightning scrapes off one oxidation stage (vanilla CopperGolem.thunderHit), besides the usual damage.
registerGoals() protected
protected function registerGoals() : voidsaveNBT()
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsetChestInteraction()
public function setChestInteraction(string $interaction) : voidSets the chest animation (actor property minecraft:chest_interaction): one of the CopperGolemTransportItemsGoal::INTERACTION_* values.
setHasFlower()
public function setHasFlower(bool $hasFlower) : voidsetOxidationLevel()
public function setOxidationLevel(int $level) : voidsetWaxed()
public function setWaxed(bool $waxed) : voidturnToStatue()
public function turnToStatue() : boolReplaces the golem with an oxidized copper golem statue facing the same way, if its block is free (vanilla CopperGolem.canTurnToStatue). The held items drop.
