- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 413
Blocking Components #8217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            Absolutionism
  wants to merge
  65
  commits into
  SkriptLang:dev/feature
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
Absolutionism:dev/BlockingComponent
  
      
      
   
  
    
  
  
  
 
  
      
    base: dev/feature
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Open
            
            Blocking Components #8217
                    Absolutionism
  wants to merge
  65
  commits into
  SkriptLang:dev/feature
from
Absolutionism:dev/BlockingComponent
  
      
      
   
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    …leComponents # Conflicts: # src/main/java/ch/njol/skript/Skript.java # src/main/resources/lang/default.lang
…leComponents # Conflicts: # src/main/java/ch/njol/skript/util/slot/EquipmentSlot.java
…leComponents # Conflicts: # src/main/java/ch/njol/skript/Skript.java # src/main/java/ch/njol/skript/bukkitutil/SoundUtils.java # src/main/resources/lang/default.lang
…leComponents # Conflicts: # src/main/java/ch/njol/skript/Skript.java # src/main/java/ch/njol/skript/util/slot/EquipmentSlot.java # src/main/resources/lang/default.lang
…leComponents # Conflicts: # src/main/resources/lang/default.lang
…leComponents # Conflicts: # src/main/java/ch/njol/skript/registrations/Feature.java # src/main/resources/lang/default.lang
…Component # Conflicts: # src/main/java/ch/njol/skript/Skript.java # src/main/java/ch/njol/skript/classes/data/BukkitClasses.java # src/main/java/ch/njol/skript/lang/function/Function.java # src/main/java/ch/njol/skript/registrations/Feature.java # src/main/java/ch/njol/skript/util/ItemSource.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/ComponentUtils.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/ComponentWrapper.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/ItemComponentModule.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/EquippableModule.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/EquippableWrapper.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/CondEquipCompDamage.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/CondEquipCompDispensable.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/CondEquipCompInteract.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/CondEquipCompShearable.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/CondEquipCompSwapEquipment.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/EffEquipCompDamageable.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/EffEquipCompDispensable.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/EffEquipCompInteract.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/EffEquipCompShearable.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/EffEquipCompSwapEquipment.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/ExprEquipCompCameraOverlay.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/ExprEquipCompEntities.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/ExprEquipCompEquipSound.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/ExprEquipCompModel.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/ExprEquipCompShearSound.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/ExprEquipCompSlot.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/ExprEquippableComponent.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/equippable/elements/ExprSecBlankEquipComp.java # src/main/java/org/skriptlang/skript/bukkit/itemcomponents/generic/ExprItemCompCopy.java # src/main/resources/lang/default.lang
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Problem
Skript does not have support for Blocking Components, otherwise known as BlocksAttacks. Skript should include this since it's vanilla.
Solution
Adds
BlockingWrapperthat extendsComponentWrapperand handles modifying data of the underlyingBlocksAttackscomponent.Adds
DamageFunctionWrapperthat wrapsItemDamageFunction. This handles changing data of the wrappedItemDamageFunction. This can be created with a parentingBlockingWrapperto specify that any changes made to the underlyingItemDamageFunctionshould take place on theBlockingWrapper. Using the wrapper to change theItemDamageFunctionof anyBlockingWrappershould not presume to be the parent, as it can and should be used on multipleBlockingWrappers.Adds
DamageReductionWrapperthat wrapsDamageReduction. This handles changing data of the wrappedDamageReduction. This can be created with a parentingBlockingWrapperto specify that any changes made to the underlyingDamageReductionshould take place on theBlockingWrapper. Using the wrapper to change theDamageReductions of anyBlockingWrappershould not presume to be the parent, as it can and should be used on multipleBlockingWrappers.Adds builders for
BlocksAttacks,ItemDamageFunction, andDamageReductionas there was no way to convert an existing finalized object back into the builder provided by Paper.Adds
BlockingExperimentalSyntaxfor all related syntax elements. This component, just like every other, are experimental.Adds all syntax elements that correlate to retrieving and modifying
BlockingWrappers,DamageFunctionWrappers, andDamageReductionWrappersTesting Completed
BlockingComponents.skSupporting Information
N/A
Completes: none
Related: none