i should have put ai release to a later location
This commit is contained in:
parent
eeb64aa909
commit
a4f57da66f
6 changed files with 41 additions and 32 deletions
|
@ -6,6 +6,11 @@
|
||||||
<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$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/me/tofaa/entitylib/entity/WrapperEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/tofaa/entitylib/entity/WrapperEntity.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/me/tofaa/entitylib/meta/types/DisplayMeta.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/me/tofaa/entitylib/meta/types/DisplayMeta.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/test-plugin/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/test-plugin/build.gradle" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/entitylib/SpawnClickableFrogCommand.java" beforeDir="false" afterPath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/entitylib/SpawnClickableFrogCommand.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/entitylib/TestDisplayCommand.java" beforeDir="false" afterPath="$PROJECT_DIR$/test-plugin/src/main/java/me/tofaa/entitylib/TestDisplayCommand.java" afterDir="false" />
|
||||||
</list>
|
</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" />
|
||||||
|
@ -68,29 +73,30 @@
|
||||||
<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">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"Gradle.EntityLib:test-plugin [runServer].executor": "Debug",
|
"Gradle.Build EntityLib.executor": "Run",
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"Gradle.EntityLib:test-plugin [runServer].executor": "Debug",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"WebServerToolWindowFactoryState": "false",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"git-widget-placeholder": "master",
|
"WebServerToolWindowFactoryState": "false",
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
"git-widget-placeholder": "master",
|
||||||
"jdk.selected.JAVA_MODULE": "corretto-17",
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
"kotlin-language-version-configured": "true",
|
"jdk.selected.JAVA_MODULE": "corretto-17",
|
||||||
"last_opened_file_path": "D:/Github/EntityLib",
|
"kotlin-language-version-configured": "true",
|
||||||
"node.js.detected.package.eslint": "true",
|
"last_opened_file_path": "D:/Github/EntityLib",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"project.structure.last.edited": "Modules",
|
"nodejs_package_manager_path": "npm",
|
||||||
"project.structure.proportion": "0.0",
|
"project.structure.last.edited": "Modules",
|
||||||
"project.structure.side.proportion": "0.0",
|
"project.structure.proportion": "0.0",
|
||||||
"settings.editor.selected.configurable": "preferences.pluginManager",
|
"project.structure.side.proportion": "0.0",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||||
|
"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\test-plugin" />
|
<recent name="D:\Github\EntityLib\test-plugin" />
|
||||||
|
@ -208,6 +214,8 @@
|
||||||
<workItem from="1704502790346" duration="6191000" />
|
<workItem from="1704502790346" duration="6191000" />
|
||||||
<workItem from="1705192736239" duration="496000" />
|
<workItem from="1705192736239" duration="496000" />
|
||||||
<workItem from="1705534524814" duration="15424000" />
|
<workItem from="1705534524814" duration="15424000" />
|
||||||
|
<workItem from="1705578156456" duration="78000" />
|
||||||
|
<workItem from="1705636302508" duration="1873000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -42,13 +42,11 @@ public class WrapperEntity implements Tickable {
|
||||||
if (spawned) return false;
|
if (spawned) return false;
|
||||||
this.location = location;
|
this.location = location;
|
||||||
this.spawned = true;
|
this.spawned = true;
|
||||||
|
|
||||||
int data = 0;
|
int data = 0;
|
||||||
Optional<Vector3d> velocity;
|
Optional<Vector3d> velocity;
|
||||||
double veloX = 0, veloY = 0, veloZ = 0;
|
double veloX = 0, veloY = 0, veloZ = 0;
|
||||||
if (meta instanceof ObjectData) {
|
if (meta instanceof ObjectData) {
|
||||||
ObjectData od = (ObjectData) meta;
|
ObjectData od = (ObjectData) meta;
|
||||||
|
|
||||||
data = od.getObjectData();
|
data = od.getObjectData();
|
||||||
if (od.requiresVelocityPacketAtSpawn()) {
|
if (od.requiresVelocityPacketAtSpawn()) {
|
||||||
final WrapperPlayServerEntityVelocity veloPacket = getVelocityPacket();
|
final WrapperPlayServerEntityVelocity veloPacket = getVelocityPacket();
|
||||||
|
|
|
@ -10,7 +10,7 @@ import me.tofaa.entitylib.meta.Metadata;
|
||||||
public class DisplayMeta extends EntityMeta {
|
public class DisplayMeta extends EntityMeta {
|
||||||
|
|
||||||
public static final byte OFFSET = EntityMeta.MAX_OFFSET;
|
public static final byte OFFSET = EntityMeta.MAX_OFFSET;
|
||||||
public static final byte MAX_OFFSET = OFFSET + 14;
|
public static final byte MAX_OFFSET = OFFSET + 15;
|
||||||
|
|
||||||
public DisplayMeta(int entityId, Metadata metadata) {
|
public DisplayMeta(int entityId, Metadata metadata) {
|
||||||
super(entityId, metadata);
|
super(entityId, metadata);
|
||||||
|
|
|
@ -32,6 +32,6 @@ dependencies {
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
runServer {
|
runServer {
|
||||||
minecraftVersion("1.19.4")
|
minecraftVersion("1.20.4")
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -26,7 +26,7 @@ public class SpawnClickableFrogCommand implements CommandExecutor {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) {
|
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) {
|
||||||
Player player = (Player) commandSender;
|
Player player = (Player) commandSender;
|
||||||
WrapperEntity e = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.FROG);
|
WrapperEntity e = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.TEXT_DISPLAY);
|
||||||
FrogMeta meta = (FrogMeta) e.getMeta();
|
FrogMeta meta = (FrogMeta) e.getMeta();
|
||||||
meta.setHasGlowingEffect(true);
|
meta.setHasGlowingEffect(true);
|
||||||
meta.setCustomNameVisible(true);
|
meta.setCustomNameVisible(true);
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package me.tofaa.entitylib;
|
package me.tofaa.entitylib;
|
||||||
|
|
||||||
import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
|
import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
|
||||||
|
import com.github.retrooper.packetevents.util.Vector3f;
|
||||||
import io.github.retrooper.packetevents.util.SpigotConversionUtil;
|
import io.github.retrooper.packetevents.util.SpigotConversionUtil;
|
||||||
import me.tofaa.entitylib.entity.WrapperEntity;
|
import me.tofaa.entitylib.entity.WrapperEntity;
|
||||||
import me.tofaa.entitylib.meta.display.TextDisplayMeta;
|
import me.tofaa.entitylib.meta.display.TextDisplayMeta;
|
||||||
import me.tofaa.entitylib.meta.types.DisplayMeta;
|
import me.tofaa.entitylib.meta.types.DisplayMeta;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -22,10 +22,13 @@ public class TestDisplayCommand implements CommandExecutor {
|
||||||
Player player = (Player) commandSender;
|
Player player = (Player) commandSender;
|
||||||
WrapperEntity e = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.TEXT_DISPLAY);
|
WrapperEntity e = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.TEXT_DISPLAY);
|
||||||
TextDisplayMeta meta = (TextDisplayMeta) e.getMeta();
|
TextDisplayMeta meta = (TextDisplayMeta) e.getMeta();
|
||||||
meta.setText(Component.text("Hello World!", NamedTextColor.GOLD));
|
meta.setHasGlowingEffect(true);
|
||||||
|
meta.setText(Component.text("Hello World!"));
|
||||||
meta.setBillboardConstraints(DisplayMeta.BillboardConstraints.CENTER);
|
meta.setBillboardConstraints(DisplayMeta.BillboardConstraints.CENTER);
|
||||||
e.addViewer((player.getUniqueId()));
|
meta.setScale(new Vector3f(2, 2, 2));
|
||||||
e.spawn(SpigotConversionUtil.fromBukkitLocation((player.getLocation().clone().add(0, 2, 0))));
|
meta.setTranslation(new Vector3f(10, 0, 0));
|
||||||
return true;
|
e.addViewer(player.getUniqueId());
|
||||||
|
e.spawn(SpigotConversionUtil.fromBukkitLocation(player.getLocation()));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue