fix wolf collar color
This commit is contained in:
parent
256e043e29
commit
13e29016ab
2 changed files with 48 additions and 39 deletions
|
@ -4,13 +4,7 @@
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="9d5d9b6f-43c8-41a4-bb42-a66ffc96c9b0" name="Changes" comment="">
|
<list default="true" id="9d5d9b6f-43c8-41a4-bb42-a66ffc96c9b0" name="Changes" comment="" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/meta/EntityMeta.java" beforeDir="false" afterPath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/meta/EntityMeta.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntity.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/platforms/spigot/src/main/java/me/tofaa/entitylib/spigot/InternalRegistryListener.java" beforeDir="false" afterPath="$PROJECT_DIR$/platforms/spigot/src/main/java/me/tofaa/entitylib/spigot/InternalRegistryListener.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/testentitylib/TestPlayerCommand.java" beforeDir="false" afterPath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/testentitylib/TestPlayerCommand.java" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
@ -96,39 +90,39 @@
|
||||||
<option name="showExcludedFiles" value="false" />
|
<option name="showExcludedFiles" value="false" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"Downloaded.Files.Path.Enabled": "false",
|
"Downloaded.Files.Path.Enabled": "false",
|
||||||
"Gradle.Build EntityLib.executor": "Run",
|
"Gradle.Build EntityLib.executor": "Run",
|
||||||
"Gradle.EntityLib [dependencies].executor": "Run",
|
"Gradle.EntityLib [dependencies].executor": "Run",
|
||||||
"Gradle.EntityLib [publish].executor": "Run",
|
"Gradle.EntityLib [publish].executor": "Run",
|
||||||
"Gradle.EntityLib:code-gen [:code-gen:Main.main()].executor": "Run",
|
"Gradle.EntityLib:code-gen [:code-gen:Main.main()].executor": "Run",
|
||||||
"Gradle.EntityLib:test-plugin [publish].executor": "Run",
|
"Gradle.EntityLib:test-plugin [publish].executor": "Run",
|
||||||
"Gradle.EntityLib:test-plugin [runServer].executor": "Debug",
|
"Gradle.EntityLib:test-plugin [runServer].executor": "Debug",
|
||||||
"Gradle.EntityLib:test-plugin [shadowJar].executor": "Run",
|
"Gradle.EntityLib:test-plugin [shadowJar].executor": "Run",
|
||||||
"Repository.Attach.Annotations": "false",
|
"Repository.Attach.Annotations": "false",
|
||||||
"Repository.Attach.JavaDocs": "false",
|
"Repository.Attach.JavaDocs": "false",
|
||||||
"Repository.Attach.Sources": "false",
|
"Repository.Attach.Sources": "false",
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"WebServerToolWindowFactoryState": "false",
|
"WebServerToolWindowFactoryState": "false",
|
||||||
"git-widget-placeholder": "master",
|
"git-widget-placeholder": "master",
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
"jdk.selected.JAVA_MODULE": "corretto-17",
|
"jdk.selected.JAVA_MODULE": "corretto-17",
|
||||||
"kotlin-language-version-configured": "true",
|
"kotlin-language-version-configured": "true",
|
||||||
"last_opened_file_path": "D:/Github/EntityLib/api/src/main/java/me/tofaa/entitylib/extras",
|
"last_opened_file_path": "D:/Github/EntityLib/api/src/main/java/me/tofaa/entitylib/extras",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"project.structure.last.edited": "Project",
|
"project.structure.last.edited": "Project",
|
||||||
"project.structure.proportion": "0.15",
|
"project.structure.proportion": "0.15",
|
||||||
"project.structure.side.proportion": "0.2",
|
"project.structure.side.proportion": "0.2",
|
||||||
"settings.editor.selected.configurable": "preferences.pluginManager",
|
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
<recent name="D:\Github\EntityLib\api\src\main\java\me\tofaa\entitylib\extras" />
|
<recent name="D:\Github\EntityLib\api\src\main\java\me\tofaa\entitylib\extras" />
|
||||||
|
@ -327,6 +321,7 @@
|
||||||
<workItem from="1709057446428" duration="195000" />
|
<workItem from="1709057446428" duration="195000" />
|
||||||
<workItem from="1709074092924" duration="24000" />
|
<workItem from="1709074092924" duration="24000" />
|
||||||
<workItem from="1709139306864" duration="1813000" />
|
<workItem from="1709139306864" duration="1813000" />
|
||||||
|
<workItem from="1709142473633" duration="2565000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
@ -350,6 +345,11 @@
|
||||||
<line>33</line>
|
<line>33</line>
|
||||||
<option name="timeStamp" value="3" />
|
<option name="timeStamp" value="3" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/testentitylib/TestPlayerCommand.java</url>
|
||||||
|
<line>69</line>
|
||||||
|
<option name="timeStamp" value="4" />
|
||||||
|
</line-breakpoint>
|
||||||
<line-breakpoint enabled="true" type="java-method">
|
<line-breakpoint enabled="true" type="java-method">
|
||||||
<url>file://$PROJECT_DIR$/src/main/java/me/tofaa/entitylib/meta/types/DisplayMeta.java</url>
|
<url>file://$PROJECT_DIR$/src/main/java/me/tofaa/entitylib/meta/types/DisplayMeta.java</url>
|
||||||
<line>153</line>
|
<line>153</line>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package me.tofaa.entitylib.meta.mobs.tameable;
|
package me.tofaa.entitylib.meta.mobs.tameable;
|
||||||
|
|
||||||
import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes;
|
import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes;
|
||||||
|
import me.tofaa.entitylib.extras.DyeColor;
|
||||||
import me.tofaa.entitylib.meta.Metadata;
|
import me.tofaa.entitylib.meta.Metadata;
|
||||||
import me.tofaa.entitylib.meta.types.TameableMeta;
|
import me.tofaa.entitylib.meta.types.TameableMeta;
|
||||||
|
|
||||||
|
@ -29,6 +30,14 @@ public class WolfMeta extends TameableMeta {
|
||||||
super.metadata.setIndex(offset(OFFSET, 1), EntityDataTypes.INT, value);
|
super.metadata.setIndex(offset(OFFSET, 1), EntityDataTypes.INT, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DyeColor getCollarColorAsDye() {
|
||||||
|
return DyeColor.values()[super.metadata.getIndex(offset(OFFSET, 1), DyeColor.RED.ordinal())];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollarColor(DyeColor color) {
|
||||||
|
super.metadata.setIndex(offset(OFFSET, 1), EntityDataTypes.INT, color.ordinal());
|
||||||
|
}
|
||||||
|
|
||||||
public int getAngerTime() {
|
public int getAngerTime() {
|
||||||
return super.metadata.getIndex(offset(OFFSET, 2), 0);
|
return super.metadata.getIndex(offset(OFFSET, 2), 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue