mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 18:44:42 +00:00
Merge branch 'master' into dev
This commit is contained in:
8 files changed
+68
-20
No files matched your search
+35
-6
@@ -1,9 +1,38 @@
|
||||
*.bat
|
||||
.gradle/
|
||||
.idea/
|
||||
out/
|
||||
.gradle
|
||||
.settings
|
||||
/.idea/
|
||||
/.vscode/
|
||||
/run/
|
||||
/build/
|
||||
/eclipse/
|
||||
.classpath
|
||||
.project
|
||||
/bin/
|
||||
/config/
|
||||
/crash-reports/
|
||||
/logs/
|
||||
options.txt
|
||||
/saves/
|
||||
usernamecache.json
|
||||
banned-ips.json
|
||||
banned-players.json
|
||||
eula.txt
|
||||
ops.json
|
||||
server.properties
|
||||
servers.dat
|
||||
usercache.json
|
||||
whitelist.json
|
||||
/out/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
run/
|
||||
build/
|
||||
src/main/resources/mixins.*([!.]).json
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
.factorypath
|
||||
addon.local.gradle
|
||||
addon.local.gradle.kts
|
||||
addon.late.local.gradle
|
||||
addon.late.local.gradle.kts
|
||||
layout.json
|
||||
@@ -89,6 +89,11 @@ public class FluidCraft {
|
||||
proxy.postInit(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onLoadComplete(FMLLoadCompleteEvent event) {
|
||||
proxy.onLoadComplete(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onServerStart(FMLServerStartingEvent event) {
|
||||
SPacketMEUpdateBuffer.init();
|
||||
@@ -106,9 +111,6 @@ public class FluidCraft {
|
||||
}
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onLoadComplete(FMLLoadCompleteEvent event) {}
|
||||
|
||||
public static ResourceLocation resource(String path) {
|
||||
return new ResourceLocation(MODID, path);
|
||||
}
|
||||
|
||||
+1
-2
@@ -492,8 +492,7 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
|
||||
protected NBTBase createItemTag(final ItemStack i) {
|
||||
final NBTTagCompound c = new NBTTagCompound();
|
||||
if (i != null) {
|
||||
i.writeToNBT(c);
|
||||
c.setInteger("Count", i.stackSize);
|
||||
Util.writeItemStackToNBT(i, c);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -180,8 +180,7 @@ public class TileFluidAutoFiller extends AENetworkInvTile
|
||||
protected NBTBase createItemTag(final ItemStack i) {
|
||||
final NBTTagCompound c = new NBTTagCompound();
|
||||
if (i != null) {
|
||||
i.writeToNBT(c);
|
||||
c.setInteger("Count", i.stackSize);
|
||||
Util.writeItemStackToNBT(i, c);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -94,14 +94,12 @@ public class OrderStack<T> {
|
||||
if (RealStack instanceof ItemStack) {
|
||||
NBTTagCompound tmp = new NBTTagCompound();
|
||||
tmp.setByte("t", (byte) ITEM);
|
||||
((ItemStack) RealStack).writeToNBT(tmp);
|
||||
Util.writeItemStackToNBT(((ItemStack) RealStack), tmp);
|
||||
// replacement items
|
||||
if (items != null) {
|
||||
NBTTagList list = new NBTTagList();
|
||||
for (ItemStack is : this.items) {
|
||||
NBTTagCompound t = new NBTTagCompound();
|
||||
is.writeToNBT(t);
|
||||
list.appendTag(t);
|
||||
Util.writeItemStackToNBT(is, new NBTTagCompound());
|
||||
}
|
||||
tmp.setTag(index + ":", list);
|
||||
}
|
||||
@@ -130,10 +128,10 @@ public class OrderStack<T> {
|
||||
NBTTagList items = info.getTagList(index + ":", 10);
|
||||
for (int x = 0; x < items.tagCount(); x++) {
|
||||
final NBTTagCompound item = items.getCompoundTagAt(x);
|
||||
list.add(ItemStack.loadItemStackFromNBT(item));
|
||||
list.add(Util.loadItemStackFromNBT(item));
|
||||
}
|
||||
}
|
||||
return new OrderStack<>(ItemStack.loadItemStackFromNBT(info), index, list.toArray(new ItemStack[0]));
|
||||
return new OrderStack<>(Util.loadItemStackFromNBT(info), index, list.toArray(new ItemStack[0]));
|
||||
}
|
||||
case FLUID -> {
|
||||
return new OrderStack<>(FluidStack.loadFluidStackFromNBT(info), index);
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.glodblock.github.nei.recipes.DefaultExtractorLoader;
|
||||
import com.glodblock.github.util.ModAndClassUtil;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@@ -28,8 +29,13 @@ public class ClientProxy extends CommonProxy {
|
||||
@Override
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
super.postInit(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadComplete(FMLLoadCompleteEvent event) {
|
||||
super.onLoadComplete(event);
|
||||
if (ModAndClassUtil.NEI) {
|
||||
(new DefaultExtractorLoader()).run();
|
||||
new DefaultExtractorLoader().run();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import appeng.api.IAppEngApi;
|
||||
import appeng.api.config.Upgrades;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@@ -70,6 +71,8 @@ public class CommonProxy {
|
||||
AEApi.instance().registries().interfaceTerminal().register(TileFluidInterface.class);
|
||||
}
|
||||
|
||||
public void onLoadComplete(FMLLoadCompleteEvent event) {}
|
||||
|
||||
public void registerRenderers() {}
|
||||
|
||||
public void registerMovables() {
|
||||
|
||||
@@ -304,6 +304,18 @@ public final class Util {
|
||||
}
|
||||
}
|
||||
|
||||
public static void writeItemStackToNBT(ItemStack itemStack, NBTTagCompound tag) {
|
||||
itemStack.writeToNBT(tag);
|
||||
tag.setInteger("Count", itemStack.stackSize);
|
||||
}
|
||||
|
||||
public static ItemStack loadItemStackFromNBT(NBTTagCompound tag) {
|
||||
ItemStack itemStack = ItemStack.loadItemStackFromNBT(tag);
|
||||
if (itemStack == null) return null;
|
||||
itemStack.stackSize = tag.getInteger("Count");
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public static IAEFluidStack loadFluidStackFromNBT(final NBTTagCompound i) {
|
||||
final FluidStack t = FluidRegistry.getFluidStack(i.getString("FluidName"), 1);
|
||||
if (t == null) return null;
|
||||
|
||||
Reference in new issue
Block a user