Compare commits

..
4 Commits
Author SHA1 Message Date
NotAPenguin 89eaa78e51 update gt and fix name (#55) 2024-09-03 11:50:50 +02:00
Lyfts a7d6f8e59b Fix teleposer unable to teleport to the end (#54)
* update deps

* fix teleposer unable to teleport to the end
2024-05-19 12:51:13 +02:00
Martin Robertz 6c18cd1bee update 2024-05-10 11:20:30 +02:00
LyftsGitHub GTNH Actionsgithub-actions[bot]
fcddb56254 Fix client-side crash on servers (#52)
* update deps

* fix client crash on servers

* spotlessApply (#53)

Co-authored-by: GitHub GTNH Actions <>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-10 09:36:17 +02:00
7 changed files with 41 additions and 30 deletions

No files matched your search

+6 -6
View File
@@ -24,16 +24,16 @@
dependencies {
api("com.github.GTNewHorizons:waila:1.7.3:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.5.27-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.6.0-GTNH:dev")
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.46.02:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.49.55:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.10.12-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.9:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.11.1-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ForestryMC:4.9.0:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.4.8:dev") {transitive = false }
compileOnly("com.github.GTNewHorizons:Chisel:2.14.1-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:Chisel:2.15.0-GTNH:api") {transitive = false }
compileOnly("com.github.GTNewHorizons:ZenScript:1.0.0-GTNH") {transitive = false }
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.3.1:dev") {transitive = false }
Binary file not shown.
@@ -14,6 +14,7 @@ import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent;
import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.Event.Result;
@@ -35,11 +36,12 @@ public class SoulNetworkHandler {
}
public static int getCurrentMaxOrb(String ownerName) {
if (MinecraftServer.getServer() == null) {
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null) {
return 0;
}
World world = MinecraftServer.getServer().worldServers[0];
World world = mcServer.worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
if (data == null) {
@@ -51,11 +53,12 @@ public class SoulNetworkHandler {
}
public static void setMaxOrbToMax(String ownerName, int maxOrb) {
if (MinecraftServer.getServer() == null) {
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null) {
return;
}
World world = MinecraftServer.getServer().worldServers[0];
World world = mcServer.worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
if (data == null) {
@@ -96,7 +99,7 @@ public class SoulNetworkHandler {
}
public static int syphonFromNetwork(String ownerName, int damageToBeDone) {
MinecraftServer mcServer = MinecraftServer.getServer();
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null || mcServer.worldServers.length == 0) {
return 0;
}
@@ -192,11 +195,12 @@ public class SoulNetworkHandler {
}
public static boolean canSyphonFromOnlyNetwork(String ownerName, int damageToBeDone) {
if (MinecraftServer.getServer() == null) {
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null) {
return false;
}
World world = MinecraftServer.getServer().worldServers[0];
World world = mcServer.worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
if (data == null) {
@@ -208,11 +212,12 @@ public class SoulNetworkHandler {
}
public static int getCurrentEssence(String ownerName) {
if (MinecraftServer.getServer() == null) {
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null) {
return 0;
}
World world = MinecraftServer.getServer().worldServers[0];
World world = mcServer.worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
if (data == null) {
@@ -224,11 +229,12 @@ public class SoulNetworkHandler {
}
public static void setCurrentEssence(String ownerName, int essence) {
if (MinecraftServer.getServer() == null) {
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null) {
return;
}
World world = MinecraftServer.getServer().worldServers[0];
World world = mcServer.worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
if (data == null) {
@@ -255,11 +261,12 @@ public class SoulNetworkHandler {
return 0;
}
if (MinecraftServer.getServer() == null) {
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null) {
return 0;
}
World world = MinecraftServer.getServer().worldServers[0];
World world = mcServer.worldServers[0];
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, event.ownerNetwork);
if (data == null) {
@@ -348,10 +355,11 @@ public class SoulNetworkHandler {
}
public static EntityPlayer getPlayerForUsername(String str) {
if (MinecraftServer.getServer() == null) {
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null) {
return null;
}
return MinecraftServer.getServer().getConfigurationManager().func_152612_a(str);
return mcServer.getConfigurationManager().func_152612_a(str);
}
public static void causeNauseaToPlayer(ItemStack stack) {
@@ -11,6 +11,7 @@ import net.minecraft.server.MinecraftServer;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.common.items.LavaCrystal;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.IFuelHandler;
public class AlchemicalWizardryFuelHandler implements IFuelHandler {
@@ -35,11 +36,12 @@ public class AlchemicalWizardryFuelHandler implements IFuelHandler {
return 0;
}
if (MinecraftServer.getServer() == null) {
MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
if (mcServer == null) {
return 0;
}
if (MinecraftServer.getServer().getConfigurationManager() == null) {
if (mcServer.getConfigurationManager() == null) {
return 0;
}
@@ -5,7 +5,6 @@ import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraft.world.WorldProvider;
@@ -13,6 +12,7 @@ import net.minecraftforge.common.DimensionManager;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -72,7 +72,7 @@ public class LavaCrystal extends EnergyItems {
if (itemStack.getTagCompound() != null && !(itemStack.getTagCompound().getString("ownerName").equals(""))) {
String ownerName = itemStack.getTagCompound().getString("ownerName");
if (MinecraftServer.getServer() == null) {
if (FMLCommonHandler.instance().getMinecraftServerInstance() == null) {
return false;
}
@@ -8,9 +8,9 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -75,7 +75,8 @@ public class TelepositionFocus extends EnergyItems {
}
public World getWorld(ItemStack itemStack) {
return DimensionManager.getWorld(getDimensionID(itemStack));
return FMLCommonHandler.instance().getMinecraftServerInstance()
.worldServerForDimension(getDimensionID(itemStack));
}
public int xCoord(ItemStack itemStack) {
@@ -16,7 +16,7 @@ import net.minecraftforge.oredict.OreDictionary;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.common.blocks.GT_TileEntity_Ores;
import gregtech.common.blocks.TileEntityOres;
public class MeteorParadigm {
@@ -220,8 +220,8 @@ public class MeteorParadigm {
@Optional.Method(modid = "gregtech")
private static void setGTOresNaturalIfNeeded(World world, int x, int y, int z) {
final TileEntity tileEntity = world.getTileEntity(x, y, z);
if (tileEntity instanceof GT_TileEntity_Ores) {
((GT_TileEntity_Ores) tileEntity).mNatural = true;
if (tileEntity instanceof TileEntityOres) {
((TileEntityOres) tileEntity).mNatural = true;
}
}
}