Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8d4216005 | ||
|
|
a157212ae0 | ||
| 8816741d74 | |||
| c2186ab695 | |||
|
|
751c2d2ff4 | ||
|
|
b03d309dbd |
@@ -53,17 +53,16 @@
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "cube",
|
||||
"position": {"x": 0, "y": 82, "z": 5},
|
||||
"name": "main",
|
||||
"position": {"x": 2, "y": 80, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": -0.5, "y": 0.5, "z": 0},
|
||||
"offset": {"x": -2.5, "y": 2.5, "z": 5},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 33, "y": 51, "z": 12},
|
||||
"isStaticBox": true
|
||||
"size": {"x": 33, "y": 51, "z": 12}
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
@@ -105,64 +104,12 @@
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "cube",
|
||||
"position": {"x": 0, "y": 124, "z": -8},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": -1, "y": -3, "z": 12},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 28, "y": 26, "z": 26},
|
||||
"isStaticBox": true
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
"offset": {"x": 0, "y": 51},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"right": {
|
||||
"offset": {"x": 0, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"front": {
|
||||
"offset": {"x": 28, "y": 51},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"left": {
|
||||
"offset": {"x": 26, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"top": {
|
||||
"offset": {"x": 84, "y": 77},
|
||||
"mirror": {"x": true, "y": true},
|
||||
"angle": 0
|
||||
},
|
||||
"bottom": {
|
||||
"offset": {"x": 94, "y": 0},
|
||||
"mirror": {"x": true, "y": false},
|
||||
"angle": 0
|
||||
}
|
||||
},
|
||||
"unwrapMode": "custom",
|
||||
"visible": true,
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"name": "armright",
|
||||
"position": {"x": 0, "y": 102, "z": 0},
|
||||
"position": {"x": 0, "y": 101, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": -20, "y": -27, "z": 4.5},
|
||||
"offset": {"x": -20, "y": -26, "z": 4.5},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
@@ -207,13 +154,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "5",
|
||||
"id": "4",
|
||||
"name": "armleft",
|
||||
"position": {"x": 0, "y": 104, "z": 0},
|
||||
"position": {"x": 0, "y": 103, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": 19, "y": -29, "z": 4.5},
|
||||
"offset": {"x": 19, "y": -28, "z": 4.5},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
@@ -258,7 +205,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "6",
|
||||
"id": "5",
|
||||
"name": "legleft",
|
||||
"position": {"x": 0, "y": 63, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
@@ -307,6 +254,57 @@
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "6",
|
||||
"name": "head",
|
||||
"position": {"x": 2, "y": 80, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": -3, "y": 41, "z": 4},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 28, "y": 26, "z": 26}
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
"offset": {"x": 0, "y": 51},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"right": {
|
||||
"offset": {"x": 0, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"front": {
|
||||
"offset": {"x": 28, "y": 51},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"left": {
|
||||
"offset": {"x": 26, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"top": {
|
||||
"offset": {"x": 84, "y": 77},
|
||||
"mirror": {"x": true, "y": true},
|
||||
"angle": 0
|
||||
},
|
||||
"bottom": {
|
||||
"offset": {"x": 94, "y": 0},
|
||||
"mirror": {"x": true, "y": false},
|
||||
"angle": 0
|
||||
}
|
||||
},
|
||||
"unwrapMode": "custom",
|
||||
"visible": true,
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
}
|
||||
],
|
||||
"format": "character",
|
||||
BIN
MyEnderman.Enderman/Common/Items/Enderman/base.png
Normal file
BIN
MyEnderman.Enderman/Common/Items/Enderman/base.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
61
MyEnderman.Enderman/Common/Items/Enderman/dying.blockyanim
Normal file
61
MyEnderman.Enderman/Common/Items/Enderman/dying.blockyanim
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"formatVersion": 1,
|
||||
"duration": 22.5,
|
||||
"holdLastKeyframe": false,
|
||||
"nodeAnimations": {
|
||||
"armright": {
|
||||
"position": [],
|
||||
"orientation": [
|
||||
{
|
||||
"time": 0,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 23,
|
||||
"delta": {"x": 0, "y": 0, "z": -0.38268, "w": 0.92388},
|
||||
"interpolationType": "linear"
|
||||
}
|
||||
],
|
||||
"shapeStretch": [],
|
||||
"shapeVisible": [],
|
||||
"shapeUvOffset": []
|
||||
},
|
||||
"armleft": {
|
||||
"position": [],
|
||||
"orientation": [
|
||||
{
|
||||
"time": 0,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 23,
|
||||
"delta": {"x": 0, "y": 0, "z": 0.38268, "w": 0.92388},
|
||||
"interpolationType": "linear"
|
||||
}
|
||||
],
|
||||
"shapeStretch": [],
|
||||
"shapeVisible": [],
|
||||
"shapeUvOffset": []
|
||||
},
|
||||
"head": {
|
||||
"position": [
|
||||
{
|
||||
"time": 0,
|
||||
"delta": {"x": 0, "y": 0, "z": 0},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 23,
|
||||
"delta": {"x": 0, "y": 20, "z": 0},
|
||||
"interpolationType": "linear"
|
||||
}
|
||||
],
|
||||
"orientation": [],
|
||||
"shapeStretch": [],
|
||||
"shapeVisible": [],
|
||||
"shapeUvOffset": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"Parent": "Player",
|
||||
"Model": "Items/Enderman/Enderman.blockymodel",
|
||||
"Texture": "Items/Enderman/base.png",
|
||||
"EyeHeight": 1.6,
|
||||
"EyeHeight": 0,
|
||||
"CrouchOffset": -0.4,
|
||||
"HitBox": {
|
||||
"Max": {
|
||||
@@ -11,9 +11,9 @@
|
||||
"Z": 0.3
|
||||
},
|
||||
"Min": {
|
||||
"X": -0.3,
|
||||
"Y": 0,
|
||||
"Z": -0.3
|
||||
"Z": -0.3,
|
||||
"X": -0.3
|
||||
}
|
||||
},
|
||||
"AnimationSets": {
|
||||
@@ -46,9 +46,10 @@
|
||||
"Run": {
|
||||
"Animations": [
|
||||
{
|
||||
"Animation": "NPC/Undead/Skeleton/Animations/Default/Run.blockyanim",
|
||||
"Speed": 0.9,
|
||||
"SoundEventId": "SFX_Skeleton_Run"
|
||||
"Animation": "Items/Enderman/walk.blockyanim",
|
||||
"Speed": 2,
|
||||
"SoundEventId": "SFX_Skeleton_Run",
|
||||
"Looping": true
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -356,24 +357,10 @@
|
||||
"Death": {
|
||||
"Animations": [
|
||||
{
|
||||
"Animation": "NPC/Undead/Skeleton/Animations/Damage/Death.blockyanim",
|
||||
"Looping": false,
|
||||
"SoundEventId": "SFX_Skeleton_Death_1"
|
||||
},
|
||||
{
|
||||
"Animation": "NPC/Undead/Skeleton/Animations/Damage/Death2.blockyanim",
|
||||
"Looping": false,
|
||||
"SoundEventId": "SFX_Skeleton_Death_2"
|
||||
},
|
||||
{
|
||||
"Animation": "NPC/Undead/Skeleton/Animations/Damage/Death3.blockyanim",
|
||||
"Looping": false,
|
||||
"SoundEventId": "SFX_Skeleton_Death_3"
|
||||
},
|
||||
{
|
||||
"Animation": "NPC/Undead/Skeleton/Animations/Damage/Death4.blockyanim",
|
||||
"Looping": false,
|
||||
"SoundEventId": "SFX_Skeleton_Death_4"
|
||||
"Animation": "Items/Enderman/dying.blockyanim",
|
||||
"Looping": true,
|
||||
"SoundEventId": "SFX_Skeleton_Death_4",
|
||||
"Speed": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -460,6 +447,9 @@
|
||||
}
|
||||
},
|
||||
"GradientSet": "Colored_Cotton",
|
||||
"PhysicsValues": {
|
||||
"InvertedGravity": false
|
||||
},
|
||||
"DefaultAttachments": [
|
||||
{}
|
||||
]
|
||||
@@ -2,7 +2,7 @@
|
||||
"Type": "Variant",
|
||||
"Reference": "Template_Intelligent",
|
||||
"Modify": {
|
||||
"MaxHealth": 92,
|
||||
"MaxHealth": 70,
|
||||
"HearingRange": 8,
|
||||
"ViewSector": 270,
|
||||
"WakingPeriod": [
|
||||
@@ -1,17 +1,13 @@
|
||||
{
|
||||
"Environments": [
|
||||
"Env_Zone1_Plains",
|
||||
"Env_Zone1",
|
||||
"Env_Zone1_Azure",
|
||||
"Env_Zone1_Autumn",
|
||||
"Env_Zone1_Forests",
|
||||
"Env_Zone1_Mountains"
|
||||
"Env_Zone1"
|
||||
],
|
||||
"NPCs": [
|
||||
{
|
||||
"Weight": 25,
|
||||
"SpawnBlockSet": "Soil",
|
||||
"Id": "Enderman_Role",
|
||||
"Id": "Enderman_Entity",
|
||||
"Flock": "One_Or_Two"
|
||||
}
|
||||
],
|
||||
24
MyEnderman.Enderman/manifest.json
Normal file
24
MyEnderman.Enderman/manifest.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"Group": "MyEnderman",
|
||||
"Name": "Enderman",
|
||||
"Version": "0.1.0",
|
||||
"Description": "This mod adds the Enderman to Hytale! It spawns in Zone1 and teleports around. It also attacks you if you get near. UNDER CONSTRUCTION!",
|
||||
"Authors": [
|
||||
{
|
||||
"Name": "greiflo",
|
||||
"Email": "grflo7228@gmail.com"
|
||||
},
|
||||
{
|
||||
"Name": "tikaiz",
|
||||
"Email": "tikaiz@gmx.at"
|
||||
}
|
||||
],
|
||||
"Website": "",
|
||||
"Dependencies": {},
|
||||
"OptionalDependencies": {},
|
||||
"LoadBefore": {},
|
||||
"DisabledByDefault": false,
|
||||
"IncludesAssetPack": false,
|
||||
"ServerVersion": "2026.02.19-1a311a592",
|
||||
"SubPlugins": []
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1,314 +0,0 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "legright",
|
||||
"position": {"x": -16, "y": 62, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": 8, "y": -28.19108, "z": 5.29767},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 6, "y": 66, "z": 9}
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
"offset": {"x": 18, "y": 103},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"right": {
|
||||
"offset": {"x": 76, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"front": {
|
||||
"offset": {"x": 24, "y": 103},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"left": {
|
||||
"offset": {"x": 85, "y": 26},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"top": {
|
||||
"offset": {"x": 72, "y": 35},
|
||||
"mirror": {"x": true, "y": true},
|
||||
"angle": 0
|
||||
},
|
||||
"bottom": {
|
||||
"offset": {"x": 72, "y": 35},
|
||||
"mirror": {"x": true, "y": false},
|
||||
"angle": 0
|
||||
}
|
||||
},
|
||||
"unwrapMode": "custom",
|
||||
"visible": true,
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "cube",
|
||||
"position": {"x": 0, "y": 82, "z": 5},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": -0.5, "y": 0.5, "z": 0},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 33, "y": 51, "z": 12},
|
||||
"isStaticBox": true
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
"offset": {"x": 0, "y": 0},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"right": {
|
||||
"offset": {"x": 52, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"front": {
|
||||
"offset": {"x": 33, "y": 0},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"left": {
|
||||
"offset": {"x": 64, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"top": {
|
||||
"offset": {"x": 136, "y": 78},
|
||||
"mirror": {"x": true, "y": true},
|
||||
"angle": 0
|
||||
},
|
||||
"bottom": {
|
||||
"offset": {"x": 136, "y": 78},
|
||||
"mirror": {"x": true, "y": false},
|
||||
"angle": 0
|
||||
}
|
||||
},
|
||||
"unwrapMode": "custom",
|
||||
"visible": true,
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "cube",
|
||||
"position": {"x": 0, "y": 124, "z": -8},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": -1, "y": -3, "z": 12},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 28, "y": 26, "z": 26},
|
||||
"isStaticBox": true
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
"offset": {"x": 0, "y": 51},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"right": {
|
||||
"offset": {"x": 0, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"front": {
|
||||
"offset": {"x": 28, "y": 51},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"left": {
|
||||
"offset": {"x": 26, "y": 77},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"top": {
|
||||
"offset": {"x": 84, "y": 77},
|
||||
"mirror": {"x": true, "y": true},
|
||||
"angle": 0
|
||||
},
|
||||
"bottom": {
|
||||
"offset": {"x": 94, "y": 0},
|
||||
"mirror": {"x": true, "y": false},
|
||||
"angle": 0
|
||||
}
|
||||
},
|
||||
"unwrapMode": "custom",
|
||||
"visible": true,
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"name": "armright",
|
||||
"position": {"x": 0, "y": 102, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": -20, "y": -27, "z": 4.5},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 6, "y": 66, "z": 9}
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
"offset": {"x": 109, "y": 90},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"right": {
|
||||
"offset": {"x": 103, "y": 0},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"front": {
|
||||
"offset": {"x": 112, "y": 0},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"left": {
|
||||
"offset": {"x": 9, "y": 103},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"top": {
|
||||
"offset": {"x": 121, "y": 99},
|
||||
"mirror": {"x": true, "y": true},
|
||||
"angle": 0
|
||||
},
|
||||
"bottom": {
|
||||
"offset": {"x": 121, "y": 99},
|
||||
"mirror": {"x": true, "y": false},
|
||||
"angle": 0
|
||||
}
|
||||
},
|
||||
"unwrapMode": "custom",
|
||||
"visible": true,
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "5",
|
||||
"name": "armleft",
|
||||
"position": {"x": 0, "y": 104, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": 19, "y": -29, "z": 4.5},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 6, "y": 66, "z": 9}
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
"offset": {"x": 42, "y": 103},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"right": {
|
||||
"offset": {"x": 94, "y": 66},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"front": {
|
||||
"offset": {"x": 103, "y": 90},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"left": {
|
||||
"offset": {"x": 0, "y": 103},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"top": {
|
||||
"offset": {"x": 84, "y": 35},
|
||||
"mirror": {"x": true, "y": true},
|
||||
"angle": 0
|
||||
},
|
||||
"bottom": {
|
||||
"offset": {"x": 84, "y": 35},
|
||||
"mirror": {"x": true, "y": false},
|
||||
"angle": 0
|
||||
}
|
||||
},
|
||||
"unwrapMode": "custom",
|
||||
"visible": true,
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "6",
|
||||
"name": "legleft",
|
||||
"position": {"x": 0, "y": 63, "z": 0},
|
||||
"orientation": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"shape": {
|
||||
"type": "box",
|
||||
"offset": {"x": 8, "y": -30, "z": 4.5},
|
||||
"stretch": {"x": 1, "y": 1, "z": 1},
|
||||
"settings": {
|
||||
"isPiece": false,
|
||||
"size": {"x": 6, "y": 66, "z": 9}
|
||||
},
|
||||
"textureLayout": {
|
||||
"back": {
|
||||
"offset": {"x": 30, "y": 103},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"right": {
|
||||
"offset": {"x": 85, "y": 92},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"front": {
|
||||
"offset": {"x": 36, "y": 103},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"left": {
|
||||
"offset": {"x": 94, "y": 0},
|
||||
"mirror": {"x": false, "y": false},
|
||||
"angle": 0
|
||||
},
|
||||
"top": {
|
||||
"offset": {"x": 78, "y": 35},
|
||||
"mirror": {"x": true, "y": true},
|
||||
"angle": 0
|
||||
},
|
||||
"bottom": {
|
||||
"offset": {"x": 78, "y": 35},
|
||||
"mirror": {"x": true, "y": false},
|
||||
"angle": 0
|
||||
}
|
||||
},
|
||||
"unwrapMode": "custom",
|
||||
"visible": true,
|
||||
"doubleSided": false,
|
||||
"shadingMode": "flat"
|
||||
}
|
||||
}
|
||||
],
|
||||
"format": "character",
|
||||
"lod": "auto"
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1,139 +0,0 @@
|
||||
{
|
||||
"formatVersion": 1,
|
||||
"duration": 60,
|
||||
"holdLastKeyframe": false,
|
||||
"nodeAnimations": {
|
||||
"legright": {
|
||||
"position": [],
|
||||
"orientation": [
|
||||
{
|
||||
"time": 0,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 15,
|
||||
"delta": {"x": -0.21644, "y": 0, "z": 0, "w": 0.9763},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 30,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 45,
|
||||
"delta": {"x": 0.21644, "y": 0, "z": 0, "w": 0.9763},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 60,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
}
|
||||
],
|
||||
"shapeStretch": [],
|
||||
"shapeVisible": [],
|
||||
"shapeUvOffset": []
|
||||
},
|
||||
"armright": {
|
||||
"position": [],
|
||||
"orientation": [
|
||||
{
|
||||
"time": 0,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 15,
|
||||
"delta": {"x": 0.21644, "y": 0, "z": 0, "w": 0.9763},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 30,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 45,
|
||||
"delta": {"x": -0.21644, "y": 0, "z": 0, "w": 0.9763},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 60,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
}
|
||||
],
|
||||
"shapeStretch": [],
|
||||
"shapeVisible": [],
|
||||
"shapeUvOffset": []
|
||||
},
|
||||
"armleft": {
|
||||
"position": [],
|
||||
"orientation": [
|
||||
{
|
||||
"time": 0,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 15,
|
||||
"delta": {"x": -0.21644, "y": 0, "z": 0, "w": 0.9763},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 30,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 45,
|
||||
"delta": {"x": 0.21644, "y": 0, "z": 0, "w": 0.9763},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 60,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
}
|
||||
],
|
||||
"shapeStretch": [],
|
||||
"shapeVisible": [],
|
||||
"shapeUvOffset": []
|
||||
},
|
||||
"legleft": {
|
||||
"position": [],
|
||||
"orientation": [
|
||||
{
|
||||
"time": 0,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 15,
|
||||
"delta": {"x": 0.21644, "y": 0, "z": 0, "w": 0.9763},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 30,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 45,
|
||||
"delta": {"x": -0.21644, "y": 0, "z": 0, "w": 0.9763},
|
||||
"interpolationType": "linear"
|
||||
},
|
||||
{
|
||||
"time": 60,
|
||||
"delta": {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
"interpolationType": "linear"
|
||||
}
|
||||
],
|
||||
"shapeStretch": [],
|
||||
"shapeVisible": [],
|
||||
"shapeUvOffset": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"Group": "com.tikaiz",
|
||||
"Name": "Enderman",
|
||||
"Version": "1.0.0",
|
||||
"Description": "",
|
||||
"Authors": [],
|
||||
"Website": "",
|
||||
"Dependencies": {},
|
||||
"OptionalDependencies": {},
|
||||
"LoadBefore": {},
|
||||
"DisabledByDefault": false,
|
||||
"IncludesAssetPack": false,
|
||||
"SubPlugins": []
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
mvn package
|
||||
mv ./target/HytaleDemo-0.1.0.jar /home/tikaiz/.var/app/com.hypixel.HytaleLauncher/data/Hytale/UserData/Mods/
|
||||
mv ./target/EndermanPlugin-0.1.0.jar /home/tikaiz/.local/share/Hytale/UserData/Mods/
|
||||
4
pom.xml
4
pom.xml
@@ -4,8 +4,8 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.tikaiz</groupId>
|
||||
<artifactId>HytaleDemo</artifactId>
|
||||
<groupId>com.greiflo</groupId>
|
||||
<artifactId>EndermanPlugin</artifactId>
|
||||
<version>0.1.0</version>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -1,29 +1,24 @@
|
||||
package com.tikaiz.systems;
|
||||
package com.greiflo;
|
||||
|
||||
import com.hypixel.hytale.component.*;
|
||||
import com.hypixel.hytale.component.query.Query;
|
||||
import com.hypixel.hytale.component.system.tick.EntityTickingSystem;
|
||||
import com.hypixel.hytale.logger.HytaleLogger;
|
||||
import com.hypixel.hytale.server.core.modules.entity.component.DisplayNameComponent;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
import com.tikaiz.components.EndermanTeleportComponent;
|
||||
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
|
||||
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
|
||||
|
||||
import java.util.logging.Level;
|
||||
public class AddComponentsEnderman extends EntityTickingSystem<EntityStore> {
|
||||
|
||||
public class AddEndermanTeleportComponentTickSystem extends EntityTickingSystem<EntityStore> {
|
||||
private final ComponentType<EntityStore, EndermanTeleportComponent> endermanComponentType;
|
||||
|
||||
public AddEndermanTeleportComponentTickSystem(ComponentType<EntityStore, EndermanTeleportComponent> endermanComponentType) {
|
||||
private final ComponentType<EntityStore, EndermanComponent> endermanComponentType;
|
||||
|
||||
public AddComponentsEnderman(ComponentType<EntityStore, EndermanComponent> endermanComponentType) {
|
||||
this.endermanComponentType = endermanComponentType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick(float dt,
|
||||
int i,
|
||||
@NonNullDecl ArchetypeChunk<EntityStore> archetypeChunk,
|
||||
@NonNullDecl Store<EntityStore> store,
|
||||
@NonNullDecl CommandBuffer<EntityStore> commandBuffer) {
|
||||
public void tick(float v, int i, @NonNullDecl ArchetypeChunk<EntityStore> archetypeChunk, @NonNullDecl Store<EntityStore> store, @NonNullDecl CommandBuffer<EntityStore> commandBuffer) {
|
||||
Ref<EntityStore> ref = archetypeChunk.getReferenceTo(i);
|
||||
DisplayNameComponent displayNameComponent = store.getComponent(ref, DisplayNameComponent.getComponentType());
|
||||
assert displayNameComponent != null;
|
||||
@@ -32,13 +27,12 @@ public class AddEndermanTeleportComponentTickSystem extends EntityTickingSystem<
|
||||
if (!"Enderman".equals(displayName)){
|
||||
return;
|
||||
}
|
||||
commandBuffer.addComponent(ref, endermanComponentType, new EndermanTeleportComponent());
|
||||
// HytaleLogger.getLogger().atInfo().log("Added Component to ref: " + displayName);
|
||||
commandBuffer.addComponent(ref, endermanComponentType, new EndermanComponent());
|
||||
}
|
||||
|
||||
@NullableDecl
|
||||
@Override
|
||||
public Query<EntityStore> getQuery() {
|
||||
return Query.and(DisplayNameComponent.getComponentType(),Query.not(endermanComponentType));
|
||||
return Query.and(DisplayNameComponent.getComponentType(), Query.not(endermanComponentType));
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
package com.tikaiz.components;
|
||||
package com.greiflo;
|
||||
|
||||
import com.hypixel.hytale.component.Component;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class EndermanTeleportComponent implements Component<EntityStore> {
|
||||
public class EndermanComponent implements Component<EntityStore> {
|
||||
|
||||
private float tickInterval;
|
||||
private float elapsedTime;
|
||||
|
||||
public EndermanTeleportComponent(float tickInterval, float elapsedTime) {
|
||||
public EndermanComponent(float tickInterval, float elapsedTime) {
|
||||
this.tickInterval = tickInterval;
|
||||
this.elapsedTime = elapsedTime;
|
||||
}
|
||||
|
||||
public EndermanTeleportComponent() {
|
||||
public EndermanComponent() {
|
||||
this(10f, 0f);
|
||||
randomizeTickInterval();
|
||||
}
|
||||
|
||||
public EndermanTeleportComponent(EndermanTeleportComponent other) {
|
||||
public EndermanComponent(EndermanComponent other) {
|
||||
this.tickInterval = other.tickInterval;
|
||||
this.elapsedTime = other.elapsedTime;
|
||||
}
|
||||
@@ -45,10 +45,10 @@ public class EndermanTeleportComponent implements Component<EntityStore> {
|
||||
@Nullable
|
||||
@Override
|
||||
public Component<EntityStore> clone() {
|
||||
return new EndermanTeleportComponent(this);
|
||||
return new EndermanComponent(this);
|
||||
}
|
||||
|
||||
public void randomizeTickInterval() {
|
||||
tickInterval = (float) ((Math.random()*20)+10);
|
||||
tickInterval = (float) ((Math.random()*25)+5);
|
||||
}
|
||||
}
|
||||
61
src/main/java/com/greiflo/EndermanDamageHandler.java
Normal file
61
src/main/java/com/greiflo/EndermanDamageHandler.java
Normal file
@@ -0,0 +1,61 @@
|
||||
package com.greiflo;
|
||||
|
||||
import com.hypixel.hytale.component.ArchetypeChunk;
|
||||
import com.hypixel.hytale.component.CommandBuffer;
|
||||
import com.hypixel.hytale.component.ComponentType;
|
||||
import com.hypixel.hytale.component.Store;
|
||||
import com.hypixel.hytale.component.query.Query;
|
||||
import com.hypixel.hytale.component.system.EntityEventSystem;
|
||||
import com.hypixel.hytale.server.core.modules.entity.component.DisplayNameComponent;
|
||||
import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
|
||||
import com.hypixel.hytale.server.core.modules.entity.damage.Damage;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
|
||||
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
|
||||
|
||||
import static com.greiflo.EndermanTeleportTickingSystem.EndermanTeleport;
|
||||
|
||||
public class EndermanDamageHandler extends EntityEventSystem<EntityStore, Damage> {
|
||||
|
||||
|
||||
protected EndermanDamageHandler(ComponentType<EntityStore, EndermanComponent> endermanComponentType) {
|
||||
super(Damage.class);
|
||||
this.endermanComponentType = endermanComponentType;
|
||||
}
|
||||
|
||||
private final ComponentType<EntityStore, EndermanComponent> endermanComponentType;
|
||||
|
||||
@Override
|
||||
public void handle(int i, @NonNullDecl ArchetypeChunk<EntityStore> archetypeChunk, @NonNullDecl Store<EntityStore> store, @NonNullDecl CommandBuffer<EntityStore> commandBuffer, @NonNullDecl Damage damage) {
|
||||
var ref = archetypeChunk.getReferenceTo(i);
|
||||
TransformComponent transformComponent = store.getComponent(ref, TransformComponent.getComponentType());
|
||||
EndermanComponent endermanTeleportComponent = store.getComponent(ref, endermanComponentType);
|
||||
|
||||
var entityName = store.getComponent(ref, DisplayNameComponent.getComponentType());
|
||||
|
||||
var teleportChance = Math.random()*100;
|
||||
|
||||
if (endermanTeleportComponent != null) {
|
||||
endermanTeleportComponent.resetElapsedTime();
|
||||
}
|
||||
var chance = (int)teleportChance;
|
||||
if(chance > 15) return;
|
||||
|
||||
//if(entityName != null && entityName.getDisplayName() != null) NotificationUtil.sendNotificationToUniverse(entityName.getDisplayName());
|
||||
|
||||
if(entityName == null || entityName.getDisplayName() == null) return;
|
||||
var raw = entityName.getDisplayName().getAnsiMessage();
|
||||
//NotificationUtil.sendNotificationToUniverse(raw);
|
||||
|
||||
if(!"Enderman".equals(raw)) return;
|
||||
|
||||
EndermanTeleport(ref, transformComponent.getPosition(), commandBuffer);
|
||||
|
||||
}
|
||||
|
||||
@NullableDecl
|
||||
@Override
|
||||
public Query<EntityStore> getQuery() {
|
||||
return Query.any();
|
||||
}
|
||||
}
|
||||
24
src/main/java/com/greiflo/EndermanPlugin.java
Normal file
24
src/main/java/com/greiflo/EndermanPlugin.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.greiflo;
|
||||
|
||||
import com.hypixel.hytale.server.core.event.events.player.PlayerReadyEvent;
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPlugin;
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class EndermanPlugin extends JavaPlugin {
|
||||
|
||||
public EndermanPlugin(@Nonnull JavaPluginInit init) {
|
||||
super(init);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setup() {
|
||||
var type = this.getEntityStoreRegistry()
|
||||
.registerComponent(EndermanComponent.class, EndermanComponent::new);
|
||||
this.getEntityStoreRegistry().registerSystem(new AddComponentsEnderman(type));
|
||||
this.getEntityStoreRegistry().registerSystem(new EndermanTeleportTickingSystem(type));
|
||||
this.getEntityStoreRegistry().registerSystem(new EndermanDamageHandler(type));
|
||||
|
||||
}
|
||||
}
|
||||
58
src/main/java/com/greiflo/EndermanTeleportTickingSystem.java
Normal file
58
src/main/java/com/greiflo/EndermanTeleportTickingSystem.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package com.greiflo;
|
||||
|
||||
import com.hypixel.hytale.component.*;
|
||||
import com.hypixel.hytale.component.query.Query;
|
||||
import com.hypixel.hytale.component.system.tick.EntityTickingSystem;
|
||||
import com.hypixel.hytale.math.vector.Vector3d;
|
||||
import com.hypixel.hytale.math.vector.Vector3f;
|
||||
import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
|
||||
import com.hypixel.hytale.server.core.modules.entity.teleport.Teleport;
|
||||
import com.hypixel.hytale.server.core.universe.world.ParticleUtil;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
|
||||
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
|
||||
|
||||
public class EndermanTeleportTickingSystem extends EntityTickingSystem<EntityStore> {
|
||||
private final ComponentType<EntityStore, EndermanComponent> endermanComponentType;
|
||||
|
||||
public EndermanTeleportTickingSystem(ComponentType<EntityStore, EndermanComponent> endermanComponentType) {
|
||||
this.endermanComponentType = endermanComponentType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick(float dt, int i, @NonNullDecl ArchetypeChunk<EntityStore> archetypeChunk, @NonNullDecl Store<EntityStore> store, @NonNullDecl CommandBuffer<EntityStore> commandBuffer) {
|
||||
Ref<EntityStore> ref = archetypeChunk.getReferenceTo(i);
|
||||
EndermanComponent endermanTeleportComponent = store.getComponent(ref, endermanComponentType);
|
||||
assert endermanTeleportComponent != null;
|
||||
var transformComponent = store.getComponent(ref, TransformComponent.getComponentType());
|
||||
assert transformComponent != null;
|
||||
|
||||
|
||||
endermanTeleportComponent.addElapsedTime(dt);
|
||||
if (endermanTeleportComponent.getElapsedTime() >= endermanTeleportComponent.getTickInterval()) {
|
||||
endermanTeleportComponent.resetElapsedTime();
|
||||
endermanTeleportComponent.randomizeTickInterval();
|
||||
EndermanTeleport(ref, transformComponent.getPosition(), commandBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector3d randomTeleport(Vector3d position) {
|
||||
Vector3d addPos = new Vector3d((Math.random() * 20) - 10, 3, (Math.random() * 20) - 10);
|
||||
|
||||
return position.add(addPos);
|
||||
}
|
||||
public static void EndermanTeleport(Ref<EntityStore> ref, Vector3d position, CommandBuffer<EntityStore> commandBuffer) {
|
||||
ParticleUtil.spawnParticleEffect("Effect_Death",position,commandBuffer);
|
||||
Vector3d newPos = randomTeleport(position);
|
||||
ParticleUtil.spawnParticleEffect("Effect_Death",position,commandBuffer);
|
||||
|
||||
Teleport teleportForPlayer = Teleport.createForPlayer(newPos, new Vector3f());
|
||||
commandBuffer.addComponent(ref, Teleport.getComponentType(), teleportForPlayer);
|
||||
}
|
||||
|
||||
@NullableDecl
|
||||
@Override
|
||||
public Query<EntityStore> getQuery() {
|
||||
return Query.and(endermanComponentType, TransformComponent.getComponentType());
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.tikaiz;
|
||||
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPlugin;
|
||||
import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
|
||||
import com.tikaiz.commands.ExampleCommand;
|
||||
import com.tikaiz.components.EndermanTeleportComponent;
|
||||
import com.tikaiz.systems.AddEndermanTeleportComponentTickSystem;
|
||||
import com.tikaiz.systems.EndermanComponentTickSystem;
|
||||
import com.tikaiz.systems.DamageEventSystem;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class HytaleDemo extends JavaPlugin {
|
||||
|
||||
public HytaleDemo(@Nonnull JavaPluginInit init) {
|
||||
super(init);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setup() {
|
||||
this.getCommandRegistry().registerCommand(new ExampleCommand());
|
||||
var type = this.getEntityStoreRegistry()
|
||||
.registerComponent(EndermanTeleportComponent.class, EndermanTeleportComponent::new);
|
||||
this.getEntityStoreRegistry().registerSystem(new AddEndermanTeleportComponentTickSystem(type));
|
||||
this.getEntityStoreRegistry().registerSystem(new EndermanComponentTickSystem(type));
|
||||
this.getEntityStoreRegistry().registerSystem(new DamageEventSystem(type));
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package com.tikaiz.commands;
|
||||
|
||||
import com.hypixel.hytale.component.Ref;
|
||||
import com.hypixel.hytale.component.Store;
|
||||
import com.hypixel.hytale.math.vector.Vector3d;
|
||||
import com.hypixel.hytale.math.vector.Vector3f;
|
||||
import com.hypixel.hytale.server.core.Message;
|
||||
import com.hypixel.hytale.server.core.command.system.CommandContext;
|
||||
import com.hypixel.hytale.server.core.command.system.arguments.system.DefaultArg;
|
||||
import com.hypixel.hytale.server.core.command.system.arguments.types.ArgTypes;
|
||||
import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand;
|
||||
import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
|
||||
import com.hypixel.hytale.server.core.modules.entity.teleport.Teleport;
|
||||
import com.hypixel.hytale.server.core.universe.PlayerRef;
|
||||
import com.hypixel.hytale.server.core.universe.world.World;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ExampleCommand extends AbstractPlayerCommand {
|
||||
|
||||
public ExampleCommand() {
|
||||
super("tel", "Super test command!");
|
||||
}
|
||||
|
||||
DefaultArg<List<Double>> arg = this.withListDefaultArg("Pos", "Position", ArgTypes.DOUBLE, new ArrayList<>(),"Tell the Player the Position");
|
||||
|
||||
@Override
|
||||
protected void execute(@Nonnull CommandContext commandContext,
|
||||
@Nonnull Store<EntityStore> store,
|
||||
@Nonnull Ref<EntityStore> ref,
|
||||
@Nonnull PlayerRef playerRef,
|
||||
@Nonnull World world) {
|
||||
int size = arg.get(commandContext).size();
|
||||
playerRef.sendMessage(Message.raw("Arg size: " + size));
|
||||
if (!(size == 3 || size == 0)){
|
||||
|
||||
playerRef.sendMessage(Message.raw("Either specify 0 or 3 Arguments"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var transform = store.getComponent(ref, TransformComponent.getComponentType());
|
||||
if (transform == null) return;
|
||||
if (size == 0){
|
||||
var pos = transform.getPosition();
|
||||
playerRef.sendMessage(Message.raw("Player Position: " + pos));
|
||||
return;
|
||||
}
|
||||
var x = arg.get(commandContext).get(0);
|
||||
var y = arg.get(commandContext).get(1);
|
||||
var z = arg.get(commandContext).get(2);
|
||||
|
||||
var newPos = new Vector3d(x,y,z);
|
||||
|
||||
Teleport teleportForPlayer = Teleport.createForPlayer(newPos, new Vector3f());
|
||||
store.addComponent(ref,Teleport.getComponentType(),teleportForPlayer);
|
||||
|
||||
playerRef.sendMessage(Message.raw("Set Player Position to: " + newPos));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.tikaiz.helpers;
|
||||
|
||||
import com.hypixel.hytale.component.CommandBuffer;
|
||||
import com.hypixel.hytale.component.Ref;
|
||||
import com.hypixel.hytale.math.vector.Vector3d;
|
||||
import com.hypixel.hytale.math.vector.Vector3f;
|
||||
import com.hypixel.hytale.server.core.modules.entity.teleport.Teleport;
|
||||
import com.hypixel.hytale.server.core.universe.world.ParticleUtil;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
|
||||
public abstract class TeleportHelper {
|
||||
|
||||
public static Vector3d randomTeleport(Vector3d position) {
|
||||
Vector3d addPos = new Vector3d((Math.random() * 20) - 10, 3, (Math.random() * 20) - 10);
|
||||
|
||||
return position.add(addPos);
|
||||
}
|
||||
public static void EndermanTeleport(Ref<EntityStore> ref, Vector3d position, CommandBuffer<EntityStore> commandBuffer) {
|
||||
ParticleUtil.spawnParticleEffect("Effect_Death",position,commandBuffer);
|
||||
Vector3d newPos = randomTeleport(position);
|
||||
ParticleUtil.spawnParticleEffect("Effect_Death",position,commandBuffer);
|
||||
|
||||
Teleport teleportForPlayer = Teleport.createForPlayer(newPos, new Vector3f());
|
||||
commandBuffer.addComponent(ref, Teleport.getComponentType(), teleportForPlayer);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.tikaiz.systems;
|
||||
|
||||
import com.hypixel.hytale.component.*;
|
||||
import com.hypixel.hytale.component.query.Query;
|
||||
import com.hypixel.hytale.component.system.EntityEventSystem;
|
||||
import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
|
||||
import com.hypixel.hytale.server.core.modules.entity.damage.Damage;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
import com.tikaiz.components.EndermanTeleportComponent;
|
||||
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
|
||||
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
|
||||
|
||||
import static com.tikaiz.helpers.TeleportHelper.EndermanTeleport;
|
||||
|
||||
public class DamageEventSystem extends EntityEventSystem<EntityStore, Damage> {
|
||||
private final ComponentType<EntityStore, EndermanTeleportComponent> endermanTeleportComponentType;
|
||||
|
||||
public DamageEventSystem(ComponentType<EntityStore, EndermanTeleportComponent> type) {
|
||||
super(Damage.class);
|
||||
this.endermanTeleportComponentType = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(int i,
|
||||
@NonNullDecl ArchetypeChunk<EntityStore> archetypeChunk,
|
||||
@NonNullDecl Store<EntityStore> store,
|
||||
@NonNullDecl CommandBuffer<EntityStore> commandBuffer,
|
||||
@NonNullDecl Damage damage) {
|
||||
Ref<EntityStore> ref = archetypeChunk.getReferenceTo(i);
|
||||
var transformComponent = store.getComponent(ref, TransformComponent.getComponentType());
|
||||
assert transformComponent != null;
|
||||
var endermanComponent = store.getComponent(ref, endermanTeleportComponentType);
|
||||
assert endermanComponent != null;
|
||||
|
||||
endermanComponent.resetElapsedTime();
|
||||
if (Math.random() < 0.15) {
|
||||
EndermanTeleport(ref,transformComponent.getPosition(),commandBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@NullableDecl
|
||||
@Override
|
||||
public Query<EntityStore> getQuery() {
|
||||
return Query.and(TransformComponent.getComponentType(), endermanTeleportComponentType);
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.tikaiz.systems;
|
||||
|
||||
import com.hypixel.hytale.component.*;
|
||||
import com.hypixel.hytale.component.query.Query;
|
||||
import com.hypixel.hytale.component.system.tick.EntityTickingSystem;
|
||||
import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
import com.tikaiz.components.EndermanTeleportComponent;
|
||||
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
|
||||
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
|
||||
|
||||
import static com.tikaiz.helpers.TeleportHelper.EndermanTeleport;
|
||||
|
||||
public class EndermanComponentTickSystem extends EntityTickingSystem<EntityStore> {
|
||||
private final ComponentType<EntityStore, EndermanTeleportComponent> endermanComponentType;
|
||||
|
||||
public EndermanComponentTickSystem(ComponentType<EntityStore, EndermanTeleportComponent> poisonComponentType) {
|
||||
this.endermanComponentType = poisonComponentType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick(float dt,
|
||||
int i,
|
||||
@NonNullDecl ArchetypeChunk<EntityStore> archetypeChunk,
|
||||
@NonNullDecl Store<EntityStore> store,
|
||||
@NonNullDecl CommandBuffer<EntityStore> commandBuffer) {
|
||||
Ref<EntityStore> ref = archetypeChunk.getReferenceTo(i);
|
||||
EndermanTeleportComponent endermanTeleportComponent = store.getComponent(ref, endermanComponentType);
|
||||
assert endermanTeleportComponent != null;
|
||||
var transformComponent = store.getComponent(ref, TransformComponent.getComponentType());
|
||||
assert transformComponent != null;
|
||||
|
||||
|
||||
endermanTeleportComponent.addElapsedTime(dt);
|
||||
if (endermanTeleportComponent.getElapsedTime() >= endermanTeleportComponent.getTickInterval()) {
|
||||
endermanTeleportComponent.resetElapsedTime();
|
||||
endermanTeleportComponent.randomizeTickInterval();
|
||||
EndermanTeleport(ref,transformComponent.getPosition(),commandBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@NullableDecl
|
||||
@Override
|
||||
public Query<EntityStore> getQuery() {
|
||||
return Query.and(endermanComponentType, TransformComponent.getComponentType());
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,22 @@
|
||||
{
|
||||
"Group": "com.tikaiz",
|
||||
"Name": "Hytale Plugin Demo",
|
||||
"Group": "com.greiflo",
|
||||
"Name": "EndermanPlugin",
|
||||
"Version": "${version}",
|
||||
"Description": "Description of your plugin",
|
||||
"Description": "Enderman Plugin",
|
||||
"Authors": [
|
||||
{
|
||||
"Name": "Tikaiz",
|
||||
"Email": "tikaiz@gmx.at"
|
||||
"Name": "It's you!"
|
||||
}
|
||||
],
|
||||
"ServerVersion": "*",
|
||||
"Dependencies": {},
|
||||
"OptionalDependencies": {},
|
||||
"Website": "",
|
||||
"ServerVersion": "2026.02.19-1a311a592",
|
||||
"Dependencies": {
|
||||
|
||||
},
|
||||
"OptionalDependencies": {
|
||||
|
||||
},
|
||||
"DisabledByDefault": false,
|
||||
"IncludesAssetPack": false,
|
||||
"Main": "com.tikaiz.HytaleDemo"
|
||||
}
|
||||
"Main": "com.greiflo.EndermanPlugin"
|
||||
}
|
||||
Reference in New Issue
Block a user