added health and portal_cooldown
This commit is contained in:
1 parent
c6973d35f6
commit
bc9f3e89e0
2 files changed
+49
-7
No files matched your search
@@ -60,7 +60,10 @@ public abstract class ServerChunkManager_tickMixin
|
|||||||
private boolean skipChunkTicking(ServerWorld serverWorld)
|
private boolean skipChunkTicking(ServerWorld serverWorld)
|
||||||
{
|
{
|
||||||
boolean debug = serverWorld.isDebugWorld();
|
boolean debug = serverWorld.isDebugWorld();
|
||||||
if (!TickSpeed.process_entities) {
|
if (!TickSpeed.process_entities)
|
||||||
|
{
|
||||||
|
// simplified chunk tick iteration assuming world is frozen otherwise as suggested by Hadron67
|
||||||
|
// to be kept in sync with the original injection source
|
||||||
if (!debug){
|
if (!debug){
|
||||||
List<ChunkHolder> holders = Lists.newArrayList(((ThreadedAnvilChunkStorageInterface)threadedAnvilChunkStorage).getChunks());
|
List<ChunkHolder> holders = Lists.newArrayList(((ThreadedAnvilChunkStorageInterface)threadedAnvilChunkStorage).getChunks());
|
||||||
Collections.shuffle(holders);
|
Collections.shuffle(holders);
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ Current supported actions
|
|||||||
- current selected paths for all living entities
|
- current selected paths for all living entities
|
||||||
- movement speeds per block and coordinate
|
- movement speeds per block and coordinate
|
||||||
- item pickup range
|
- item pickup range
|
||||||
|
- portal cooldown timers
|
||||||
|
- health
|
||||||
- buddy villager detection for villagers
|
- buddy villager detection for villagers
|
||||||
- hostile detection for villagers
|
- hostile detection for villagers
|
||||||
- iron golem spawning for villagers
|
- iron golem spawning for villagers
|
||||||
@@ -45,6 +47,8 @@ velocity() -> __toggle('velocity', null);
|
|||||||
villager_breeding() -> __toggle('villager_breeding', null);
|
villager_breeding() -> __toggle('villager_breeding', null);
|
||||||
villager_buddy_detection() -> __toggle('villager_buddy_detection', null);
|
villager_buddy_detection() -> __toggle('villager_buddy_detection', null);
|
||||||
item_pickup() -> __toggle('item_pickup', null);
|
item_pickup() -> __toggle('item_pickup', null);
|
||||||
|
portal_cooldown() -> __toggle('portal_cooldown', null);
|
||||||
|
health() -> __toggle('health', null);
|
||||||
|
|
||||||
|
|
||||||
toggle_boxes() ->
|
toggle_boxes() ->
|
||||||
@@ -272,9 +276,12 @@ global_functions = {
|
|||||||
ppos = global_entity_positions:id;
|
ppos = global_entity_positions:id;
|
||||||
dpos = ppos-cpos;
|
dpos = ppos-cpos;
|
||||||
dpos = dpos*20/global_interval;
|
dpos = dpos*20/global_interval;
|
||||||
labels += ['xvel', 'x speed:', str('%.3f',dpos:0)];
|
if (dpos != [0, 0, 0],
|
||||||
labels += ['yvel', 'y speed:', str('%.3f',dpos:1)];
|
labels += ['speed', 'speed: ', str('%.3f',sqrt(reduce(dpos, _a+_*_, 0)))];
|
||||||
labels += ['zvel', 'z speed:', str('%.3f',dpos:2)];
|
labels += ['xvel', 'x speed:', str('%.3f',dpos:0)];
|
||||||
|
labels += ['yvel', 'y speed:', str('%.3f',dpos:1)];
|
||||||
|
labels += ['zvel', 'z speed:', str('%.3f',dpos:2)];
|
||||||
|
)
|
||||||
);
|
);
|
||||||
global_entity_positions:id = pos(e);
|
global_entity_positions:id = pos(e);
|
||||||
path = e ~ 'path';
|
path = e ~ 'path';
|
||||||
@@ -287,6 +294,31 @@ global_functions = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'portal_cooldown' -> {
|
||||||
|
'*' -> [
|
||||||
|
_(arg) -> _(e) -> (
|
||||||
|
portal_timer = e~'portal_timer';
|
||||||
|
if (portal_timer,
|
||||||
|
[[], [], [['portal', 'portal cooldown:', portal_timer]]]
|
||||||
|
,
|
||||||
|
[[], [], []]
|
||||||
|
)
|
||||||
|
),
|
||||||
|
,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
'health' -> {
|
||||||
|
'*' -> [
|
||||||
|
_(arg) -> _(e) -> (
|
||||||
|
[[], [], [['health', 'health:', e~'health']]]
|
||||||
|
),
|
||||||
|
,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
'pathfinding' -> {
|
'pathfinding' -> {
|
||||||
'*' -> [
|
'*' -> [
|
||||||
_(arg) -> _(e) -> (
|
_(arg) -> _(e) -> (
|
||||||
@@ -464,14 +496,21 @@ __handle_entity(e) ->
|
|||||||
if (labels_to_add,
|
if (labels_to_add,
|
||||||
base_pos = [0.5, e~'height'+0.4, 0.5];
|
base_pos = [0.5, e~'height'+0.4, 0.5];
|
||||||
base_height = 0;
|
base_height = 0;
|
||||||
|
snap = if(e~'type'=='player', 'xyz', 'dxydz');
|
||||||
for (labels_to_add,
|
for (labels_to_add,
|
||||||
if (length(_) == 2,
|
if (length(_) == 2,
|
||||||
[label, text] = _;
|
[label, text] = _;
|
||||||
shapes_to_display += ['label', global_duration, 'text', label, 'value', text, 'pos', base_pos, 'follow', e, 'height', base_height, 'snap', 'dxydz'];
|
shapes_to_display += [
|
||||||
|
'label', global_duration, 'text', label, 'value', text,
|
||||||
|
'pos', base_pos, 'follow', e, 'height', base_height, 'snap', snap];
|
||||||
,
|
,
|
||||||
[label, annot, value] = _;
|
[label, annot, value] = _;
|
||||||
shapes_to_display += ['label', global_duration, 'text', format('gi '+annot), 'pos', base_pos, 'follow', e, 'height', base_height, 'align', 'right', 'indent', -0.2, 'snap', 'dxydz'];
|
shapes_to_display += [
|
||||||
shapes_to_display += ['label', global_duration, 'text', label,'value', value, 'pos', base_pos, 'follow', e, 'height', base_height, 'align', 'left', 'snap', 'dxydz'];
|
'label', global_duration, 'text', format('gi '+annot), 'pos', base_pos,
|
||||||
|
'follow', e, 'height', base_height, 'align', 'right', 'indent', -0.2, 'snap', snap];
|
||||||
|
shapes_to_display += [
|
||||||
|
'label', global_duration, 'text', label,'value', value,
|
||||||
|
'pos', base_pos, 'follow', e, 'height', base_height, 'align', 'left', 'snap', snap];
|
||||||
);
|
);
|
||||||
base_height += 1;
|
base_height += 1;
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user