generated from jaredlll08/MultiLoader-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d1ea4d
commit 3aacc3d
Showing
9 changed files
with
88 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Spirit 2.2.2 | ||
Added zooming pinch and drag to REI/JEI | ||
> Fix keybind issue | ||
> Fixed broken loot tables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
common/src/main/resources/data/spirit/loot_tables/blocks/compressed_soul_powder_block.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"rolls": 1, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "spirit:compressed_soul_powder_block" | ||
} | ||
], | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
] | ||
} | ||
] | ||
} |
19 changes: 19 additions & 0 deletions
19
common/src/main/resources/data/spirit/loot_tables/blocks/compressed_soul_sand.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"rolls": 1, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "spirit:compressed_soul_sand" | ||
} | ||
], | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
forge/src/main/java/me/codexadrian/spirit/forge/KeybindHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package me.codexadrian.spirit.forge; | ||
|
||
import com.mojang.blaze3d.platform.InputConstants; | ||
import me.codexadrian.spirit.network.NetworkHandler; | ||
import me.codexadrian.spirit.network.messages.ToggleEmpoweredPacket; | ||
import net.minecraft.client.KeyMapping; | ||
import net.minecraftforge.client.event.RegisterKeyMappingsEvent; | ||
import net.minecraftforge.event.TickEvent; | ||
import net.minecraftforge.eventbus.api.SubscribeEvent; | ||
import org.lwjgl.glfw.GLFW; | ||
|
||
public class KeybindHandler { | ||
|
||
private static final KeyMapping EMPOWER_KEYBIND = new KeyMapping( | ||
"key.spirit.toggle", // The translation key of the keybinding's name | ||
InputConstants.Type.KEYSYM, // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse. | ||
GLFW.GLFW_KEY_V, // The keycode of the key | ||
"category.spirit.keybinds" // The translation key of the keybinding's category. | ||
); | ||
|
||
public static void registerKeyBinding(RegisterKeyMappingsEvent event) { | ||
event.register(EMPOWER_KEYBIND); | ||
} | ||
|
||
@SubscribeEvent | ||
public void onClientTick(TickEvent.ClientTickEvent event) { | ||
if (event.phase == TickEvent.Phase.END) { // Only call code once as the tick event is called twice every tick | ||
while (EMPOWER_KEYBIND.consumeClick()) { | ||
NetworkHandler.sendToServer(new ToggleEmpoweredPacket()); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters