-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcurseforge-description.html
More file actions
228 lines (208 loc) · 11.6 KB
/
curseforge-description.html
File metadata and controls
228 lines (208 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<h2><span style="color: #5b8def;">HyperProtect-Mixin</span> - Server-Level Event Interception for Hytale</h2>
<p>Intercept. Protect. Extend. <strong>HyperProtect-Mixin</strong> injects <span style="color: #5b8def;">20 protection hooks</span> into the Hytale server via <span style="color: #5b8def;">Hyxin bytecode mixins</span>, exposing them through a <span style="color: #5b8def;">lock-free bridge API</span> that any mod can consume — no compile-time dependency required.</p>
<p>Zero configuration. Fail-open safety. Drop it in and your protection mod handles the rest.</p>
<p> </p>
<h2><span style="color: #f0b232;">Why HyperProtect-Mixin?</span></h2>
<ul>
<li><strong><span style="color: #f0b232;">20 Protection Hooks</span></strong> - Comprehensive coverage across building, combat, items, entities, containers, transport, commands, and logging</li>
<li><strong><span style="color: #f0b232;">22 Mixin Interceptors</span></strong> - Multiple injection points per hook for thorough event capture, with consolidated interaction gates covering 24 interaction types</li>
<li><strong><span style="color: #f0b232;">Lock-Free Bridge</span></strong> - <code>AtomicReferenceArray</code> with zero-contention reads — no ConcurrentHashMap overhead</li>
<li><strong><span style="color: #f0b232;">Fail-Open Safety</span></strong> - Errors, missing hooks, or negative verdicts always allow actions — never locks players out</li>
<li><strong><span style="color: #f0b232;">Zero Configuration</span></strong> - Auto-initializes on server startup. No config files needed.</li>
<li><strong><span style="color: #f0b232;">No Compile-Time Dependency</span></strong> - Consumer mods register hooks via <code>System.getProperties()</code> — works across classloader boundaries</li>
</ul>
<p> </p>
<h2><span style="color: #e06c75;">Comparison with OrbisGuard-Mixins</span></h2>
<table>
<thead>
<tr>
<th></th>
<th>HyperProtect-Mixin</th>
<th>OrbisGuard-Mixins</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Hook Count</strong></td>
<td><span style="color: #98c379;">20 hooks (23 interceptors)</span></td>
<td>11 hooks</td>
</tr>
<tr>
<td><strong>Bridge Type</strong></td>
<td><span style="color: #98c379;">AtomicReferenceArray (lock-free)</span></td>
<td>ConcurrentHashMap</td>
</tr>
<tr>
<td><strong>Safety Model</strong></td>
<td><span style="color: #98c379;">Fail-open (errors = allow)</span></td>
<td>Varies</td>
</tr>
<tr>
<td><strong>Bypass Handling</strong></td>
<td><span style="color: #98c379;">Hook decides (decoupled)</span></td>
<td>Mixin checks permissions</td>
</tr>
<tr>
<td><strong>Message Formatting</strong></td>
<td><span style="color: #98c379;">Built-in &-code + hex colors</span></td>
<td>None</td>
</tr>
<tr>
<td><strong>Feature Detection</strong></td>
<td><span style="color: #98c379;">Per-interceptor properties</span></td>
<td>Single property</td>
</tr>
<tr>
<td><strong>Spawn Protection</strong></td>
<td><span style="color: #98c379;">Configurable startup blocking</span></td>
<td>None</td>
</tr>
<tr>
<td><strong>OG Coexistence</strong></td>
<td><span style="color: #98c379;">Auto-detects OG, disables conflicting mixins</span></td>
<td>No awareness of other mixin mods</td>
</tr>
</tbody>
</table>
<p> </p>
<h2><span style="color: #5b8def;">Hook Coverage</span></h2>
<h3><span style="color: #d19a66;">Building (7 hooks)</span></h3>
<ul>
<li><strong><span style="color: #61afef;">block_break</span></strong> (slot 0) — Block harvesting and interactive item pickup</li>
<li><strong><span style="color: #61afef;">explosion</span></strong> (slot 1) — Explosion block damage</li>
<li><strong><span style="color: #61afef;">fire_spread</span></strong> (slot 2) — Fire fluid spreading</li>
<li><strong><span style="color: #61afef;">builder_tools</span></strong> (slot 3) — Builder tool paste operations</li>
<li><strong><span style="color: #61afef;">block_place</span></strong> (slot 18) — Block placement</li>
<li><strong><span style="color: #61afef;">hammer</span></strong> (slot 19) — Hammer block cycling (variant rotation)</li>
<li><strong><span style="color: #61afef;">use</span></strong> (slot 20) — Block state changes and interactions (farming, state toggles, general use)</li>
</ul>
<h3><span style="color: #c678dd;">Items (3 hooks)</span></h3>
<ul>
<li><strong><span style="color: #61afef;">item_pickup</span></strong> (slot 4) — Proximity item pickup</li>
<li><strong><span style="color: #61afef;">death_drop</span></strong> (slot 5) — Keep-inventory-on-death behavior</li>
<li><strong><span style="color: #61afef;">durability</span></strong> (slot 6) — Item durability loss prevention</li>
</ul>
<h3><span style="color: #56b6c2;">Containers (2 hooks)</span></h3>
<ul>
<li><strong><span style="color: #61afef;">container_access</span></strong> (slot 7) — Crafting/workbench access</li>
<li><strong><span style="color: #61afef;">container_open</span></strong> (slot 17) — Storage container opening</li>
</ul>
<h3><span style="color: #e06c75;">Combat (1 hook)</span></h3>
<ul>
<li><strong><span style="color: #61afef;">entity_damage</span></strong> (slot 16) — Player-initiated damage (PvP and PvE)</li>
</ul>
<h3><span style="color: #98c379;">Entities (2 hooks)</span></h3>
<ul>
<li><strong><span style="color: #61afef;">mob_spawn</span></strong> (slot 8) — NPC/mob spawning (4 interceptors: marker, chunk, NPC, entity load)</li>
<li><strong><span style="color: #61afef;">respawn</span></strong> (slot 22) — Player respawn location override (returns coordinates, not verdict)</li>
</ul>
<h3><span style="color: #e5c07b;">Transport (3 hooks)</span></h3>
<ul>
<li><strong><span style="color: #61afef;">teleporter</span></strong> (slot 9) — Teleporter block use</li>
<li><strong><span style="color: #61afef;">portal</span></strong> (slot 10) — All portal and instance interactions (6 interaction types)</li>
<li><strong><span style="color: #61afef;">seat</span></strong> (slot 21) — Block seating (chairs, benches)</li>
</ul>
<h3><span style="color: #abb2bf;">Commands & Logging (2 hooks)</span></h3>
<ul>
<li><strong><span style="color: #61afef;">command</span></strong> (slot 11) — Command execution filtering</li>
<li><strong><span style="color: #61afef;">interaction_log</span></strong> (slot 12) — Desync log suppression</li>
</ul>
<p> </p>
<h2><span style="color: #98c379;">Architecture</span></h2>
<h3>Bridge Design</h3>
<p>The bridge is a 24-element <code>AtomicReferenceArray<Object></code> stored in <code>System.getProperties()</code> under <code>"hyperprotect.bridge"</code>. Consumer mods place hook objects at fixed slot indices; interceptors read from those slots at runtime via cached <code>MethodHandle</code> lookups.</p>
<h3>Verdict Protocol</h3>
<table>
<thead>
<tr>
<th>Value</th>
<th>Name</th>
<th>Behavior</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>0</code></td>
<td>ALLOW</td>
<td>Action proceeds normally</td>
</tr>
<tr>
<td><code>1</code></td>
<td>DENY_WITH_MESSAGE</td>
<td>Blocked; calls <code>fetch*DenyReason()</code> and sends formatted message</td>
</tr>
<tr>
<td><code>2</code></td>
<td>DENY_SILENT</td>
<td>Blocked, no message</td>
</tr>
<tr>
<td><code>3</code></td>
<td>DENY_MOD_HANDLES</td>
<td>Blocked, consumer mod handles messaging</td>
</tr>
<tr>
<td>negative</td>
<td>ALLOW</td>
<td>Fail-open safety</td>
</tr>
</tbody>
</table>
<h3>Feature Detection</h3>
<p>Each interceptor sets a system property on load. Consumer mods can check exactly which hooks are available:</p>
<pre>boolean loaded = "true".equals(System.getProperty("hyperprotect.bridge.active"));
boolean hasBlockBreak = "true".equals(System.getProperty("hyperprotect.intercept.block_break"));</pre>
<p> </p>
<h2><span style="color: #5b8def;">For Server Admins</span></h2>
<ol>
<li>Create an <code>earlyplugins/</code> folder in your server directory</li>
<li>Place <a href="https://www.curseforge.com/hytale/mods/hyxin" rel="nofollow">Hyxin</a> and <strong>HyperProtect-Mixin</strong> JARs in <code>earlyplugins/</code> (NOT mods/)</li>
<li>Add <code>--accept-early-plugins</code> to your server start script</li>
<li>Place your protection mod (e.g., <a href="https://www.curseforge.com/hytale/mods/hyperfactions" rel="nofollow">HyperFactions</a>) in <code>mods/</code></li>
</ol>
<p><strong>Linux:</strong></p>
<pre>DEFAULT_ARGS="--accept-early-plugins --assets ../Assets.zip"</pre>
<p><strong>Windows:</strong></p>
<pre>set DEFAULT_ARGS=--accept-early-plugins --assets ../Assets.zip</pre>
<p><span style="color: #98c379;"><strong>That's it.</strong> Zero configuration required. HyperProtect-Mixin auto-initializes and consumer mods register hooks automatically.</span></p>
<p> </p>
<h2><span style="color: #c678dd;">For Developers</span></h2>
<p>Register hooks with no compile-time dependency:</p>
<pre>@SuppressWarnings("unchecked")
AtomicReferenceArray<Object> bridge = (AtomicReferenceArray<Object>)
System.getProperties().get("hyperprotect.bridge");
// Register a block break hook at slot 0
bridge.set(0, new Object() {
public int evaluate(UUID playerUuid, String worldName, int x, int y, int z) {
if (isProtected(worldName, x, y, z)) return 1; // DENY_WITH_MESSAGE
return 0; // ALLOW
}
public String fetchDenyReason(UUID playerUuid, String worldName, int x, int y, int z) {
return "&#FF5555You cannot break blocks here!";
}
});</pre>
<p>See the <a href="https://github.com/HyperSystemsDev/HyperProtect-Mixin/tree/main/docs" rel="nofollow">full documentation</a> for all 20 hook signatures and integration patterns.</p>
<p> </p>
<h2><span style="color: #61afef;">Integration</span></h2>
<ul>
<li><strong><a href="https://www.curseforge.com/hytale/mods/hyperfactions" rel="nofollow">HyperFactions</a></strong> — Primary consumer. Uses all 20 hooks for territory protection, PvP control, keep inventory, spawn blocking, and more.</li>
<li><strong>Any mod</strong> — The bridge API is open. Any mod can register hooks at any slot to implement custom protection logic.</li>
</ul>
<p> </p>
<h2><span style="color: #56b6c2;">Requirements</span></h2>
<ul>
<li>Hytale Server (Early Access)</li>
<li><a href="https://www.curseforge.com/hytale/mods/hyxin" rel="nofollow">Hyxin</a> (v0.0.11+) — Mixin framework for Hytale</li>
<li><code>--accept-early-plugins</code> server flag</li>
</ul>
<p> </p>
<h2>Links</h2>
<ul>
<li><a href="https://www.hypersystems.dev/" rel="nofollow">HyperSystems Website</a></li>
<li><a href="https://github.com/HyperSystemsDev/HyperProtect-Mixin" rel="nofollow">GitHub Repository</a></li>
<li><a href="https://github.com/HyperSystemsDev/HyperProtect-Mixin/tree/main/docs" rel="nofollow">Documentation</a></li>
<li><a href="https://github.com/HyperSystemsDev/HyperProtect-Mixin/issues" rel="nofollow">Issue Tracker</a></li>
<li><a href="https://discord.com/invite/aZaa5vcFYh" rel="nofollow">Discord</a></li>
</ul>
<p> </p>
<p><em>Part of the <a href="https://www.hypersystems.dev/" rel="nofollow">HyperSystems</a> suite — built for Hytale, open source, and actively maintained.</em></p>