Compare commits

..
11 Commits
Author SHA1 Message Date
Abdiel Kavash f7a608bf2b cleanup 2024-03-10 07:11:50 +01:00
Abdiel Kavash 787bed088f TileEntitySolarBase 2024-03-10 07:11:50 +01:00
Abdiel Kavash d57ee09abf TileEntityBaseGenerator 2024-03-10 07:11:50 +01:00
Abdiel Kavash 6a7262c066 bs + dep 2024-03-10 07:11:50 +01:00
Martin Robertz 31cf03db4e update 2024-02-18 22:00:37 +01:00
Sampsa 224ae70609 Apply boot speed bonus unidirectionally 2024-02-18 20:25:55 +01:00
kamenskyi 4d2d360be2 Update ru_RU.lang 2024-02-12 19:52:34 +01:00
Raven Szewczyk eed4618ace [ci skip] upgraded build system 2024-02-04 19:58:09 +00:00
chochem f3e84bcda0 RA2 EMT 2024-01-14 23:02:31 +01:00
Martin Robertz c7e649e292 update bs+deps 2024-01-12 00:24:58 +01:00
Raven Szewczyk e41e40f425 [ci skip] upgraded build system 2024-01-08 21:25:15 +00:00
16 changed files with 286 additions and 1748 deletions

No files matched your search

+2 -1605
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -1,8 +1,8 @@
// Add your dependencies here
dependencies {
api 'com.github.GTNewHorizons:GT5-Unofficial:5.09.44.98:dev'
api 'com.github.GTNewHorizons:Baubles:1.0.3:dev'
api 'com.github.GTNewHorizons:GT5-Unofficial:5.09.45.95:dev'
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev'
api 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
api 'thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev'
+151 -23
View File
@@ -1,64 +1,192 @@
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
# LOCAL to test local config updates.
gtnh.settings.blowdryerTag = 0.2.0
# Human-readable mod name, available for mcmod.info population.
modName = Electro-Magic Tools
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
# Conventionally lowercase.
modId = EMT
# Root package of the mod, used to find various classes in other properties,
# mcmod.info substitution, enabling assertions in run tasks, etc.
modGroup = emt
# WHY is there no version field?
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
# Whether to use modGroup as the maven publishing group.
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
useModGroupForPublishing = false
# Will update your build.gradle automatically whenever an update is available
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
autoUpdateBuildScript = false
# Version of Minecraft to target
minecraftVersion = 1.7.10
# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
# restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
channel = stable
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
mappingsVersion = 12
# Defines other MCP mappings for dependency deobfuscation.
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
# Select a default username for testing your mod. You can always override this per-run by running
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
developmentEnvironmentUserName = Developer
# Define a source file of your project with:
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = false
# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
enableGenericInjection = false
# Generate a class with a String field for the mod version named as defined below.
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
generateGradleTokenClass =
# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = GRADLETOKEN_VERSION
# [DEPRECATED] Mod ID replacement token.
gradleTokenModId =
# [DEPRECATED] Mod name replacement token.
gradleTokenModName =
# [DEPRECATED] Mod Group replacement token.
gradleTokenGroupName =
# [DEPRECATED]
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
# public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
# version in @Mod([...], version = VERSION, [...]).
# Leave these properties empty to skip individual token replacements.
replaceGradleTokenInFile = EMT.java
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
gradleTokenGroupName =
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
apiPackage =
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
# There can be multiple files in a space-separated list.
# Example value: mymodid_at.cfg nei_at.cfg
accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins = false
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
# responsibility to check the license and request permission for distribution if required.
usesShadowedDependencies = false
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable.
minimizeShadowedDependencies = true
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
usesMavenPublishing = true
# Maven repository to publish the mod to.
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
#
# The project's ID on Modrinth. Can be either the slug or the ID.
# Leave this empty if you don't want to publish to Modrinth.
modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
# Syntax: scope1-type1:name1;scope2-type2:name2;...
# Where scope can be one of [required, optional, incompatible, embedded],
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
#
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId =
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
# Syntax: type1:name1;type2:name2;...
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
curseForgeRelations =
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
# projects. New projects should not use this parameter.
#customArchiveBaseName =
# customArchiveBaseName =
# Optional parameter to have the build automatically fail if an illegal version is used.
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
# The check is ONLY performed if the version is a git tag.
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
# versionPattern =
# Uncomment to prevent the source code from being published.
# noPublishedSources = true
# Uncomment this to disable Spotless checks.
# This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this.
# disableSpotless = true
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
# disableCheckstyle = true
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
# (force use delegated build).
# This is meant to be set in $HOME/.gradle/gradle.properties.
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
# ideaOverrideBuildType = idea
# Whether IDEA should run spotless checks when pressing the Build button.
# This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+9 -8
View File
@@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Vendored
+10 -10
View File
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
+5 -10
View File
@@ -4,10 +4,10 @@ pluginManagement {
maven {
// RetroFuturaGradle
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
url "https://nexus.gtnewhorizons.com/repository/public/"
mavenContent {
includeGroup("com.gtnewhorizons.retrofuturagradle")
includeGroup("com.gtnewhorizons")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
}
}
gradlePluginPortal()
@@ -17,12 +17,7 @@ pluginManagement {
}
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.16'
}
blowdryerSetup {
repoSubfolder 'gtnhShared'
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
//devLocal '.' // Use this when testing config updates locally
}
@@ -1,6 +1,8 @@
package emt.gthandler.common.loader;
import static emt.command.CommandOutputs.mkbook;
import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -10,6 +12,7 @@ import emt.tile.GT_MetaTileEntity_ResearchCompleter;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TierEU;
import gregtech.api.util.GT_OreDictUnificator;
import thaumcraft.common.config.ConfigItems;
@@ -27,13 +30,11 @@ public class EMT_GT_Loader implements Runnable {
}
public void runlate() {
GT_Values.RA.addAssemblerRecipe(
new ItemStack[] { new ItemStack(Items.book),
GT_Values.RA.stdBuilder()
.itemInputs(
new ItemStack(Items.book),
GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE) },
GT_Values.NF,
mkbook(),
128,
64);
new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE))
.itemOutputs(mkbook()).duration(6 * SECONDS).eut(TierEU.RECIPE_MV / 2).addTo(assemblerRecipes);
}
}
@@ -45,30 +45,6 @@ public class EMT_GTNH_Recipes_And_Researches implements Runnable {
@Override
public void run() {
// ItemStack glue =new ItemStack(EMTItems.itemEMTItems,1,8);
// HashSet<ShapelessRecipes> recipesHashSet = new HashSet<>();
// recipesHashSet.add(new ShapelessRecipes(glue,
// Arrays.asList(GT_ModHandler.getModItem("TConstruct","materials",1,36),GT_ModHandler.getModItem("TConstruct","materials",1,36))));
// recipesHashSet.add(new ShapelessRecipes(glue,
// Collections.singletonList(GT_ModHandler.getModItem("TConstruct", "materials", 2, 36))));
// for ( ShapelessRecipes sr : recipesHashSet)
// CraftingManager.getInstance().getRecipeList().add(sr);
//
// //Rubber ball recipes
//
// GT_Values.RA.addAlloySmelterRecipe(Materials.RubberTreeSap.getDust(4),ItemList.Shape_Mold_Ball.get(0),new
// ItemStack(EMTItems.itemEMTItems,1,10),200,16);
// GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(Items.paper,12),new
// ItemStack(EMTItems.itemEMTItems,1,10)},Materials.Glue.getMolten(6912),new
// ItemStack(EMTItems.itemEMTItems,1,9),600,30);
//
// GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0),Materials.Rubber.getMolten(576),new
// ItemStack(EMTItems.itemEMTItems,1,10),100,30);
// GT_Values.RA.addPulveriserRecipe(new ItemStack(EMTItems.itemEMTItems,1,10),new
// ItemStack[]{Materials.Rubber.getDust(4)},null,300,2);
// GT_Values.RA.addFormingPressRecipe(Materials.Rubber.getPlates(4),ItemList.Shape_Mold_Ball.get(0),new
// ItemStack(EMTItems.itemEMTItems,1,10),100,30);
EMTResearches.addResearchTab();
runArcaneRecipes();
runResreaches();
@@ -122,7 +122,7 @@ public class ItemElectricBootsTraveller extends ItemArmor
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
if (!player.capabilities.isFlying && player.moveForward > 0.0F) {
if (!player.capabilities.isFlying && (player.moveForward != 0.0F || player.moveStrafing != 0.0F)) {
if (player.worldObj.isRemote && !player.isSneaking()) {
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
@@ -140,7 +140,7 @@ public class ItemElectricBootsTraveller extends ItemArmor
bonus /= 2.0F;
}
player.moveFlying(0.0F, 1.0F, bonus);
player.moveFlying(player.moveStrafing, player.moveForward, bonus);
} else if (Hover.getHover(player.getEntityId())) {
// Base ItemBootsTraveller jumpBonus equals to jumpBonus of Electric Boots,
// so any other boots factor can be calculated via proportion method
@@ -14,6 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.IFluidHandler;
import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.NumberFormatMUI;
import com.gtnewhorizons.modularui.api.drawable.Text;
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
@@ -28,7 +29,6 @@ import emt.tile.DefinitelyNotAIC2Source;
import emt.tile.TileEntityEMT;
import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs;
import emt.util.EMTTextHelper;
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
import gregtech.api.interfaces.tileentity.IEnergyConnected;
@@ -64,6 +64,8 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
public byte color;
private boolean side;
protected static final NumberFormatMUI numberFormat = new NumberFormatMUI();
public TileEntityBaseGenerator(int aspect) {
this();
switch (aspect) {
@@ -890,33 +892,35 @@ public class TileEntityBaseGenerator extends TileEntityEMT implements IInventory
.setProgress(() -> (float) fuel / this.maxfuel).setSynced(false, false).setPos(9, 43)
.setSize(25, 11))
.widget(
TextWidget
.dynamicString(
() -> StatCollector.translateToLocal("emt.Storage")
+ EMTTextHelper.formatNumber(storage)
+ "/"
+ EMTTextHelper.formatNumber(maxstorage)
+ "EU")
.setSynced(false).setDefaultColor(0).setPos(36, 22))
new TextWidget().setStringSupplier(
() -> StatCollector.translateToLocal("emt.Storage") + " "
+ numberFormat.formatWithSuffix(storage)
+ "/"
+ numberFormat.formatWithSuffix(maxstorage)
+ " EU")
.setDefaultColor(0).setPos(36, 22))
.widget(new FakeSyncWidget.IntegerSyncer(() -> storage, val -> storage = val))
.widget(
TextWidget.dynamicString(
() -> StatCollector.translateToLocal("emt.Generating")
+ (isActive ? generating / 20 / 20 : 0)
new TextWidget().setStringSupplier(
() -> StatCollector.translateToLocal("emt.Generating") + " "
+ numberFormat.formatWithSuffix(isActive ? (long) (generating / 20 / 20) : 0)
+ " EU/t")
.setSynced(false).setDefaultColor(0).setPos(36, 35))
.setDefaultColor(0).setPos(36, 35))
.widget(new FakeSyncWidget.DoubleSyncer(() -> generating, val -> generating = val))
.widget(new FakeSyncWidget.BooleanSyncer(() -> isActive, val -> isActive = val))
.widget(
TextWidget.dynamicString(() -> StatCollector.translateToLocal("emt.Fuel") + ": " + fuel)
.setSynced(false).setDefaultColor(0).setPos(36, 48))
new TextWidget()
.setStringSupplier(
() -> StatCollector.translateToLocal("emt.Fuel") + ": "
+ numberFormat.formatWithSuffix(fuel))
.setDefaultColor(0).setPos(36, 48))
.widget(new FakeSyncWidget.ByteSyncer(() -> fuel, val -> fuel = val))
.widget(
TextWidget
.dynamicString(
() -> StatCollector.translateToLocal("emt.remaining_second")
+ ((fuel * 20 * 20) - tick) / 20)
.setSynced(false).setDefaultColor(0).setPos(36, 63))
new TextWidget()
.setStringSupplier(
() -> StatCollector.translateToLocal("emt.remaining_second") + " "
+ numberFormat.format(((fuel * 20 * 20) - tick) / 20))
.setDefaultColor(0).setPos(36, 63))
.widget(new FakeSyncWidget.IntegerSyncer(() -> tick, val -> tick = val));
return builder.build();
+11 -14
View File
@@ -1,5 +1,7 @@
package emt.tile.solar;
import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
import static thaumcraft.api.aspects.Aspect.*;
import java.util.LinkedHashMap;
@@ -12,6 +14,7 @@ import emt.init.EMTBlocks;
import emt.util.EMTConfigHandler;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.TierEU;
import thaumcraft.api.aspects.Aspect;
// Solar Factory
@@ -133,20 +136,14 @@ public enum Solars {
public static void registerReverseRecipes() {
for (Solars s : Solars.values()) {
if (s.aspect != null) {
// ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack
// aOutput3, int[] aChances, int aDuration, int aEUt
GT_Values.RA.addChemicalBathRecipe(
new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta),
Materials.Chlorine.getGas(1000),
new ItemStack(
EMTBlocks.solars[getBaseSolar(s.output).instance],
1,
getBaseSolar(s.output).meta),
null,
null,
null,
30,
30);
GT_Values.RA.stdBuilder().itemInputs(new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta))
.fluidInputs(Materials.Chlorine.getGas(1000))
.itemOutputs(
new ItemStack(
EMTBlocks.solars[getBaseSolar(s.output).instance],
1,
getBaseSolar(s.output).meta))
.duration(2 * SECONDS).eut(TierEU.RECIPE_LV).addTo(chemicalBathRecipes);
}
}
}
@@ -15,6 +15,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.IFluidHandler;
import com.gtnewhorizons.modularui.api.ModularUITextures;
import com.gtnewhorizons.modularui.api.NumberFormatMUI;
import com.gtnewhorizons.modularui.api.drawable.Text;
import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
@@ -28,7 +29,6 @@ import emt.client.gui.EMT_UITextures;
import emt.init.EMTBlocks;
import emt.tile.DefinitelyNotAIC2Source;
import emt.tile.TileEntityEMT;
import emt.util.EMTTextHelper;
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
import gregtech.api.interfaces.tileentity.IEnergyConnected;
@@ -68,6 +68,8 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
protected boolean side;
private int instance, meta;
protected static NumberFormatMUI numberFormat = new NumberFormatMUI();
public TileEntitySolarBase(double output, Aspect aspect, String guiname, int instance, int meta) {
this.tick = 10;
this.storage = 0;
@@ -903,16 +905,20 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
.setProgress(() -> generating > 9 ? 1f : 0f).setSynced(false, false).setPos(9, 43)
.setSize(11, 11))
.widget(
TextWidget.dynamicString(
() -> StatCollector.translateToLocal("emt.Storage") + EMTTextHelper
.formatNumber(storage) + "/" + EMTTextHelper.formatNumber(maxstorage) + "EU")
.setSynced(false).setDefaultColor(0).setPos(36, 22))
new TextWidget().setStringSupplier(
() -> StatCollector.translateToLocal("emt.Storage") + " "
+ numberFormat.formatWithSuffix(storage)
+ "/"
+ numberFormat.formatWithSuffix(maxstorage)
+ " EU")
.setDefaultColor(0).setPos(36, 22))
.widget(new FakeSyncWidget.LongSyncer(() -> storage, val -> storage = val))
.widget(
TextWidget
.dynamicString(
() -> StatCollector.translateToLocal("emt.Generating") + generating + " EU/t")
.setSynced(false).setDefaultColor(0).setPos(36, 35))
new TextWidget().setStringSupplier(
() -> StatCollector.translateToLocal("emt.Generating") + " "
+ numberFormat.formatWithSuffix((long) generating)
+ " EU/t")
.setDefaultColor(0).setPos(36, 35))
.widget(new FakeSyncWidget.DoubleSyncer(() -> generating, val -> generating = val));
return builder.build();
-12
View File
@@ -42,16 +42,4 @@ public class EMTTextHelper {
public static String localize(String key) {
return StatCollector.translateToLocal(key);
}
public static String formatNumber(long number) {
if (number < 10_000) {
return String.valueOf(number);
} else if (number < 10_000_000) {
return (number / 1000) + "k";
} else if (number < 1_000_000_000) {
return (number / 1_000_000) + "M";
} else {
return (number / 1_000_000_000) + "G";
}
}
}
+46 -1
View File
@@ -99,6 +99,7 @@ item.EMT.focus.christmas.name=Набалдашник: Рождество
item.EMT.focus.shield.name=Набалдашник: Щит
item.EMT.focus.charge.name=Набалдашник: Зарядка
item.EMT.focus.chargeWand.name=Набалдашник: Зарядка жезла
item.EMT.focus.maintenance.name=Набалдашник: Обслуживание
item.EMT.focus.electricCloud.name=Электризованное облако
item.EMT.focus.energyBall.name=Набалдашник: Наэлектризованное облако
@@ -118,31 +119,67 @@ tile.EMT.machine.essentiafiller.name=Эфирный наполнитель
tile.EMT.solar.compressed.name=Сжатая солнечная панель
tile.EMT.solar.doublecompressed.name=Дважды сжатая солнечная панель
tile.EMT.solar.triplecompressed.name=Трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Solar.name=Четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Solar.name=Пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Solar.name=Шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Solar.name=Семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Solar.name=Восьмикратная сжатая солнечная панель
tile.EMT.solar.water.name=Наполненная водой, сжатая солнечная панель
tile.EMT.solar.doublewater.name=Наполненная водой, дважды сжатая солнечная панель
tile.EMT.solar.triplewater.name=Наполненная водой, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Aqua_Solar.name=Наполненная водой, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Aqua_Solar.name=Наполненная водой, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Aqua_Solar.name=Наполненная водой, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Aqua_Solar.name=Наполненная водой, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Aqua_Solar.name=Наполненная водой, восьмикратная сжатая солнечная панель
tile.EMT.solar.dark.name=Наполненная энтропией, сжатая солнечная панель
tile.EMT.solar.doubledark.name=Наполненная энтропией, дважды сжатая солнечная панель
tile.EMT.solar.tripledark.name=Наполненная энтропией, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Perditio_Solar.name=Наполненная энтропией, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Perditio_Solar.name=Наполненная энтропией, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Perditio_Solar.name=Наполненная энтропией, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Perditio_Solar.name=Наполненная энтропией, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Perditio_Solar.name=Наполненная энтропией, восьмикратная сжатая солнечная панель
tile.EMT.solar.order.name=Наполненная порядком, сжатая солнечная панель
tile.EMT.solar.doubleorder.name=Наполненная порядком, дважды сжатая солнечная панель
tile.EMT.solar.tripleorder.name=Наполненная порядком, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Ordo_Solar.name=Наполненная порядком, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Ordo_Solar.name=Наполненная порядком, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Ordo_Solar.name=Наполненная порядком, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Ordo_Solar.name=Наполненная порядком, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Ordo_Solar.name=Наполненная порядком, восьмикратная сжатая солнечная панель
tile.EMT.solar.fire.name=Наполненная огнём, сжатая солнечная панель
tile.EMT.solar.doublefire.name=Наполненная огнём, дважды сжатая солнечная панель
tile.EMT.solar.triplefire.name=Наполненная огнём, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Ignis_Solar.name=Наполненная огнём, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Ignis_Solar.name=Наполненная огнём, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Ignis_Solar.name=Наполненная огнём, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Ignis_Solar.name=Наполненная огнём, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Ignis_Solar.name=Наполненная огнём, восьмикратная сжатая солнечная панель
tile.EMT.solar.air.name=Наполненная воздухом, сжатая солнечная панель
tile.EMT.solar2.doubleair.name=Наполненная воздухом, дважды сжатая солнечная панель
tile.EMT.solar2.tripleair.name=Наполненная воздухом, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Aer_Solar.name=Наполненная воздухом, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Aer_Solar.name=Наполненная воздухом, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Aer_Solar.name=Наполненная воздухом, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Aer_Solar.name=Наполненная воздухом, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Aer_Solar.name=Наполненная воздухом, восьмикратная сжатая солнечная панель
tile.EMT.solar2.earth.name=Наполненная землёй, сжатая солнечная панель
tile.EMT.solar2.doubleearth.name=Наполненная землёй, дважды сжатая солнечная панель
tile.EMT.solar2.tripleearth.name=Наполненная землёй, трижды сжатая солнечная панель
tile.EMT.Quadruple_Compressed_Terra_Solar.name=Наполненная землёй, четырежды сжатая солнечная панель
tile.EMT.Quintuple_Compressed_Terra_Solar.name=Наполненная землёй, пятикратно сжатая солнечная панель
tile.EMT.Sextuple_Compressed_Terra_Solar.name=Наполненная землёй, шестикратно сжатая солнечная панель
tile.EMT.Septuple_Compressed_Terra_Solar.name=Наполненная землёй, семикратно сжатая солнечная панель
tile.EMT.Octuple_Compressed_Terra_Solar.name=Наполненная землёй, восьмикратная сжатая солнечная панель
#=============Thaumonomicon=============
emt.rsname.Electric Magic Tools=Electric Magic Tools
emt.tag.Electric Magic Tools=Кто сказал что магия и технология не дружат вместе?
emt.text.Electric Magic Tools=Кто сказал, что магия не может дружить с технологией? Наши исследователи сотрудничали с лучшими магами школы тауматургов, чтобы приподнести Вам эффективность магии, в сочетании с удобством электроинструментов.
emt.rsname.Energy Ball Focus=Набалдашник: энерго-шар
emt.rsname.Energy Ball Focus=Набалдашник: Наэлектризованное облако
emt.tag.Energy Ball Focus=Не игрушка
emt.text.Energy Ball Focus=Для использования этого наболдашника необходимо надеть аккумуляторный ранец или нано/квантовую кирасу. Для создания одного шара необходимо 5120EU. Крайне не рекомендуется использовать в замкнутом пространстве!
@@ -195,6 +232,10 @@ emt.rsname.Shield Focus=Набалдашник: Щит
emt.tag.Shield Focus=З.А.Щ.И.Т.А.
emt.text.Shield Focus=После некоторых экспериментов с червоточиной, Вы узнали больше о транспортировке объектов в альтернативные измерения. Вы верите, что Вы сможете обратить эти эффекты, чтобы призвать ряд блоков из измерения, сделанного из материи, которые будут защищать Вас от любой беды. Будьте внимательны, используя этот набалдашник, так как когда эти блоки появятся в нашем измерении, они будут переносить любые встречные блоки в своё измерение, которые никогда не вернуться. Вы также не сможете двигаться, во время существования этого щита.
emt.rsname.Wand Focus: Maintenance=Таумическое обслуживание
emt.tag.Wand Focus: Maintenance=Кому нужен ящик с инструментами, когда у вас есть магия?
emt.text.Wand Focus: Maintenance=После интенсивного изучения предположительно механической природы вашего аппарата вы, наконец, сделали это, вы обнаружили метод, позволяющий использовать Вис в ремонте. <BR> Что представляют собой несколько взорванных чистых помещений на фоне явного прогресса? Теперь вы можете избавиться от этих подлых обыденных инструментов...
emt.rsname.Potentia Generator=Potentia генератор
emt.tag.Potentia Generator=Освоение производящего потенциала эссенции
emt.text.Potentia Generator=После долгих изучений и исследований, Вы, наконец-то, узнали как получить электричество от остатков эссенции.<BR><BR>Просто поместите банку, содержащую Potentia, в радиусе 8 блоков от механизма и она заставит его вырабатывать EU.<BR><BR>Хотя Potentia кажется наиболее логичным выбором для производства EU с помощью эссенции, Вы уверены, что Вы сможете производить электричество из различных эссенций в ближайшем будущем.
@@ -370,3 +411,7 @@ emt.text.Quantum Wings=После исследования всех возмож
emt.rsname.Infused Quantum Armor=Наполненный квантовый нагрудник.
emt.tag.Infused Quantum Armor=Последний шаг...
emt.text.Infused Quantum Armor=Вам было нечего делать, и Вы решили заняться хоть чем-то полезным. Вам в голову пришла идея создания брони, на которую можно нацепить крылья или ранец, чтобы быть защищёнными в полёте. Возмите в руку крылья или ранец, и присядьте чтобы надеть их на броню. Чтобы снять их, зажмите Shift + "Снять"(Смотрите в настройках).
emt.rsname.ResearchCompleter=Автоматизированное исследование
emt.tag.ResearchCompleter=Больше никакого спама
emt.text.ResearchCompleter=Поначалу это было весело, но вы решили, что пришло время найти лучший способ провести все эти исследования. Смешав технологию и магию, вы создали мультиблок, который может самостоятельно завершить исследовательскую заметку.<BR><BR>Для работы ему необходимо, чтобы узлы были размещены в центре конструкции, и он будет медленно разрушать их во время работы. Стабилизаторы узлов не являются обязательными, но рекомендуются для удержания большого количества узлов близко друг к другу, не разрушая друг друга.