Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions run/server.properties

This file was deleted.

14 changes: 14 additions & 0 deletions src/generated/resources/assets/gtmutils/lang/en_ud.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"behaviour.paintspray.infinite.fluid_storage": "ᗺɯ %s / %sɟ§ :ʇuıɐԀq§",
"behaviour.paintspray.infinite.status.color": "%sɟ§ :ǝpoWㄥ§",
"behaviour.paintspray.infinite.status.solvent": "ʇuǝʌןoS",
"behaviour.paintspray.infinite.tooltip.current_color": "%s :ɹoןoƆ ʇuǝɹɹnƆ",
"behaviour.paintspray.infinite.tooltip.info": "˙ʇuıɐd oʇㄥ§ ʞɔıןɔ-ʇɥbıᴚǝ§",
"behaviour.paintspray.infinite.tooltip.info_1": "˙ʇuıɐd uıɐɥɔ oʇㄥ§ ʞɔoןq ǝןqɐʇuıɐd uo ʞɔıןɔ-ʇɥbıᴚ + ʇɟıɥSǝ§",
"behaviour.paintspray.infinite.tooltip.info_2": "˙nuǝW uoıʇɔǝןǝS ɹoןoƆ uǝdo oʇㄥ§ ʞɔıןɔ-ʇɥbıᴚ + ʇɟıɥSǝ§",
"behaviour.paintspray.infinite.tooltip.solvent": ")buıuɐǝןƆ( ʇuǝʌןoSq§ :ǝpoWㄥ§",
"behaviour.paintspray.solvent.short": "ʇuǝʌןoS",
"block.gtmutils.enlarged_stocking_bus.desc.0": "ʞɹoʍʇǝu ƎW ǝɥʇ ɯoɹɟ ʎןʇɔǝɹıp sɯǝʇı sǝʌǝıɹʇǝᴚ",
"block.gtmutils.enlarged_stocking_bus.desc.1": "ʇsıן buıʞɔoʇs ǝbɹɐן-ɐɹʇxƎ",
"block.gtmutils.enlarged_stocking_bus.desc.2": "sɯǝʇı ƎW ʇuɐpunqɐ ʇsoɯ ǝɥʇ ɥʇıʍ ʇsıן ǝɥʇ ןןıɟ uɐɔ ןןnԀ-oʇnⱯ",
Expand Down Expand Up @@ -72,6 +81,7 @@
"config.gtmutils.option.enlargedStockingSizeRows": "sʍoᴚǝzıSbuıʞɔoʇSpǝbɹɐןuǝ",
"config.gtmutils.option.expandedBuffersEnabled": "pǝןqɐuƎsɹǝɟɟnᗺpǝpuɐdxǝ",
"config.gtmutils.option.features": "sǝɹnʇɐǝɟ",
"config.gtmutils.option.infiniteSprayCanEnabled": "pǝןqɐuƎuɐƆʎɐɹdSǝʇıuıɟuı",
"config.gtmutils.option.omnibreakerEnabled": "pǝןqɐuƎɹǝʞɐǝɹqıuɯo",
"config.gtmutils.option.omnibreakerEnergyCapacity": "ʎʇıɔɐdɐƆʎbɹǝuƎɹǝʞɐǝɹqıuɯo",
"config.gtmutils.option.omnibreakerTier": "ɹǝı⟘ɹǝʞɐǝɹqıuɯo",
Expand All @@ -95,6 +105,7 @@
"gtmutils.multiblock.pterb_machine.coolant_usage": "puoɔǝs ɹǝd %s ɟo qɯ%s suıɐɹᗡɔ§",
"gtmutils.pterb.current_frequency": "%s :ʎɔuǝnbǝɹɟ ʇuǝɹɹnƆ",
"gtmutils.pterb_machine.invalid_frequency": "¡0 ʎɔuǝnbǝɹɟ uo ʞɹoʍ ʇou ןןıʍ s⟘ⱯM",
"gui.gtmutils.color_select.title": "ɹoןoƆ ʇɔǝןǝS",
"item.gtceu.tool.ev_buzzsaw": ")ΛƎ( ʍɐszznᗺ %s",
"item.gtceu.tool.ev_chainsaw": ")ΛƎ( ʍɐsuıɐɥƆ %s",
"item.gtceu.tool.ev_screwdriver": ")ΛƎ( ɹǝʌıɹpʍǝɹɔS ɔıɹʇɔǝןƎ %s",
Expand Down Expand Up @@ -125,6 +136,7 @@
"item.gtmutils.cupronickel_credit": "ʇıpǝɹƆ ןǝʞɔıuoɹdnƆ",
"item.gtmutils.doge_coin": "uıoƆ ǝboᗡ",
"item.gtmutils.gold_credit": "ʇıpǝɹƆ pןo⅁",
"item.gtmutils.infinite_spray_can": "uɐƆ ʎɐɹdS ǝʇıuıɟuI",
"item.gtmutils.luv_power_unit": "ʇıu∩ ɹǝʍoԀ ΛnꞀ",
"item.gtmutils.naquadah_credit": "ʇıpǝɹƆ ɥɐpɐnbɐN",
"item.gtmutils.neutronium_credit": "ʇıpǝɹƆ ɯnıuoɹʇnǝN",
Expand All @@ -134,6 +146,8 @@
"item.gtmutils.silver_credit": "ʇıpǝɹƆ ɹǝʌןıS",
"item.gtmutils.zpm_power_unit": "ʇıu∩ ɹǝʍoԀ WԀZ",
"itemGroup.gtmutils.creative_tab": "sǝıʇıןıʇ∩ uɹǝpoW ɥɔǝ⟘bǝɹ⅁",
"key.categories.gtmutils": "sןıʇ∩ W⟘⅁",
"key.gtmutils.spray_can_menu": "nuǝW ןɐıpɐᴚ uɐƆ ʎɐɹdS uǝdO",
"material.gtmutils.quantum_coolant": "ʇuɐןooƆ ɯnʇuɐnὉ",
"tooltip.omnibreaker.can_break_anything": "¡⅁NIH⟘ʎNⱯ ǝuıɯ-ɐʇsuı uɐɔ ɹǝʞɐǝɹq-ıuɯO ǝɥ⟘",
"tooltip.omnibreaker.charge_status": "∩Ǝ %s / ∩Ǝ %s :ʎbɹǝuƎ",
Expand Down
14 changes: 14 additions & 0 deletions src/generated/resources/assets/gtmutils/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"behaviour.paintspray.infinite.fluid_storage": "§bPaint: §f%s / %s mB",
"behaviour.paintspray.infinite.status.color": "§7Mode: §f%s",
"behaviour.paintspray.infinite.status.solvent": "Solvent",
"behaviour.paintspray.infinite.tooltip.current_color": "Current Color: %s",
"behaviour.paintspray.infinite.tooltip.info": "§eRight-click §7to paint.",
"behaviour.paintspray.infinite.tooltip.info_1": "§eShift + Right-click on paintable block §7to chain paint.",
"behaviour.paintspray.infinite.tooltip.info_2": "§eShift + Right-click §7to open Color Selection Menu.",
"behaviour.paintspray.infinite.tooltip.solvent": "§7Mode: §bSolvent (Cleaning)",
"behaviour.paintspray.solvent.short": "Solvent",
"block.gtmutils.enlarged_stocking_bus.desc.0": "Retrieves items directly from the ME network",
"block.gtmutils.enlarged_stocking_bus.desc.1": "Extra-large stocking list",
"block.gtmutils.enlarged_stocking_bus.desc.2": "Auto-Pull can fill the list with the most abundant ME items",
Expand Down Expand Up @@ -72,6 +81,7 @@
"config.gtmutils.option.enlargedStockingSizeRows": "enlargedStockingSizeRows",
"config.gtmutils.option.expandedBuffersEnabled": "expandedBuffersEnabled",
"config.gtmutils.option.features": "features",
"config.gtmutils.option.infiniteSprayCanEnabled": "infiniteSprayCanEnabled",
"config.gtmutils.option.omnibreakerEnabled": "omnibreakerEnabled",
"config.gtmutils.option.omnibreakerEnergyCapacity": "omnibreakerEnergyCapacity",
"config.gtmutils.option.omnibreakerTier": "omnibreakerTier",
Expand All @@ -95,6 +105,7 @@
"gtmutils.multiblock.pterb_machine.coolant_usage": "§cDrains %smb of %s per second",
"gtmutils.pterb.current_frequency": "Current frequency: %s",
"gtmutils.pterb_machine.invalid_frequency": "WATs will not work on frequency 0!",
"gui.gtmutils.color_select.title": "Select Color",
"item.gtceu.tool.ev_buzzsaw": "%s Buzzsaw (EV)",
"item.gtceu.tool.ev_chainsaw": "%s Chainsaw (EV)",
"item.gtceu.tool.ev_screwdriver": "%s Electric Screwdriver (EV)",
Expand Down Expand Up @@ -125,6 +136,7 @@
"item.gtmutils.cupronickel_credit": "Cupronickel Credit",
"item.gtmutils.doge_coin": "Doge Coin",
"item.gtmutils.gold_credit": "Gold Credit",
"item.gtmutils.infinite_spray_can": "Infinite Spray Can",
"item.gtmutils.luv_power_unit": "LuV Power Unit",
"item.gtmutils.naquadah_credit": "Naquadah Credit",
"item.gtmutils.neutronium_credit": "Neutronium Credit",
Expand All @@ -134,6 +146,8 @@
"item.gtmutils.silver_credit": "Silver Credit",
"item.gtmutils.zpm_power_unit": "ZPM Power Unit",
"itemGroup.gtmutils.creative_tab": "GregTech Modern Utilities",
"key.categories.gtmutils": "GTM Utils",
"key.gtmutils.spray_can_menu": "Open Spray Can Radial Menu",
"material.gtmutils.quantum_coolant": "Quantum Coolant",
"tooltip.omnibreaker.can_break_anything": "The Omni-breaker can insta-mine ANYTHING!",
"tooltip.omnibreaker.charge_status": "Energy: %s EU / %s EU",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "gtmutils:item/tools/infinite_spray_can"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
import net.minecraft.world.item.Items;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.RegisterGuiOverlaysEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.neganote.gtutilities.client.renderer.SprayCanHudOverlay;
import net.neganote.gtutilities.client.renderer.UtilShaders;
import net.neganote.gtutilities.common.data.UtilPlaceholders;
import net.neganote.gtutilities.common.item.UtilItems;
Expand All @@ -34,6 +36,7 @@
import net.neganote.gtutilities.common.tools.UtilToolConnection;
import net.neganote.gtutilities.config.UtilConfig;
import net.neganote.gtutilities.datagen.UtilDatagen;
import net.neganote.gtutilities.network.UtilsNetwork;

import com.tterrag.registrate.util.entry.RegistryEntry;
import org.apache.logging.log4j.LogManager;
Expand Down Expand Up @@ -108,6 +111,7 @@ public static ResourceLocation id(String path) {

private void commonSetup(final FMLCommonSetupEvent event) {
event.enqueueWork(() -> {
UtilsNetwork.init();
LOGGER.info("Hello from common setup! This is *after* registries are done, so we can do this:");
LOGGER.info("Look, I found a {}!", Items.DIAMOND);
});
Expand All @@ -133,6 +137,17 @@ public void clientSetup(final FMLClientSetupEvent event) {
});
}

@Mod.EventBusSubscriber(modid = GregTechModernUtilities.MOD_ID,
bus = Mod.EventBusSubscriber.Bus.MOD,
value = Dist.CLIENT)
public static class ClientModBusEvents {

@SubscribeEvent
public static void registerGuiOverlays(RegisterGuiOverlaysEvent event) {
event.registerAboveAll("spray_can_info", SprayCanHudOverlay.HUD_SPRAY_CAN);
}
}

// You MUST have this for custom materials.
// Remember to register them not to GT's namespace, but your own.
private void addMaterialRegistries(MaterialRegistryEvent event) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
package net.neganote.gtutilities.client.event;

import net.minecraft.client.Minecraft;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.HitResult;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.InputEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.neganote.gtutilities.GregTechModernUtilities;
import net.neganote.gtutilities.client.gui.screen.ColorRadialMenuScreen;
import net.neganote.gtutilities.client.keybind.UtilKeybinds;
import net.neganote.gtutilities.common.item.InfiniteSprayCanItem;
import net.neganote.gtutilities.network.UtilsNetwork;
import net.neganote.gtutilities.network.packet.SelectColorPacket;

@Mod.EventBusSubscriber(modid = GregTechModernUtilities.MOD_ID,
bus = Mod.EventBusSubscriber.Bus.FORGE,
value = Dist.CLIENT)
public class ClientTickHandler {

@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;

Minecraft mc = Minecraft.getInstance();
if (mc.player == null || mc.level == null) return;

if (UtilKeybinds.SPRAY_CAN_MENU.consumeClick()) {
ItemStack stack = mc.player.getMainHandItem();
if (stack.getItem() instanceof InfiniteSprayCanItem) {
mc.setScreen(new ColorRadialMenuScreen(InteractionHand.MAIN_HAND));
}
}
}

@SubscribeEvent
public static void onMouseScroll(InputEvent.MouseScrollingEvent event) {
Minecraft mc = Minecraft.getInstance();

if (mc.player == null || mc.screen != null) return;

if (mc.options.keyShift.isDown()) {
ItemStack stack = mc.player.getMainHandItem();
if (stack.getItem() instanceof InfiniteSprayCanItem) {
double scrollDelta = event.getScrollDelta();

event.setCanceled(true);

int currentColor = stack.getOrCreateTag().getInt("color");
if (!stack.getOrCreateTag().contains("color")) currentColor = -1;

int direction = scrollDelta > 0 ? 1 : -1;
int nextColor = currentColor + direction;

if (nextColor < -1) nextColor = 15;
if (nextColor > 15) nextColor = -1;

UtilsNetwork.CHANNEL.sendToServer(new SelectColorPacket(InteractionHand.MAIN_HAND, nextColor));

mc.player.playSound(SoundEvents.UI_BUTTON_CLICK.value(), 0.1f, 1.5f + (nextColor * 0.05f));
}
}
}

@SubscribeEvent
public static void onRightClick(InputEvent.InteractionKeyMappingTriggered event) {
Minecraft mc = Minecraft.getInstance();
if (mc.player == null) return;

if (!event.isUseItem()) return;
ItemStack stack = mc.player.getMainHandItem();
if (!(stack.getItem() instanceof InfiniteSprayCanItem)) return;

if (!mc.player.isShiftKeyDown()) return;
if (mc.hitResult == null || mc.hitResult.getType() != HitResult.Type.MISS) return;

event.setCanceled(true);
mc.setScreen(new ColorRadialMenuScreen(InteractionHand.MAIN_HAND));
}
}
Loading
Loading