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"> | ||||
|     <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$/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> | ||||
|     <option name="SHOW_DIALOG" value="false" /> | ||||
|     <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||||
|  | @ -68,29 +73,30 @@ | |||
|     <option name="showExcludedFiles" value="false" /> | ||||
|     <option name="showLibraryContents" value="true" /> | ||||
|   </component> | ||||
|   <component name="PropertiesComponent">{ | ||||
|   "keyToString": { | ||||
|     "Gradle.EntityLib:test-plugin [runServer].executor": "Debug", | ||||
|     "RunOnceActivity.OpenProjectViewOnStart": "true", | ||||
|     "RunOnceActivity.ShowReadmeOnStart": "true", | ||||
|     "WebServerToolWindowFactoryState": "false", | ||||
|     "git-widget-placeholder": "master", | ||||
|     "ignore.virus.scanning.warn.message": "true", | ||||
|     "jdk.selected.JAVA_MODULE": "corretto-17", | ||||
|     "kotlin-language-version-configured": "true", | ||||
|     "last_opened_file_path": "D:/Github/EntityLib", | ||||
|     "node.js.detected.package.eslint": "true", | ||||
|     "node.js.detected.package.tslint": "true", | ||||
|     "node.js.selected.package.eslint": "(autodetect)", | ||||
|     "node.js.selected.package.tslint": "(autodetect)", | ||||
|     "nodejs_package_manager_path": "npm", | ||||
|     "project.structure.last.edited": "Modules", | ||||
|     "project.structure.proportion": "0.0", | ||||
|     "project.structure.side.proportion": "0.0", | ||||
|     "settings.editor.selected.configurable": "preferences.pluginManager", | ||||
|     "vue.rearranger.settings.migration": "true" | ||||
|   <component name="PropertiesComponent"><![CDATA[{ | ||||
|   "keyToString": { | ||||
|     "Gradle.Build EntityLib.executor": "Run", | ||||
|     "Gradle.EntityLib:test-plugin [runServer].executor": "Debug", | ||||
|     "RunOnceActivity.OpenProjectViewOnStart": "true", | ||||
|     "RunOnceActivity.ShowReadmeOnStart": "true", | ||||
|     "WebServerToolWindowFactoryState": "false", | ||||
|     "git-widget-placeholder": "master", | ||||
|     "ignore.virus.scanning.warn.message": "true", | ||||
|     "jdk.selected.JAVA_MODULE": "corretto-17", | ||||
|     "kotlin-language-version-configured": "true", | ||||
|     "last_opened_file_path": "D:/Github/EntityLib", | ||||
|     "node.js.detected.package.eslint": "true", | ||||
|     "node.js.detected.package.tslint": "true", | ||||
|     "node.js.selected.package.eslint": "(autodetect)", | ||||
|     "node.js.selected.package.tslint": "(autodetect)", | ||||
|     "nodejs_package_manager_path": "npm", | ||||
|     "project.structure.last.edited": "Modules", | ||||
|     "project.structure.proportion": "0.0", | ||||
|     "project.structure.side.proportion": "0.0", | ||||
|     "settings.editor.selected.configurable": "preferences.pluginManager", | ||||
|     "vue.rearranger.settings.migration": "true" | ||||
|   } | ||||
| }</component> | ||||
| }]]></component> | ||||
|   <component name="RecentsManager"> | ||||
|     <key name="CopyFile.RECENT_KEYS"> | ||||
|       <recent name="D:\Github\EntityLib\test-plugin" /> | ||||
|  | @ -208,6 +214,8 @@ | |||
|       <workItem from="1704502790346" duration="6191000" /> | ||||
|       <workItem from="1705192736239" duration="496000" /> | ||||
|       <workItem from="1705534524814" duration="15424000" /> | ||||
|       <workItem from="1705578156456" duration="78000" /> | ||||
|       <workItem from="1705636302508" duration="1873000" /> | ||||
|     </task> | ||||
|     <servers /> | ||||
|   </component> | ||||
|  |  | |||
|  | @ -42,13 +42,11 @@ public class WrapperEntity implements Tickable { | |||
|         if (spawned) return false; | ||||
|         this.location = location; | ||||
|         this.spawned = true; | ||||
| 
 | ||||
|         int data = 0; | ||||
|         Optional<Vector3d> velocity; | ||||
|         double veloX = 0, veloY = 0, veloZ = 0; | ||||
|         if (meta instanceof ObjectData) { | ||||
|             ObjectData od = (ObjectData) meta; | ||||
| 
 | ||||
|             data = od.getObjectData(); | ||||
|             if (od.requiresVelocityPacketAtSpawn()) { | ||||
|                 final WrapperPlayServerEntityVelocity veloPacket = getVelocityPacket(); | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ import me.tofaa.entitylib.meta.Metadata; | |||
| public class DisplayMeta extends EntityMeta { | ||||
| 
 | ||||
|     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) { | ||||
|         super(entityId, metadata); | ||||
|  |  | |||
|  | @ -32,6 +32,6 @@ dependencies { | |||
| 
 | ||||
| tasks { | ||||
|     runServer { | ||||
|         minecraftVersion("1.19.4") | ||||
|         minecraftVersion("1.20.4") | ||||
|     } | ||||
| } | ||||
|  | @ -26,7 +26,7 @@ public class SpawnClickableFrogCommand implements CommandExecutor { | |||
|     @Override | ||||
|     public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String[] strings) { | ||||
|         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(); | ||||
|         meta.setHasGlowingEffect(true); | ||||
|         meta.setCustomNameVisible(true); | ||||
|  |  | |||
|  | @ -1,12 +1,12 @@ | |||
| package me.tofaa.entitylib; | ||||
| 
 | ||||
| import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes; | ||||
| import com.github.retrooper.packetevents.util.Vector3f; | ||||
| import io.github.retrooper.packetevents.util.SpigotConversionUtil; | ||||
| import me.tofaa.entitylib.entity.WrapperEntity; | ||||
| import me.tofaa.entitylib.meta.display.TextDisplayMeta; | ||||
| import me.tofaa.entitylib.meta.types.DisplayMeta; | ||||
| import net.kyori.adventure.text.Component; | ||||
| import net.kyori.adventure.text.format.NamedTextColor; | ||||
| import org.bukkit.command.Command; | ||||
| import org.bukkit.command.CommandExecutor; | ||||
| import org.bukkit.command.CommandSender; | ||||
|  | @ -22,10 +22,13 @@ public class TestDisplayCommand implements CommandExecutor { | |||
|         Player player = (Player) commandSender; | ||||
|         WrapperEntity e = EntityLib.createEntity(UUID.randomUUID(), EntityTypes.TEXT_DISPLAY); | ||||
|         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); | ||||
|         e.addViewer((player.getUniqueId())); | ||||
|         e.spawn(SpigotConversionUtil.fromBukkitLocation((player.getLocation().clone().add(0, 2, 0)))); | ||||
|         return true; | ||||
|         meta.setScale(new Vector3f(2, 2, 2)); | ||||
|         meta.setTranslation(new Vector3f(10, 0, 0)); | ||||
|         e.addViewer(player.getUniqueId()); | ||||
|         e.spawn(SpigotConversionUtil.fromBukkitLocation(player.getLocation())); | ||||
|         return false; | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue