dfpyre 0.8.1__tar.gz → 0.8.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dfpyre might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dfpyre
3
- Version: 0.8.1
3
+ Version: 0.8.2
4
4
  Summary: A package for creating and modifying code templates for the DiamondFire Minecraft server.
5
5
  Home-page: https://github.com/Amp63/pyre
6
6
  License: MIT
@@ -116,7 +116,7 @@ The following program sends a message to all players and gives a player 10 apple
116
116
  from dfpyre import *
117
117
 
118
118
  player_event('Join', [
119
- player_action('SendMessage', '%default has joined!', target=Target.ALL_PLAYERS)
119
+ player_action('SendMessage', '%default has joined!', target=Target.ALL_PLAYERS),
120
120
  player_action('GiveItems', Item('apple', 10))
121
121
  ]).build_and_send('codeclient')
122
122
  ```
@@ -364,7 +364,7 @@ Example:
364
364
  from dfpyre import *
365
365
 
366
366
  name_parameter = parameter('name', ParameterType.TEXT)
367
- function('SayHi', name_parameter codeblocks=[
367
+ function('SayHi', name_parameter, codeblocks=[
368
368
  player_action('SendMessage', 'Hello, ', Variable('name', 'line'))
369
369
  ])
370
370
  ```
@@ -98,7 +98,7 @@ The following program sends a message to all players and gives a player 10 apple
98
98
  from dfpyre import *
99
99
 
100
100
  player_event('Join', [
101
- player_action('SendMessage', '%default has joined!', target=Target.ALL_PLAYERS)
101
+ player_action('SendMessage', '%default has joined!', target=Target.ALL_PLAYERS),
102
102
  player_action('GiveItems', Item('apple', 10))
103
103
  ]).build_and_send('codeclient')
104
104
  ```
@@ -346,7 +346,7 @@ Example:
346
346
  from dfpyre import *
347
347
 
348
348
  name_parameter = parameter('name', ParameterType.TEXT)
349
- function('SayHi', name_parameter codeblocks=[
349
+ function('SayHi', name_parameter, codeblocks=[
350
350
  player_action('SendMessage', 'Hello, ', Variable('name', 'line'))
351
351
  ])
352
352
  ```
@@ -0,0 +1,16 @@
1
+ from typing import Literal
2
+
3
+ PLAYER_ACTION_ACTION = Literal['SetHotbar', 'SetReducedDebug', 'CloseInv', 'GiveItems', 'NoKeepInv', 'SetHandCrafting', 'BossBar', 'SetBossBar', 'ParticleSphere', 'SetVelocity', 'Particle', 'AddInvRow', 'NoNatRegen', 'DisplayLightning', 'Damage', 'SendAnimation', 'SetXPProg', 'SetInventory', 'TpSequence', 'Heal', 'SetSpawnPoint', 'SetInventoryKept', 'LaunchUp', 'GetTargetEntity', 'ForceFlight', 'LoadInv', 'ChatStyle', 'ChatColor', 'Kick', 'ProjColl', 'MiscAttribute', 'SpectateTarget', 'HurtAnimation', 'SurvivalMode', 'GmSurvival', 'DisplayBellRing', 'SetStatus', 'SetCursorItem', 'SetAbsorption', 'SetFireTicks', 'CombatAttribute', 'SetGamemode', 'RemoveInvRow', 'WakeUpAnimation', 'DisableBlocks', 'SetScoreObj', 'L SetHealth', 'ParticleEffect', 'ClearInv', 'SetFreezeTicks', 'SetGliding', 'SetRotation', 'ClearItems', 'SetFlying', 'DisplayBlockOpen', 'SetHandItem', 'SendAdvancement', 'ClearChat', 'SetMenuItem', 'LaunchToward', 'SetArmor', 'DisplayGateway', 'GiveSaturation', 'DisplayEquipment', 'GiveExp', 'FaceLocation', 'ClearScoreboard', 'ActionBar', 'SetChatTag', 'ShiftWorldBorder', 'DisplaySignText', 'SetSpeed', 'ExpandInv', 'LaunchProj', 'NoProjColl', 'ShowDisguise', 'ParticleCuboidA', 'PlaySound', 'SetCompass', 'MobDisguise', 'EnableBlocks', 'OpenBlockInv', 'ParticleCircleA', 'RemoveBossBar', 'ClearBars', 'SetEquipment', 'GiveRngItem', 'SetDropsEnabled', 'SendToPlot', 'RemovePotion', 'RemoveEffect', 'DisplayFracture', 'SetEntityHidden', 'SetSidebar', 'AllowDrops', 'Vibration', 'SetSlot', 'ParticleRay', 'ParticleCuboid', 'SendMessageSeq', 'SendDialogue', 'SetNamePrefix', 'ClearDispBlock', 'SetRainLevel', 'Undisguise', 'ParticleSpiralA', 'InstantRespawn', 'SetScore', 'SetNameColor', 'ReachAttribute', 'SetAtkSpeed', 'DisablePvp', 'SetTickRate', 'PlayEntitySound', 'ReplaceProj', 'SetExp', 'MiningAttribute', 'KBAttribute', 'MovementAttribute', 'ParticleSpiral', 'FallingAttribute', 'SetAllowFlight', 'SetMaxHealth', ' RemoveBossBar ', 'SetFogDistance', 'AdventureMode', 'GmAdventure', 'SpectatorMode', 'DispHeadTexture', 'ClearPotions', 'ClearEffects', 'SetTabListInfo', 'EnablePvp', 'HideDisguise', 'ScoreLineFormat', ' SetBossBar ', 'SetSkin', 'SpectatorCollision', 'SetNameVisible', 'SetInvulTicks', 'EnableFlight', 'SetStingsStuck', 'RemoveScore', 'DisallowDrops', 'SetExhaustion', 'ParticleCircle', 'DisplayBlock', 'RideEntity', 'WeatherRain', 'RmWorldBorder', 'ResourcePack', ' SetInvName ', 'GiveExhaustion', 'Teleport', 'SetAllowPVP', 'DisableFlight', 'SetVisualFire', 'SetDisguiseVisible', 'SetArrowsStuck', 'GetItemCooldown', 'SetItems', 'KeepInv', 'ReplaceItems', 'ReplaceItem', 'SendMessage', 'SetSlotItem', 'PlaySoundSeq', 'ParticleLineA', 'Respawn', 'SetInvName', 'SetItemCooldown', 'SetPlayerWeather', 'SendHover', 'SetShoulder', 'SetAirTicks', 'DisplayPickup', 'SetWorldBorder', 'SetPlayerTime', 'GiveFood', 'NatRegen', 'GivePotion', 'GiveEffect', 'RemoveItems', 'BoostElytra', 'SaveInv', 'OpenBook', 'SetHealth', 'BlockDisguise', 'RollbackBlocks', 'NoDeathDrops', 'WalkSpeed', 'SetCollidable', 'LaunchFwd', 'SetFallDistance', 'CreativeMode', 'AttackAnimation', 'DisplayHologram', ' SetAbsorption ', 'DeathDrops', 'ShowInv', 'SetFoodLevel', 'PlayerDisguise', 'SetSaturation', 'WeatherClear', 'SendTitle', 'Title', 'ScoreDefFormat', 'StopSound', 'HealthAttribute', 'ParticleLine']
4
+ ENTITY_ACTION_ACTION = Literal['DispRotationEuler', 'Shear', 'SetVelocity', 'SetGlowSquidDark', 'SetFrogType', 'DispRotAxisAngle', 'Damage', 'SetMobSitting', 'SendAnimation', 'DisableGlowing', 'SetWardenAnger', 'SetHorsePattern', 'Heal', 'SetPandaSadTicks', 'SetItemOwner', 'SetDyeColor', 'LaunchUp', 'SetAge', ' SetName ', 'NoGravity', 'SetArmsRaised', 'SetMoveSpeed', 'SetInvulnerable', 'SetFriction', 'ProjColl', 'ArmorStandTags', 'SetPickupDelay', 'DropItems', 'MiscAttribute', 'SetCreeperPower', 'SetMarker', 'RemoveCustomTag', 'SetAbsorption', 'CreeperCharged', 'SetFireTicks', 'CombatAttribute', 'SetName', 'Jump', 'BDisplayBlock', 'SetFreezeTicks', 'TDisplaySeeThru', 'SetGliding', 'SetRotation', 'SetPandaRolling', 'SetFishPattern', 'SetWolfType', 'DispInterpolation', 'SetHandItem', 'SetEndermanBlock', 'LaunchToward', 'SetArmor', ' SetArmor ', 'GetCustomTag', 'InteractionSize', 'FaceLocation', 'SetCatType', 'SetArrowDamage', 'DisplayScale', 'TDisplayAlign', 'LaunchProj', 'EnableAI', 'DisplayBillboard', 'NoProjColl', 'Tame', 'SetGoatScreaming', 'SetBeeStinger', 'MobDisguise', 'SetMinecartBlock', 'FoxSleeping', 'SetEquipment', 'SetSilenced', 'SetBeeNectar', 'AttachLead', 'RemovePotion', 'RemoveEffect', 'ShearSheep', 'ArmorStandSlots', 'SetAllayDancing', 'SetRabbitType', 'SetSize', 'ShowName', 'SetAngry', 'SetAngerTicks', 'Undisguise', 'SetDeathDrops', 'SetPersistent', 'ProjectileItem', 'SetNameColor', 'SetCarryingChest', 'SetParrotColor', 'DispTranslation', 'Remove', 'TDispBackground', 'DisplayCullingSize', 'HideName', 'SetAxolotlColor', 'GetAllEntityTags', 'SetAI', 'KBAttribute', 'MovementAttribute', 'SetRiptiding', 'SetArrowNoClip', 'FallingAttribute', 'SetProjSource', 'SetFoxLeaping', 'SetPandaGene', 'SetMaxHealth', 'SetFishingTime', 'EndCrystalBeam', 'FrogEat', 'DisplayBrightness', 'SetProfession', 'ClearPotions', 'ClearEffects', 'ArmorStandParts', ' SetNameVisible ', 'SetTarget', 'TDisplayShadow', 'SetNameVisible', 'SetInvulTicks', 'SetShulkerPeek', ' SetPose ', 'SetRearing', 'SetCloudRadius', 'SetGravity', 'DispTPDuration', 'SetWitherInvul', 'Silence', 'SetArrowPierce', 'DisplayShadow', 'InteractResponse', 'UseItem', 'RideEntity', 'DisplayMatrix', 'NoDrops', 'SnifferState', 'EnableGlowing', 'Teleport', 'DisplayGlowColor', 'SetVisualFire', 'SetAge/Size', 'L SetArmor', 'SetSaddle', 'SetBulletTarget', 'TDisplayLineWidth', 'SetDragonPhase', 'SetLlamaColor', 'SetVillagerBiome', 'SetCreeperFuse', 'SetBaby', 'MooshroomType', 'SetInvisible', 'SheepEat', 'SetCatResting', 'GivePotion', 'GiveEffect', 'SetGoatHorns', 'SetGlowing', 'SetPandaOnBack', 'IDisplayModelType', 'SetHealth', 'BlockDisguise', 'SetCollidable', 'ArmorStandPose', 'SetPose', 'LaunchFwd', 'SetFallDistance', 'MoveToLoc', 'TDisplayOpacity', 'IDisplayItem', 'AttackAnimation', 'SnowmanPumpkin', 'SetCustomTag', 'Gravity', 'DisplayViewRange', 'NoAI', 'PlayerDisguise', 'SetItem', 'Explode', 'ExplodeCreeper', 'SetDigging', 'MoveTo', 'SetArrowHitSound', 'SetVexCharging', 'SetVillagerExp', 'IgniteCreeper', 'SetCelebrating', 'TDisplayText', 'SetHorseJump', 'Unsilence', 'HealthAttribute', 'Ram', 'SetFoxType']
5
+ GAME_ACTION_ACTION = Literal['FillContainer', 'BreakBlock', 'L PFX Spiral', 'ParticleSphere', 'PFX Sphere', 'ChangeSign', 'WebRequest', 'ClearScBoard', 'HideSidebar', 'SpawnItemDisplay', 'WriteTransaction', 'ParticleSpiral', 'PFX Spiral', 'SetBlockData', 'Firework', 'SetEventDamage', 'SpawnItem', 'SignColor', 'ShulkerBullet', 'FireworkEffect', 'SetContainer', 'SpawnInteraction', 'SetItemInSlot', 'CloneRegion', 'CopyBlocks', 'UncancelEvent', 'SetLecternBook', 'SpawnArmorStand', 'SpawnBlockDisp', 'ClearContainer', 'CancelEvent', 'ParticleEffect', 'Particle FX', 'SpawnFangs', 'SetEventSound', 'SetEventXP', 'LockContainer', 'RemoveScore', 'CreateHologram', 'SetExhaustion', 'ParticleCircle', 'PFX Circle', 'PFX Line [A]', 'ClearItems', 'StartLoop', 'SetFurnaceSpeed', 'BlockDropsOn', 'BoneMeal', 'DebugStackTrace', 'FallingBlock', 'DiscordWebhook', 'TickBlock', 'ReplaceItems', 'SetEventProj', 'Explosion', 'SpawnMob', 'SetBrushableItem', 'ParticleLineA', 'SpawnEnderEye', 'ShowSidebar', 'SpawnPotionCloud', 'LaunchProj', ' SetBlock ', 'SpawnItemDisp', 'SetBlockGrowth', 'Wait', 'SetContainerName', 'SetHead', 'RemoveHologram', 'RemoveItems', 'SpawnRngItem', 'SetRegion', 'SetBlock', 'ParticleCircleA', 'PFX Circle [A]', 'SpawnTNT', 'SpawnExpOrb', 'SetBiome', 'SetEventHeal', 'PFX Path', 'ApplyTransaction', 'ParticleRay', 'PFX Ray', 'GenerateTree', 'StopLoop', 'SetScObj', 'SpawnCrystal', 'SetCampfireItem', 'SpawnTextDisplay', 'SpawnVehicle', 'Lightning', 'ParticleSpiralA', 'PFX Spiral [A]', 'SetScore', 'ParticleCluster', 'PFX Cluster', 'L PFX Cluster', 'BlockDropsOff', 'ParticleLine', 'PFX Line']
6
+ SET_VAR_ACTION = Literal['GetItemFood', 'String', 'Text', 'SetParticleType', 'SetItemEnchants', 'ClearItemTag', 'PurgeVars', 'ShiftAllAxes', 'ShiftLocCoord', 'GetParticleMat', 'SetParticleSprd', 'AbsoluteValue', 'AppendValue', '%', 'ShiftOnVector', 'AddVectorLoc', 'GetItemAttribute', 'ClearDict', '+', 'ShiftRotation', 'RotateLocation', '-', ' GetItemName ', 'GetItemRarity', 'MultiplyVector', '/', 'GetSignText', 'Bitwise', 'GetLecternPage', 'ParseX', 'ShiftOnAxis', 'ShiftAxis', 'ParseY', 'VectorBetween', 'ParseZ', 'GetVectorComp', '=', 'RmText', 'AddItemAttribute', 'GetCenterLoc', 'FindCenter', 'AlignLoc', 'GetSoundVolume', 'RandomNumber', 'ContainerName', 'Raycast', 'RotateAroundVec', 'SetItemFood', 'GetParticleMotion', 'SetParticleMotion', 'Average', 'WrapNumber', 'ClampLoc', 'SetY', 'SetMapTexture', 'GetBlockData', 'SetX', 'SortDict', 'GetLecternBook', 'GetCustomSound', 'CrossProduct', 'x', 'GetParticleRoll', 'ParseYaw', 'DotProduct', 'SetZ', 'SetArmorTrim', 'PopListValue', 'SetParticleOpac', 'Noise', 'MinNumber', 'MinValue', 'Min', 'GetPotionType', 'SetItemName', 'ListLength', 'Sine', 'DirectionName', 'RepeatString', 'DuplicateText', 'RepeatText', 'GetItemLore', 'JoinString', 'JoinText', 'ReverseList', 'DedupList', 'CreateDict', 'GetBlockByMCTag', 'RoundNumber', 'FaceLocation', 'GetItemLoreLine', 'SetVectorLength', 'SetPotionDur', 'BlockResistance', 'SplitString', 'SplitText', 'NormalRandom', 'SetPotionType', 'AlignVector', 'SetItemDura', 'SetBreakability', 'SetMaxAmount', ' GetSignText ', 'RaycastEntity', 'SetDictValue', 'SetAllCoords', 'RGBColor', 'SetCanDestroy', 'HSLColor', ' GetDirection ', ' GetItemLore ', 'RemoveListIndex', 'CellularNoise', 'Logarithm', 'SetItemTag', 'TrimString', 'TrimText', 'ParseMiniMessageExpr', 'GetItemAmount', 'SetPotionAmp', 'GetCanDestroy', 'RotateAroundAxis', 'GetItemName', 'GetItemDura', 'ShiftInDirection', 'WrapNum', 'ReplaceString', 'ReplaceText', 'SetItemGlowing', ' SetItemName ', 'SetLodestoneLoc', 'FlattenList', 'BlockHardness', 'GetPotionAmp', 'GetParticleAmount', 'GetDictSize', 'SetItemAmount', 'SubtractVectors', 'SetCase', 'SetParticleColor', 'GetLight', ' GetBookText ', 'GetDictValues', 'Vector', 'Distance', 'SetItemLore', 'Root', 'SquareRoot', 'SetParticleAmount', 'AddItemEnchant', 'AddItemToolRule', 'GetItemType', 'GetDirection', 'GetLoreLine', 'GetParticleType', 'SetItemMaxDura', 'RemoveString', 'RemoveText', 'GetAllBlockData', 'MaxNumber', 'MaxValue', 'Max', 'GetDictKeys', 'TrimStyledText', 'SetParticleMat', 'GetCoord', 'RemoveItemTag', 'SetParticleSize', 'GetPotionDur', 'RandomLoc', 'SetSoundType', 'GetLodestoneLoc', 'ShiftDirection', 'GetContainerName', 'GetParticleSprd', 'ReflectVector', 'GetHeadOwner', 'GetItemEnchants', 'AppendDict', 'GetMaxItemAmount', 'GetColorChannels', ' SetDirection ', 'SetListValue', ' SetItemEnchants ', 'SetBookText', 'RandomValue', 'RandomObj', ' SetItemFlags ', 'SetItemType', 'GetSoundType', 'GetListValue', 'BounceNum', 'Tangent', 'VoronoiNoise', 'SetDirection', 'FaceDirection', 'HSBColor', 'HSVColor', '+=', 'GetSoundVariant', 'GetItemColor', 'ClearFormatting', 'InsertListValue', 'InsertListIndex', 'SetSoundVolume', 'SetCoord', 'AddVectors', 'SetPitch', 'GetParticleFade', 'RaycastBlock', 'SetItemTool', ' GetItemEnchants ', 'SetHeadTexture', 'SetHeadOwner', 'PerlinNoise', 'WorleyNoise', 'SetItemColor', 'SetLeatherColor', 'GetParticleColor', 'SetSoundPitch', ' RoundNumber ', 'GetCanPlaceOn', 'SortList', 'SetCustomSound', 'RemoveDictEntry', 'FormatTime', 'SetItemFlags', 'StringLength', 'TextLength', 'GetItemEffects', 'StyledText', 'GetMiniMessageExpr', 'SetYaw', ' SetItemLore ', 'SetItemEffects', '-=', 'GetItemTag', 'CreateList', 'AppendList', 'GetContainerItems', 'ShiftToward', 'ShiftTowards', 'ShiftLocTowards', 'TrimList', 'GradientNoise', 'SetItemHideTooltip', 'GetBlockDrops', 'ClearEnchants', 'Cosine', 'GetParticleOpac', 'GetItemByMCTag', 'SetParticleFade', 'SetVectorComp', 'ParseNumber', 'Exponent', 'ShiftAllDirs', 'GetValueIndex', 'RemItemEnchant', 'AddItemLore', 'GetBookText', 'SetParticleRoll', 'SetSoundVariant', 'ShiftLocation', 'RandomizeList', 'ClampNumber', 'Round', 'GetSoundPitch', 'TranslateColors', 'GetBlockGrowth', 'GetAllItemTags', 'RemoveListValue', 'ShiftAllDirections', 'ValueNoise', 'SetCanPlaceOn', 'GetBlockType', 'ParsePitch', 'GetDictValue', 'ContainerLock', 'GetBlockPower', 'GetVectorLength', 'ContentLength', 'SetModelData', 'SetCoords', 'GetMaxAmount', 'GetParticleSize']
7
+ IF_PLAYER_ACTION = Literal['IsLookingAt', 'InWorldBorder', 'IsInGameMode', 'HasRoomForItem', 'PHasRoomForItem', 'IsHoldingOff', 'UsingPack', 'NoItemCooldown', 'IsUsingItem', 'HasAllItems', 'IsSwimming', 'HasItem', 'BlockEquals', 'IsWearing', 'PIsWearing', 'IsNear', 'PIsNear', 'IsRiding', 'StandingOn', 'PStandingOn', 'CmdEquals', ' StandingOn ', ' PStandingOn ', 'IsGrounded', 'CursorItem', 'SlotEquals', 'ItemEquals', 'IsHoldingMain', 'IsHolding', 'MenuSlotEquals', 'IsBlocking', 'HasPermission', ' IsRiding ', 'MainHandEquals', 'IsSneaking', 'IsFlying', 'HasPotion', 'HasEffect', 'NameEquals', 'PNameEquals', 'InvOpen', 'HasSlotItem', 'IsSprinting', 'IsGliding', 'CmdArgEquals']
8
+ IF_ENTITY_ACTION = Literal['IsVehicle', 'IsGrounded', 'EIsGrounded', 'IsType', 'IsProj', 'IsMob', 'HasCustomTag', 'IsSheared', 'IsItem', ' IsRiding ', 'Exists', 'IsNear', 'EIsNear', 'HasPotion', 'IsRiding', 'StandingOn', 'EStandingOn', 'NameEquals', 'ENameEquals', ' StandingOn ', ' EStandingOn ']
9
+ IF_GAME_ACTION = Literal['SignHasTxt', 'HasRoomForItem', 'EventBlockEquals', 'CommandEquals', 'EventItemEquals', ' SignHasTxt ', 'AttackIsCrit', 'ContainerHas', 'BlockEquals', 'GBlockEquals', 'InBlock', 'BlockPowered', 'HasPlayer', 'ContainerHasAll', 'CmdArgEquals', 'EventCancelled', 'IsChunkLoaded']
10
+ IF_VAR_ACTION = Literal['<=', 'ItemHasEnchant', 'ItemIsBlock', 'DictValueEquals', 'ItemHasTag', 'StringMatches', ' TextMatches ', 'ListIsEmpty', 'StartsWith', 'ListValueEq', 'VarIsType', 'TextMatches', 'EqIgnoreCase', 'IsNear', 'VIsNear', ' InRange ', 'VarExists', 'BlockIsSolid', 'ItemEquals', 'VItemEquals', 'ListContains', 'InRange', 'LocIsNear', 'Contains', '!=', '<', '=', ' = ', '>', 'EndsWith', '>=', 'DictHasKey']
11
+ REPEAT_ACTION = Literal['Adjacent', 'Path', 'Multiple', 'N Times', 'Grid', 'While', 'WhileCond', 'Range', 'ForEach', 'Sphere', 'Forever', ' Range ', 'ForEachEntry']
12
+ SELECT_OBJ_ACTION = Literal['LastMob', 'RandomPlayer', 'LastEntity', 'Shooter', 'AllMobs', 'EntityName', 'FilterRandom', 'RandomSelected', 'DefaultEntity', 'PlayerName', 'AllEntities', 'Damager', 'FilterDistance', 'FilterRay', 'Reset', 'None', 'EventTarget', 'Killer', 'Victim', 'EntitiesCond', 'AllPlayers', 'Invert', 'RandomEntity', 'FilterCondition', 'FilterSelect', 'MobsCond', 'FilterSort', 'Projectile', 'DefaultPlayer', 'PlayersCond', 'MobName']
13
+ CONTROL_ACTION = Literal['StopRepeat', 'Return', 'ReturnNTimes', 'Skip', 'End', 'Wait']
14
+ EVENT_ACTION = Literal['ClickContainerSlot', 'CloseInv', 'StartFly', 'BreakBlock', 'StartSprint', 'MobKillPlayer', 'Teleport', 'ShootBow', 'StopFly', 'TameEntity', 'LeftClick', 'PlayerTakeDmg', 'ProjHit', 'KillPlayer', 'VehicleJump', 'ClickInvSlot', 'ClickOwnInv', 'Respawn', 'SwapHands', 'PackLoad', 'DamageEntity', 'Sneak', 'PlayerHeal', 'ClickPlayer', 'Consume', 'Death', 'PlaceBlock', 'Walk', 'PickUpItem', 'PickupItem', 'Dismount', 'CloudImbuePlayer', 'Leave', 'Quit', 'DropItem', 'LeftClickPlayer', 'ChangeSlot', 'ClickEntity', 'HorseJump', 'ShootProjectile', 'Move', 'Unsneak', 'Fish', 'FishEvent', 'FallDamage', 'BreakItem', 'LoopEvent', 'PlayerResurrect', 'RightClick', 'ClickMenuSlot', 'ClickItem', 'Riptide', 'KillMob', 'Join', 'EntityDmgPlayer', 'StopSprint', 'Jump', 'LoadCrossbow', 'ProjDmgPlayer', 'Command', 'LeftClickEntity', 'Exhaustion', 'PackDecline', 'PlayerDmgPlayer']
15
+ ENTITY_EVENT_ACTION = Literal['EntityKillEntity', 'BlockFall', 'ProjKillEntity', 'EntityDmgEntity', 'FallingBlockLand', 'EntityResurrect', 'ItemMerge', 'EntityHeal', 'Teleport', 'ShootBow', 'EntityDmg', 'ProjDmgEntity', 'EntityExplode', 'EntityDeath', 'VehicleDamage', 'Transform', 'RegrowWool']
16
+ REPEAT_SUBACTION = IF_PLAYER_ACTION | IF_ENTITY_ACTION | IF_GAME_ACTION | IF_VAR_ACTION
@@ -13,6 +13,7 @@ from dfpyre.util import *
13
13
  from dfpyre.items import *
