Merge branch 'Tofaa2:master' into master
This commit is contained in:
		
						commit
						b5481f783d
					
				
					 4 changed files with 8 additions and 19 deletions
				
			
		
							
								
								
									
										1
									
								
								.github/workflows/dev-build-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/dev-build-release.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -39,6 +39,7 @@ jobs:
 | 
				
			||||||
        run: chmod +x ./gradlew && ./gradlew build
 | 
					        run: chmod +x ./gradlew && ./gradlew build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Create Release
 | 
					      - name: Create Release
 | 
				
			||||||
 | 
					        if: github.ref != 'refs/heads/master'
 | 
				
			||||||
        uses: softprops/action-gh-release@v2
 | 
					        uses: softprops/action-gh-release@v2
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          name: '${{ github.ref_name }}: ${{ github.event.head_commit.message }} (${{ github.sha }})'
 | 
					          name: '${{ github.ref_name }}: ${{ github.event.head_commit.message }} (${{ github.sha }})'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,6 +9,7 @@ dependencies {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    compileOnly(libs.bundles.adventure)
 | 
					    compileOnly(libs.bundles.adventure)
 | 
				
			||||||
    compileOnly(libs.packetevents.api)
 | 
					    compileOnly(libs.packetevents.api)
 | 
				
			||||||
 | 
					    testCompileOnly(libs.packetevents.api)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tasks {
 | 
					tasks {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,11 +23,11 @@ public class ShulkerMeta extends MobMeta {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public Direction getAttachFace() {
 | 
					    public Direction getAttachFace() {
 | 
				
			||||||
        return super.metadata.getIndex(OFFSET, Direction.DOWN);
 | 
					        return super.metadata.getIndex((byte)16, Direction.DOWN);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void setAttachFace(Direction value) {
 | 
					    public void setAttachFace(Direction value) {
 | 
				
			||||||
        super.metadata.setIndex(OFFSET, EntityDataTypes.INT, value.ordinal());
 | 
					        super.metadata.setIndex((byte)16, EntityDataTypes.INT, value.ordinal());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public byte getShieldHeight() {
 | 
					    public byte getShieldHeight() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,16 +1,12 @@
 | 
				
			||||||
package me.tofaa.entitylib.meta.mobs.horse;
 | 
					package me.tofaa.entitylib.meta.mobs.horse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes;
 | 
					 | 
				
			||||||
import me.tofaa.entitylib.meta.Metadata;
 | 
					import me.tofaa.entitylib.meta.Metadata;
 | 
				
			||||||
import me.tofaa.entitylib.meta.types.MobMeta;
 | 
					import me.tofaa.entitylib.meta.types.AgeableMeta;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.Optional;
 | 
					public abstract class BaseHorseMeta extends AgeableMeta {
 | 
				
			||||||
import java.util.UUID;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public abstract class BaseHorseMeta extends MobMeta {
 | 
					    public static final byte OFFSET = AgeableMeta.MAX_OFFSET;
 | 
				
			||||||
 | 
					    public static final byte MAX_OFFSET = OFFSET + 1;
 | 
				
			||||||
    public static final byte OFFSET = MobMeta.MAX_OFFSET;
 | 
					 | 
				
			||||||
    public static final byte MAX_OFFSET = OFFSET + 2;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private final static byte TAMED_BIT = 0x02;
 | 
					    private final static byte TAMED_BIT = 0x02;
 | 
				
			||||||
    private final static byte SADDLED_BIT = 0x04;
 | 
					    private final static byte SADDLED_BIT = 0x04;
 | 
				
			||||||
| 
						 | 
					@ -70,13 +66,4 @@ public abstract class BaseHorseMeta extends MobMeta {
 | 
				
			||||||
    public void setMouthOpen(boolean value) {
 | 
					    public void setMouthOpen(boolean value) {
 | 
				
			||||||
        setMaskBit(OFFSET, MOUTH_OPEN_BIT, value);
 | 
					        setMaskBit(OFFSET, MOUTH_OPEN_BIT, value);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    public Optional<UUID> getOwner() {
 | 
					 | 
				
			||||||
        return super.metadata.getIndex(offset(OFFSET, 1), Optional.empty());
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setOwner(UUID value) {
 | 
					 | 
				
			||||||
        super.metadata.setIndex(offset(OFFSET, 1), EntityDataTypes.OPTIONAL_UUID, Optional.of(value));
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue