-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #247 from proferabg/master
Add missing components and clean up logging format
- Loading branch information
Showing
85 changed files
with
1,612 additions
and
89 deletions.
There are no files selected for viewing
This file contains 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
3 changes: 0 additions & 3 deletions
3
protocolize-api/src/main/java/dev/simplix/protocolize/api/inventory/Inventory.java
This file contains 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
43 changes: 43 additions & 0 deletions
43
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/Attribute.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import dev.simplix.protocolize.data.AttributeType; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.UUID; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Attribute { | ||
|
||
private AttributeType type; | ||
private UUID uuid; | ||
private String name; | ||
private double value; | ||
private Operation operation; | ||
private EquipmentSlot slot; | ||
|
||
/* These may change in the future */ | ||
public enum Operation { | ||
ADD_VALUE, | ||
ADD_MULTIPLIED_BASE, | ||
ADD_MULTIPLIED_TOTAL | ||
} | ||
|
||
/* These may change in the future */ | ||
public enum EquipmentSlot { | ||
ANY, | ||
MAIN_HAND, | ||
OFF_HAND, | ||
HAND, | ||
FEET, | ||
LEGS, | ||
CHEST, | ||
HEAD, | ||
ARMOR, | ||
BODY; | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/BannerLayer.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class BannerLayer { | ||
private boolean direct; | ||
private int patternType; | ||
private String identifier; | ||
private String translationKey; | ||
private DyeColor color; | ||
} |
15 changes: 15 additions & 0 deletions
15
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/Bee.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import net.querz.nbt.tag.CompoundTag; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Bee { | ||
private CompoundTag entityData; | ||
private int ticksInHive; | ||
private int minTicksInHive; | ||
} |
29 changes: 29 additions & 0 deletions
29
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/BlockPredicate.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import net.querz.nbt.tag.CompoundTag; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class BlockPredicate { | ||
|
||
private BlockSet blockSet; | ||
private List<Property> properties; | ||
private CompoundTag nbtData; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public static class Property { | ||
private String name; | ||
private String exactValue; | ||
private String minValue; | ||
private String maxValue; | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/BlockSet.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class BlockSet { | ||
private Integer type; | ||
private String identifier; | ||
private List<Integer> blockIds; | ||
} |
28 changes: 28 additions & 0 deletions
28
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/Book.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import dev.simplix.protocolize.api.chat.ChatElement; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Book { | ||
private String title; | ||
private String filteredTitle; | ||
private String author; | ||
private int generation; | ||
private List<Page> pages; | ||
private boolean resolved; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public static class Page { | ||
private ChatElement<?> content; | ||
private ChatElement<?> filteredContent; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/DyeColor.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
public enum DyeColor { | ||
WHITE, | ||
ORANGE, | ||
MAGENTA, | ||
LIGHT_BLUE, | ||
YELLOW, | ||
LIME, | ||
PINK, | ||
GRAY, | ||
LIGHT_GRAY, | ||
CYAN, | ||
PURPLE, | ||
BLUE, | ||
BROWN, | ||
GREEN, | ||
RED, | ||
BLACK; | ||
} |
36 changes: 36 additions & 0 deletions
36
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/Firework.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Firework { | ||
|
||
private int flightDuration; | ||
private List<Meta> explosions; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public static class Meta { | ||
private Shape shape; | ||
private List<Integer> colors; | ||
private List<Integer> fadeColors; | ||
private boolean trail; | ||
private boolean twinkle; | ||
|
||
public enum Shape { | ||
SMALL_BALL, | ||
LARGE_BALL, | ||
STAR, | ||
CREEPER, | ||
BURST | ||
} | ||
|
||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/MobEffectInstance.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import dev.simplix.protocolize.data.MobEffect; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public class MobEffectInstance { | ||
private MobEffect mobEffect; | ||
private Details details; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public static class Details { | ||
private int amplifier; | ||
private int duration; | ||
private boolean ambient, showParticles, showIcon; | ||
private Details hiddenEffect; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/SoundEvent.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
|
||
import dev.simplix.protocolize.data.Sound; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class SoundEvent { | ||
private Sound sound; | ||
private String identifier; | ||
private Float fixedRange; | ||
} |
41 changes: 41 additions & 0 deletions
41
protocolize-api/src/main/java/dev/simplix/protocolize/api/item/Trim.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package dev.simplix.protocolize.api.item; | ||
|
||
import dev.simplix.protocolize.api.chat.ChatElement; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.Map; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Trim { | ||
|
||
private Integer materialType; | ||
private TrimMaterial trimMaterial; | ||
private Integer patternType; | ||
private TrimPattern trimPattern; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public static class TrimMaterial { | ||
private String assetName; | ||
private int ingredient; | ||
private float itemModelIndex; | ||
private Map<Integer, String> overrides; | ||
private ChatElement<?> description; | ||
} | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public static class TrimPattern { | ||
private String assetName; | ||
private int templateItem; | ||
private ChatElement<?> description; | ||
private boolean decal; | ||
} | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
...src/main/java/dev/simplix/protocolize/api/item/component/AttributeModifiersComponent.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package dev.simplix.protocolize.api.item.component; | ||
|
||
import dev.simplix.protocolize.api.Protocolize; | ||
import dev.simplix.protocolize.api.item.Attribute; | ||
|
||
import java.util.List; | ||
|
||
public interface AttributeModifiersComponent extends StructuredComponent { | ||
|
||
List<Attribute> getAttributes(); | ||
|
||
void setAttributes(List<Attribute> attributes); | ||
|
||
boolean isShowInTooltip(); | ||
|
||
void setShowInTooltip(boolean showInTooltip); | ||
|
||
void addAttribute(Attribute attribute); | ||
|
||
void removeAttribute(Attribute attribute); | ||
|
||
void removeAllAttributes(); | ||
|
||
static AttributeModifiersComponent create(List<Attribute> attributes) { | ||
return Protocolize.getService(Factory.class).create(attributes); | ||
} | ||
|
||
static AttributeModifiersComponent create(List<Attribute> attributes, boolean showInTooltip) { | ||
return Protocolize.getService(Factory.class).create(attributes, showInTooltip); | ||
} | ||
|
||
interface Factory { | ||
|
||
AttributeModifiersComponent create(List<Attribute> attributes); | ||
AttributeModifiersComponent create(List<Attribute> attributes, boolean showInTooltip); | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.