aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/kubatech/api/LoaderReference.java2
-rw-r--r--src/main/java/kubatech/api/helpers/ProgressBarWrapper.java75
-rw-r--r--src/main/java/kubatech/api/utils/FastRandom.java47
-rw-r--r--src/main/java/kubatech/api/utils/GSONUtils.java83
-rw-r--r--src/main/java/kubatech/loaders/MobHandlerLoader.java20
-rw-r--r--src/main/java/kubatech/mixin/Mixin.java5
-rw-r--r--src/main/java/kubatech/mixin/mixins/minecraft/EntityAccessor.java15
-rw-r--r--src/main/java/kubatech/mixin/mixins/minecraft/EntityLivingAccessor.java16
-rw-r--r--src/main/java/kubatech/mixin/mixins/minecraft/EntityLivingBaseAccessor.java16
-rw-r--r--src/main/java/kubatech/mixin/mixins/minecraft/EntitySlimeAccessor.java13
-rw-r--r--src/main/java/kubatech/mixin/mixins/minecraft/RendererLivingEntityAccessor.java15
-rw-r--r--src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java3
-rw-r--r--src/main/resources/assets/kubatech/lang/zh_CN.lang32
13 files changed, 31 insertions, 311 deletions
diff --git a/src/main/java/kubatech/api/LoaderReference.java b/src/main/java/kubatech/api/LoaderReference.java
index fc736536bc..7bbb1db1ac 100644
--- a/src/main/java/kubatech/api/LoaderReference.java
+++ b/src/main/java/kubatech/api/LoaderReference.java
@@ -14,11 +14,9 @@ public class LoaderReference {
public static final boolean GTNHCoreMod = Loader.isModLoaded("dreamcraft");
public static final boolean GTPlusPlus = Loader.isModLoaded("miscutils");
public static final boolean HarvestCraft = Loader.isModLoaded("harvestcraft");
- public static final boolean TwilightForest = Loader.isModLoaded("TwilightForest");
public static final boolean Forestry = Loader.isModLoaded("Forestry");
public static final boolean DraconicEvolution = Loader.isModLoaded("DraconicEvolution");
public static final boolean Avaritia = Loader.isModLoaded("Avaritia");
public static final boolean ProjRedIllumination = Loader.isModLoaded("ProjRed|Illumination");
public static final boolean RandomThings = Loader.isModLoaded("RandomThings");
- public static final boolean BetterLoadingScreen = Loader.isModLoaded("betterloadingscreen");
}
diff --git a/src/main/java/kubatech/api/helpers/ProgressBarWrapper.java b/src/main/java/kubatech/api/helpers/ProgressBarWrapper.java
deleted file mode 100644
index 24758565e3..0000000000
--- a/src/main/java/kubatech/api/helpers/ProgressBarWrapper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * spotless:off
- * KubaTech - Gregtech Addon
- * Copyright (C) 2022 - 2023 kuba6000
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
- * spotless:on
- */
-
-package kubatech.api.helpers;
-
-import static kubatech.api.utils.ModUtils.isClientSided;
-
-import java.io.IOException;
-
-import alexiil.mods.load.ProgressDisplayer;
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.ProgressManager;
-import kubatech.Tags;
-import kubatech.api.LoaderReference;
-
-@SuppressWarnings("deprecation")
-public class ProgressBarWrapper {
-
- ProgressManager.ProgressBar internalFMLBar;
- boolean isFMLBar;
- String name;
- int maxSteps;
- int steps = 0;
-
- public ProgressBarWrapper(String name, int steps) {
- if (!isClientSided) return;
- maxSteps = steps;
- this.name = name;
- if (!LoaderReference.BetterLoadingScreen) {
- internalFMLBar = ProgressManager.push(name, steps);
- isFMLBar = true;
- return;
- }
- isFMLBar = false;
- }
-
- public void step(String message) {
- if (!isClientSided) return;
- if (isFMLBar) internalFMLBar.step(message);
- else {
- steps++;
- try {
- ProgressDisplayer
- .displayProgress(Tags.MODNAME + ": " + name + " -> " + message, (float) steps / (float) maxSteps);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- // Prevent game freeze
- FMLCommonHandler.instance()
- .processWindowMessages();
- }
- }
-
- public void end() {
- if (!isClientSided) return;
- if (isFMLBar) ProgressManager.pop(internalFMLBar);
- }
-}
diff --git a/src/main/java/kubatech/api/utils/FastRandom.java b/src/main/java/kubatech/api/utils/FastRandom.java
deleted file mode 100644
index dd40e92b55..0000000000
--- a/src/main/java/kubatech/api/utils/FastRandom.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * spotless:off
- * KubaTech - Gregtech Addon
- * Copyright (C) 2022 - 2023 kuba6000
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
- * spotless:on
- */
-
-package kubatech.api.utils;
-
-import java.util.Random;
-import java.util.SplittableRandom;
-
-public class FastRandom extends Random {
-
- private SplittableRandom realRandom;
-
- public FastRandom() {
- realRandom = new SplittableRandom();
- }
-
- public FastRandom(long seed) {
- realRandom = new SplittableRandom(seed);
- }
-
- @Override
- public synchronized void setSeed(long seed) {
- realRandom = new SplittableRandom(seed);
- }
-
- @Override
- protected int next(int bits) {
- return (realRandom.nextInt() >>> (32 - bits));
- }
-}
diff --git a/src/main/java/kubatech/api/utils/GSONUtils.java b/src/main/java/kubatech/api/utils/GSONUtils.java
deleted file mode 100644
index 01c186a44b..0000000000
--- a/src/main/java/kubatech/api/utils/GSONUtils.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * spotless:off
- * KubaTech - Gregtech Addon
- * Copyright (C) 2022 - 2023 kuba6000
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
- * spotless:on
- */
-
-package kubatech.api.utils;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import net.minecraft.nbt.JsonToNBT;
-import net.minecraft.nbt.NBTException;
-import net.minecraft.nbt.NBTTagCompound;
-
-import com.google.gson.ExclusionStrategy;
-import com.google.gson.FieldAttributes;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonPrimitive;
-import com.google.gson.JsonSerializer;
-
-public class GSONUtils {
-
- @Retention(RetentionPolicy.RUNTIME)
- @Target(ElementType.FIELD)
- public @interface SkipGSON {}
-
- private static final ExclusionStrategy GSONStrategy = new ExclusionStrategy() {
-
- @Override
- public boolean shouldSkipField(FieldAttributes f) {
- return f.getAnnotation(SkipGSON.class) != null;
- }
-
- @Override
- public boolean shouldSkipClass(Class<?> clazz) {
- return false;
- }
- };
-
- private static final JsonSerializer<NBTTagCompound> NBTTagCompoundSerializer = (src, typeOfSrc,
- context) -> new JsonPrimitive(src.toString());
-
- private static final JsonDeserializer<NBTTagCompound> NBTTagCompoundDeserializer = (json, typeOfT, context) -> {
- try {
- if (!(json instanceof JsonPrimitive)) return null;
- if (!((JsonPrimitive) json).isString()) return null;
- return (NBTTagCompound) JsonToNBT.func_150315_a(json.getAsString());
- } catch (NBTException e) {
- throw new RuntimeException(e);
- }
- };
-
- public static final GsonBuilder GSON_BUILDER = new GsonBuilder().addSerializationExclusionStrategy(GSONStrategy)
- .addDeserializationExclusionStrategy(GSONStrategy)
- .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundDeserializer)
- .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundSerializer)
- .serializeNulls();
- public static final GsonBuilder GSON_BUILDER_PRETTY = new GsonBuilder()
- .addSerializationExclusionStrategy(GSONStrategy)
- .addDeserializationExclusionStrategy(GSONStrategy)
- .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundDeserializer)
- .registerTypeAdapter(NBTTagCompound.class, NBTTagCompoundSerializer)
- .serializeNulls()
- .setPrettyPrinting();
-}
diff --git a/src/main/java/kubatech/loaders/MobHandlerLoader.java b/src/main/java/kubatech/loaders/MobHandlerLoader.java
index 2ebff9afaf..72947c726d 100644
--- a/src/main/java/kubatech/loaders/MobHandlerLoader.java
+++ b/src/main/java/kubatech/loaders/MobHandlerLoader.java
@@ -1,3 +1,23 @@
+/*
+ * spotless:off
+ * KubaTech - Gregtech Addon
+ * Copyright (C) 2022 - 2023 kuba6000
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see <https://www.gnu.org/licenses/>.
+ * spotless:on
+ */
+
package kubatech.loaders;
import static kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeExterminationChamber.DIAMOND_SPIKES_DAMAGE;
diff --git a/src/main/java/kubatech/mixin/Mixin.java b/src/main/java/kubatech/mixin/Mixin.java
index e94eca69bb..52f7671faa 100644
--- a/src/main/java/kubatech/mixin/Mixin.java
+++ b/src/main/java/kubatech/mixin/Mixin.java
@@ -12,11 +12,6 @@ public enum Mixin {
// Minecraft
WorldMixin("minecraft.WorldMixin", VANILLA),
- EntityAccessor("minecraft.EntityAccessor", VANILLA),
- EntityLivingAccessor("minecraft.EntityLivingAccessor", VANILLA),
- EntityLivingBaseAccessor("minecraft.EntityLivingBaseAccessor", VANILLA),
- EntitySlimeAccessor("minecraft.EntitySlimeAccessor", VANILLA),
- RendererLivingEntityAccessor("minecraft.RendererLivingEntityAccessor", VANILLA),
StringTranslateMixin("minecraft.StringTranslateMixin", VANILLA),
LanguageRegistryMixin("minecraft.LanguageRegistryMixin", VANILLA),
LocaleMixin("minecraft.LocaleMixin", Side.CLIENT, VANILLA),
diff --git a/src/main/java/kubatech/mixin/mixins/minecraft/EntityAccessor.java b/src/main/java/kubatech/mixin/mixins/minecraft/EntityAccessor.java
deleted file mode 100644
index 67e42acf6a..0000000000
--- a/src/main/java/kubatech/mixin/mixins/minecraft/EntityAccessor.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package kubatech.mixin.mixins.minecraft;
-
-import java.util.Random;
-
-import net.minecraft.entity.Entity;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Accessor;
-
-@Mixin(value = Entity.class)
-public interface EntityAccessor {
-
- @Accessor
- void setRand(Random rand);
-}
diff --git a/src/main/java/kubatech/mixin/mixins/minecraft/EntityLivingAccessor.java b/src/main/java/kubatech/mixin/mixins/minecraft/EntityLivingAccessor.java
deleted file mode 100644
index 59f8ea66d6..0000000000
--- a/src/main/java/kubatech/mixin/mixins/minecraft/EntityLivingAccessor.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package kubatech.mixin.mixins.minecraft;
-
-import net.minecraft.entity.EntityLiving;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Invoker;
-
-@Mixin(value = EntityLiving.class)
-public interface EntityLivingAccessor {
-
- @Invoker
- void callAddRandomArmor();
-
- @Invoker
- void callEnchantEquipment();
-}
diff --git a/src/main/java/kubatech/mixin/mixins/minecraft/EntityLivingBaseAccessor.java b/src/main/java/kubatech/mixin/mixins/minecraft/EntityLivingBaseAccessor.java
deleted file mode 100644
index 95370b872b..0000000000
--- a/src/main/java/kubatech/mixin/mixins/minecraft/EntityLivingBaseAccessor.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package kubatech.mixin.mixins.minecraft;
-
-import net.minecraft.entity.EntityLivingBase;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Invoker;
-
-@Mixin(value = EntityLivingBase.class)
-public interface EntityLivingBaseAccessor {
-
- @Invoker
- void callDropFewItems(boolean recentlyHit, int lootingLevel);
-
- @Invoker
- void callDropRareDrop(int lootingLevel);
-}
diff --git a/src/main/java/kubatech/mixin/mixins/minecraft/EntitySlimeAccessor.java b/src/main/java/kubatech/mixin/mixins/minecraft/EntitySlimeAccessor.java
deleted file mode 100644
index d7b4eaafb8..0000000000
--- a/src/main/java/kubatech/mixin/mixins/minecraft/EntitySlimeAccessor.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package kubatech.mixin.mixins.minecraft;
-
-import net.minecraft.entity.monster.EntitySlime;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Invoker;
-
-@Mixin(value = EntitySlime.class)
-public interface EntitySlimeAccessor {
-
- @Invoker
- void callSetSlimeSize(int size);
-}
diff --git a/src/main/java/kubatech/mixin/mixins/minecraft/RendererLivingEntityAccessor.java b/src/main/java/kubatech/mixin/mixins/minecraft/RendererLivingEntityAccessor.java
deleted file mode 100644
index a2fe93954f..0000000000
--- a/src/main/java/kubatech/mixin/mixins/minecraft/RendererLivingEntityAccessor.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package kubatech.mixin.mixins.minecraft;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.renderer.entity.RendererLivingEntity;
-
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Accessor;
-
-@Mixin(value = RendererLivingEntity.class)
-public interface RendererLivingEntityAccessor {
-
- @Accessor
- ModelBase getMainModel();
-
-}
diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
index bcd5a47a9f..2b94688ea8 100644
--- a/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
+++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/GT_MetaTileEntity_ExtremeExterminationChamber.java
@@ -92,6 +92,7 @@ import com.gtnewhorizons.modularui.common.widget.DynamicTextWidget;
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;
+import com.kuba6000.mobsinfo.api.utils.FastRandom;
import com.kuba6000.mobsinfo.api.utils.ItemID;
import com.mojang.authlib.GameProfile;
@@ -124,7 +125,6 @@ import kubatech.api.LoaderReference;
import kubatech.api.helpers.ReflectionHelper;
import kubatech.api.implementations.KubaTechGTMultiBlockBase;
import kubatech.api.tileentity.CustomTileEntityPacketHandler;
-import kubatech.api.utils.FastRandom;
import kubatech.client.effect.EntityRenderer;
import kubatech.loaders.MobHandlerLoader;
import kubatech.network.CustomTileEntityPacket;
@@ -618,6 +618,7 @@ public class GT_MetaTileEntity_ExtremeExterminationChamber
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
mGlassTier = 0;
+ mCasing = 0;
if (!checkPiece(STRUCTURE_PIECE_MAIN, 2, 6, 0)) return false;
if (mCasing < 35 || mMaintenanceHatches.size() != 1
|| mEnergyHatches.size() == 0
diff --git a/src/main/resources/assets/kubatech/lang/zh_CN.lang b/src/main/resources/assets/kubatech/lang/zh_CN.lang
index 23bfd14aaf..34c2446d53 100644
--- a/src/main/resources/assets/kubatech/lang/zh_CN.lang
+++ b/src/main/resources/assets/kubatech/lang/zh_CN.lang
@@ -1,29 +1,15 @@
#This file is a translation file for KubaTech
-#NEI
-mobhandler.normal_drops=常规掉落
-mobhandler.rare_drops=稀有掉落
-mobhandler.additional_drops=额外掉落
-mobhandler.infernal_drops=精英掉落
-mobhandler.infernal_cannot=无法生成精英怪
-mobhandler.infernal_can=可以生成精英怪
-mobhandler.infernal_always=总是生成精英怪
-mobhandler.mod=Mod:
-mobhandler.max_health=最大生命值:
-mobhandler.chance=几率:
-mobhandler.average_reminder=§7§o请注意,这些是掉落的平均期望值.
-mobhandler.lootable=掠夺附魔已生效
-
#Commands
-commandhandler.invalid=§c无效使用 ! 该指令的正确使用是 /%s
-commandhandler.cant_find=§c找不到指令选项 %s
-commandhandler.generic_help=§c你还可以用 "/kubatech help" 获取可能的指令
-commandhandler.usage=<选项>
-command.help.possible_commands=可能的指令:
-command.help.usage=- 显示所有可能的指令
-command.config.invalid_option=§c无效选项 ! 可能的选项:reload
-command.config.success=§a配置(Config)重新加载成功 !
-command.config.usage=<选项>
+kubatech.commandhandler.invalid=§c无效使用 ! 该指令的正确使用是 /%s
+kubatech.commandhandler.cant_find=§c找不到指令选项 %s
+kubatech.commandhandler.generic_help=§c你还可以用 "/kubatech help" 获取可能的指令
+kubatech.commandhandler.usage=<选项>
+kubatech.command.help.possible_commands=可能的指令:
+kubatech.command.help.usage=- 显示所有可能的指令
+kubatech.command.config.invalid_option=§c无效选项 ! 可能的选项:reload
+kubatech.command.config.success=§a配置(Config)重新加载成功 !
+kubatech.command.config.usage=<选项>
#Items
kubaitem.fromcollection=此物品来自