14
14
  from dfpyre.scriptgen import generate_script, GeneratorFlags
15
15
  from dfpyre.actiondump import CODEBLOCK_DATA, get_default_tags
16
+ from dfpyre.action_literals import *
16
17
 
17
18
 
18
19
  VARIABLE_TYPES = {'txt', 'comp', 'num', 'item', 'loc', 'var', 'snd', 'part', 'pot', 'g_val', 'vec', 'pn_el'}
@@ -349,7 +350,7 @@ def _assemble_template(starting_block: CodeBlock, codeblocks: list[CodeBlock], a
349
350
  return DFTemplate(template_codeblocks, author)
350
351
 
351
352
 
352
- def player_event(event_name: str, codeblocks: list[CodeBlock]=(), author: str|None=None) -> DFTemplate:
353
+ def player_event(event_name: EVENT_ACTION, codeblocks: list[CodeBlock]=(), author: str|None=None) -> DFTemplate:
353
354
  """
354
355
  Represents a Player Event codeblock.
355
356
 
@@ -361,7 +362,7 @@ def player_event(event_name: str, codeblocks: list[CodeBlock]=(), author: str|No
361
362
  return _assemble_template(starting_block, codeblocks, author)
362
363
 
363
364
 
364
- def entity_event(event_name: str, codeblocks: list[CodeBlock]=[], author: str|None=None) -> DFTemplate:
365
+ def entity_event(event_name: ENTITY_EVENT_ACTION, codeblocks: list[CodeBlock]=[], author: str|None=None) -> DFTemplate:
365
366
  """
366
367
  Represents an Entity Event codeblock.
367
368
 
@@ -421,7 +422,7 @@ def start_process(process_name: str, *args, tags: dict[str, str]={}) -> CodeBloc
421
422
  return CodeBlock.new_data('start_process', process_name, args, tags)
422
423
 
423
424
 
424
- def player_action(action_name: str, *args, target: Target=DEFAULT_TARGET, tags: dict[str, str]={}) -> CodeBlock:
425
+ def player_action(action_name: PLAYER_ACTION_ACTION, *args, target: Target=DEFAULT_TARGET, tags: dict[str, str]={}) -> CodeBlock:
425
426
  """
426
427
  Represents a Player Action codeblock.
427
428
 
@@ -433,7 +434,7 @@ def player_action(action_name: str, *args, target: Target=DEFAULT_TARGET, tags:
433
434
  return CodeBlock.new_action('player_action', action_name, args, tags, target=target)
434
435
 
435
436
 
436
- def entity_action(action_name: str, *args, target: Target=DEFAULT_TARGET, tags: dict[str, str]={}) -> CodeBlock:
437
+ def entity_action(action_name: ENTITY_ACTION_ACTION, *args, target: Target=DEFAULT_TARGET, tags: dict[str, str]={}) -> CodeBlock:
437
438
  """
438
439
  Represents an Entity Action codeblock.
439
440
 
@@ -445,7 +446,7 @@ def entity_action(action_name: str, *args, target: Target=DEFAULT_TARGET, tags:
445
446
  return CodeBlock.new_action('entity_action', action_name, args, tags, target=target)
446
447
 
447
448
 
448
- def game_action(action_name: str, *args, tags: dict[str, str]={}) -> CodeBlock:
449
+ def game_action(action_name: GAME_ACTION_ACTION, *args, tags: dict[str, str]={}) -> CodeBlock:
449
450
  """
450
451
  Represents a Game Action codeblock.
451
452
 
@@ -456,7 +457,7 @@ def game_action(action_name: str, *args, tags: dict[str, str]={}) -> CodeBlock:
456
457
  return CodeBlock.new_action('game_action', action_name, args, tags)
457
458
 
458
459
 
459
- def if_player(action_name: str, *args, target: Target=DEFAULT_TARGET, tags: dict[str, str]={}, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
460
+ def if_player(action_name: IF_PLAYER_ACTION, *args, target: Target=DEFAULT_TARGET, tags: dict[str, str]={}, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
460
461
  """
461
462
  Represents an If Player codeblock.
462
463
 
@@ -474,7 +475,7 @@ def if_player(action_name: str, *args, target: Target=DEFAULT_TARGET, tags: dict
474
475
  CodeBlock.new_bracket('close', 'norm')
475
476
  ]
476
477
 
477
- def if_entity(action_name: str, *args, target: Target=DEFAULT_TARGET, tags: dict[str, str]={}, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
478
+ def if_entity(action_name: IF_ENTITY_ACTION, *args, target: Target=DEFAULT_TARGET, tags: dict[str, str]={}, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
478
479
  """
479
480
  Represents an If Entity codeblock.
480
481
 
@@ -493,7 +494,7 @@ def if_entity(action_name: str, *args, target: Target=DEFAULT_TARGET, tags: dict
493
494
  ]
494
495
 
495
496
 
496
- def if_game(action_name: str, *args, tags: dict[str, str]={}, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
497
+ def if_game(action_name: IF_GAME_ACTION, *args, tags: dict[str, str]={}, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
497
498
  """
498
499
  Represents an If Game codeblock.
499
500
 
@@ -511,7 +512,7 @@ def if_game(action_name: str, *args, tags: dict[str, str]={}, inverted: bool=Fal
511
512
  ]
512
513
 
513
514
 
514
- def if_variable(action_name: str, *args, tags: dict[str, str]={}, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
515
+ def if_variable(action_name: IF_VAR_ACTION, *args, tags: dict[str, str]={}, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
515
516
  """
516
517
  Represents an If Variable codeblock.
517
518
 
@@ -543,7 +544,7 @@ def else_(codeblocks: list[CodeBlock]=[]) -> list[CodeBlock]:
543
544
  ]
544
545
 
545
546
 
546
- def repeat(action_name: str, *args, tags: dict[str, str]={}, sub_action: str|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> CodeBlock:
547
+ def repeat(action_name: REPEAT_ACTION, *args, tags: dict[str, str]={}, sub_action: REPEAT_SUBACTION|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]) -> CodeBlock:
547
548
  """
548
549
  Represents a Repeat codeblock.
549
550
 
@@ -562,7 +563,7 @@ def repeat(action_name: str, *args, tags: dict[str, str]={}, sub_action: str|Non
562
563
  ]
563
564
 
564
565
 
565
- def control(action_name: str, *args, tags: dict[str, str]={}) -> CodeBlock:
566
+ def control(action_name: CONTROL_ACTION, *args, tags: dict[str, str]={}) -> CodeBlock:
566
567
  """
567
568
  Represents a Control codeblock.
568
569
 
@@ -573,7 +574,7 @@ def control(action_name: str, *args, tags: dict[str, str]={}) -> CodeBlock:
573
574
  return CodeBlock.new_action('control', action_name, args, tags)
574
575
 
575
576
 
576
- def select_object(action_name: str, *args, tags: dict[str, str]={}) -> CodeBlock:
577
+ def select_object(action_name: SELECT_OBJ_ACTION, *args, tags: dict[str, str]={}) -> CodeBlock:
577
578
  """
578
579
  Represents a Select Object codeblock.
579
580
 
@@ -584,7 +585,7 @@ def select_object(action_name: str, *args, tags: dict[str, str]={}) -> CodeBlock
584
585
  return CodeBlock.new_action('select_obj', action_name, args, tags)
585
586
 
586
587
 
587
- def set_variable(action_name: str, *args, tags: dict[str, str]={}) -> CodeBlock:
588
+ def set_variable(action_name: SET_VAR_ACTION, *args, tags: dict[str, str]={}) -> CodeBlock:
588
589
  """
589
590
  Represents a Set Variable codeblock.
590
591
 
@@ -1,13 +1,13 @@
1
1
  [tool.poetry]
2
2
  name = "dfpyre"
3
- version = "0.8.1"
3
+ version = "0.8.2"
4
4
  description = "A package for creating and modifying code templates for the DiamondFire Minecraft server."
5
5
  authors = ["Amp"]
6
6
  readme = "README.md"
7
7
  license = "MIT"
8
8
  repository = "https://github.com/Amp63/pyre"
9
9
  keywords = ["diamondfire", "minecraft", "template", "item"]
10
- exclude = ['examples']
10
+ exclude = ['examples', 'extra']
11
11
 
12
12
 
13
13
  [tool.poetry.dependencies]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes