-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
418 lines (360 loc) · 19.2 KB
/
index.html
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
<!DOCTYPE html>
<html>
<head>
<title>Bedrock Block/Item Generator</title>
<link rel="stylesheet" type="text/css" href="./css/main.css">
</head>
<body>
<nav>
<h1 class="text header-text">Bedrock Item/Block Generator</h1>
<div class="header-text">
<h class="text">Made by </h>
<a class="text" href="https://twitter.com/realwither/">Wither</a>
<h class="text"> from </h>
<a class="text" href="https://entitybuilds.com/">Entity Builds</a>
</div>
</nav>
<div class="main-container">
<div id="settings-container">
<div id="generic-settings" class="settings">
<h2 class="text">Basic Settings</h2>
<div class="option">
<label class="text">Identifier: </label>
<input type="text" class="input" placeholder="Unique identifier of your item/block" id="identifier"
oninput="generate()">
</div>
<div class="option">
<label class="text">Translated Name: </label>
<input type="text" class="input" placeholder="Translated name of your item/block"
id="translated-name"
oninput="generate()">
</div>
<div class="option">
<label title="If enabled, the item/block will only appear if Experimetal Gameplay is enabled"
class="text">Is Experimental: </label>
<input type="checkbox" id="is-experimental" oninput="generate()">
</div>
<div class="option">
<label class="text">Type:</label>
<select class="input" id="type" onchange="showSettings()" oninput="generate()">
<option value="item">Item</option>
<option value="block">Block</option>
</select>
</div>
<div class="option">
<label class="text">Texture path: </label>
<input class="input" type="text"
placeholder="The path to your item's/block's texture relative to the pack"
id="texture-path" oninput="generate()">
</div>
</div>
<div id="item-settings" class="settings">
<h2 class="text">Item Settings</h2>
<div class="option">
<label class="text">Item Category: </label>
<select class="input" id="item-category" oninput="generate()">
<option value="Nature">Nature</option>
<option value="Items">Items</option>
<option value="Equipment">Equipment</option>
<option value="Construction">Construction</option>
</select>
</div>
<div class="option">
<label class="text">Use Animation: </label>
<select class="input" id="use-animation" oninput="generate()">
<option value="none">None</option>
<option value="eat">Eating</option>
<option value="camera">Camera</option>
</select>
</div>
<div class="option">
<label class="text">Hover Text Color: </label>
<select class="input" id="hover-text-color" oninput="generate()">
<option value="none">None</option>
<option value="black">Black</option>
<option value="dark_blue">Dark Blue</option>
<option value="dark_green">Dark Green</option>
<option value="dark_aqua">Dark Aqua</option>
<option value="dark_red">Dark Red</option>
<option value="dark_purple">Dark Purple</option>
<option value="gold">Gold</option>
<option value="gray">Gray</option>
<option value="dark_gray">Dark Gray</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
<option value="aqua">Aqua</option>
<option value="red">Red</option>
<option value="light_purple">Light Purple</option>
<option value="yellow">Yellow</option>
<option value="white">White</option>
</select>
</div>
<div class="option">
<label class="text">Places Block: </label>
<input class="input" type="text" placeholder="Identifier of the block to place"
id="places-block" oninput="generate()">
</div>
<div class="option">
<label class="text" title="If enabled, the item will look enchanted">Is Enchanted: </label>
<input type="checkbox" id="enchant-glint"
oninput="generate()">
</div>
<div class="option">
<label class="text">Is Food: </label>
<input type="checkbox" id="is-food" onclick="updateFood()"
oninput="generate()">
</div>
<div id="food-settings" class="sub-option" style="display: none;">
<div class="option">
<label class="text">Nutrition: </label>
<input class="input" type="number"
placeholder="Food points gained upon eating this item" id="nutrition"
oninput="generate()">
</div>
<div class="option">
<label title="If enabled, the item will be edible even when the hunger bar is full"
class="text">Can always eat: </label>
<input type="checkbox" id="can-always-eat"
oninput="generate()">
</div>
<div class="option">
<label class="text">When eaten, convert to: </label>
<input class="input" type="text"
placeholder="ID of the item to convert to after being consumed" id="convert-to"
oninput="generate()">
</div>
<div class="option">
<label class="text">Saturation modifier: </label>
<select class="input" id="saturation-modifier" oninput="generate()">
<option value="low">Low</option>
<option value="normal">Normal</option>
<option value="good">Good</option>
<option value="high">High</option>
<option value="supernatural">Supernatural</option>
</select>
</div>
<div class="option">
<label class="text">Action on use: </label>
<select class="input" id="use-action" oninput="generate()">
<option value="none">None</option>
<option value="chorus_teleport">Chorus Teleport</option>
</select>
</div>
<div class="option">
<label class="text">Effects:</label>
<button class="green-button" onclick="addEffect()">Add Effect</button>
</div>
<div class="option" id="effects-list">
</div>
</div>
<div class="option">
<label title="If enabled, the item will be rendered like a sword when held" class="text">Is Hand
Equipped: </label>
<input type="checkbox" id="is-hand-equipped"
oninput="generate()">
</div>
<div class="option">
<label class="text">Max Damage: </label>
<input class="input" type="number"
placeholder="The amount of damage the item does" id="max-damage" oninput="generate()">
</div>
<div class="option">
<label class="text">Max Stack Size: </label>
<input class="input" type="number"
placeholder="How much the item can be stacked upon" id="max-stack-size" oninput="generate()">
</div>
<div class="option">
<label class="text">Is Crop: </label>
<input type="checkbox" id="is-crop" onclick="updateCrop()">
</div>
<div id="crop-settings" class="sub-option" style="display: none;">
<div class="option">
<label class="text">Crop: </label>
<input class="input" type="text"
placeholder="ID of the crop this item places" id="crop-id" oninput="generate()">
</div>
<div class="option">
<label class="text">Plantable on:</label>
<button class="green-button" onclick="addBlock()">Add Block</button>
</div>
<div class="option" id="crop-blocks-list">
</div>
</div>
<div class="option">
<label title="If enabled, this item will only stack with items of the same data value"
class="text">Stacked by data: </label>
<input type="checkbox" id="stacked-by-data"
oninput="generate()">
</div>
<div class="option">
<label class="text">Use Duration: </label>
<input class="input" type="number"
placeholder="The amount of time it takes to use the item" id="use-duration"
oninput="generate()">
</div>
</div>
<div id="block-settings" style="display: none;" class="settings">
<h2 class="text">Block Settings</h2>
<div class="option">
<label title="If enabled, the item will appear in the Creative menu" class="text">Register to
creative menu: </label>
<input type="checkbox" id="register-creative" oninput="generate()">
</div>
<div class="option">
<label class="text">Loot Table: </label>
<input class="input" type="text" placeholder="Loot table for the block" id="loottable"
oninput="generate()">
</div>
<div class="option">
<label class="text">Destroy Time: </label>
<input class="input" type="number"
placeholder="Time it takes for the block to be destroyed" id="destroy-time"
oninput="generate()">
</div>
<div class="option">
<label class="text">Explosion Resistance: </label>
<input class="input" type="number" placeholder="Block's resistance to explosions"
id="explosion-resistance" oninput="generate()">
</div>
<div class="option">
<label class="text">Friction: </label>
<input class="input" type="number" min="0.1" step="0.1" stepplaceholder="Block's friction"
id="friction"
oninput="generate()">
</div>
<div class="option">
<label class="text">Flammable: </label>
<input id="flammable" type="checkbox" onclick="updateFlammable()" oninput="generate()">
</div>
<div id="flammable-settings" class="sub-option" style="display: none;">
<div class="option">
<label class="text">Flame odds: </label>
<input class="input" type="number" placeholder="How likely the block will catch fire"
id="flame-odds" oninput="generate()">
</div>
<div class="option">
<label class="text">Burn odds: </label>
<input class="input" type="number" placeholder="How likely the block will be destroyed by fire"
id="burn-odds" oninput="generate()">
</div>
</div>
<div class="option">
<label class="text">Map Color: </label>
<input class="input" type="color" id="map-color" oninput="generate()">
</div>
<div class="option">
<label class="text">Light Absorption: </label>
<input class="input" type="number" min="0" max="16" step="1"
placeholder="Amount of light this block absorbs"
id="light-absorption" oninput="generate()">
</div>
<div class="option">
<label class="text">Light Emission: </label>
<input class="input" type="number" min="0" max="1" step="0.1"
placeholder="Amount of light this block emits"
id="light-emission" oninput="generate()">
</div>
</div>
<div id="output" class="settings">
<h2 class="text">Behavior Pack</h2>
<p class="text">Paste this into your behavior item definition file!</p>
<div>
<textarea id="behavior-result" readonly></textarea>
<button class="blue-button"
onclick="behaviorResult.select();document.execCommand('copy')">Copy</button>
</div>
<h2 class="text">Resource Pack</h2>
<p class="text">Paste this into your resource item definition file! (blocks.json if it's a block)</p>
<div>
<textarea id="resource-result" readonly></textarea>
<button class="blue-button"
onclick="resourceResult.select();document.execCommand('copy')">Copy</button>
</div>
<h2 class="text">Texture Atlas</h2>
<p class="text">Paste this into your texture atlas!</p>
<div>
<textarea id="texture-atlas-result" readonly></textarea>
<button class="blue-button"
onclick="atlasResult.select();document.execCommand('copy')">Copy</button>
</div>
<h2 class="text">Language Translation</h2>
<p class="text">Paste this into your translation file!</p>
<div>
<textarea id="lang-result" readonly></textarea>
<button class="blue-button"
onclick="atlasResult.select();document.execCommand('copy')">Copy</button>
</div>
</div>
</div>
</div>
<!--TEMPLATES-->
<div class="crop-block sub-option" id="crop-block-template" style="display: none;">
<div class="option">
<label class="text">Block ID:</label>
<input class="input" type="text" placeholder="ID of a block this crop can be placed on"
oninput="generate()">
</div>
<div class="option">
<button class="blue-button" onclick="cloneBlock(this)">Clone Block</button>
<button class="red-button" onclick="deleteBlock(this)">Remove Block</button>
</div>
</div>
<div class="effect sub-option" id="effect-template" style="display: none;">
<div class="option">
<label class="text">Effect: </label>
<select class="input" id="effect-name" oninput="generate()">
<option value="absorption">Absorption</option>
<option value="bad_omen">Bad Omen</option>
<option value="blindness">Blindness</option>
<option value="conduit_power">Conduit Power</option>
<option value="empty">Empty</option>
<option value="fatal_poison">Fatal Poison</option>
<option value="fire_resistance">Fire Resistance</option>
<option value="haste">Haste</option>
<option value="health_boost">Health Boost</option>
<option value="hunger">Hunger</option>
<option value="instant_damage">Instant Damage</option>
<option value="instant_health">Instant Health</option>
<option value="invisibility">Invisibility</option>
<option value="jump_boost">Jump Boost</option>
<option value="levitation">Levitation</option>
<option value="mining_fatigue">Mining Fatigue</option>
<option value="nausea">Nausea</option>
<option value="night_vision">Night Vision</option>
<option value="poison">Poison</option>
<option value="regeneration">Regeneration</option>
<option value="resistance">Resistance</option>
<option value="saturation">Saturation</option>
<option value="slow_falling">Slow Falling</option>
<option value="slowness">Slowness</option>
<option value="speed">Speed</option>
<option value="strength">Strength</option>
<option value="village_hero">Village Hero</option>
<option value="water_breathing">Water Breathing</option>
<option value="weakness">Weakness</option>
<option value="wither">Wither</option>
</select>
</div>
<div class="option">
<label class="text">Chance: </label>
<input class="input" type="number" min="0" step="0.1" max="1"
placeholder="Chance to get this effect" id="effect-chance" oninput="generate()">
</div>
<div class="option">
<label class="text">Duration: </label>
<input class="input" type="number" min="0"
placeholder="Duration of this effect" id="effect-duration" oninput="generate()">
</div>
<div class="option">
<label class="text">Amplifier: </label>
<input class="input" type="number" min="0"
placeholder="Amplifier of this effect" id="effect-amplifier" oninput="generate()">
</div>
<div class="option">
<button onclick="deleteEffect(this)" class="red-button">Delete Effect</button>
<button onclick="cloneEffect(this)" class="blue-button">Clone Effect</button>
</div>
</div>
<script src="./src/index.js"></script>
</body>
</html>