diff options
| author | â€huajijam <strhuaji@gmail.com> | 2019-04-19 18:29:22 +0800 |
|---|---|---|
| committer | â€huajijam <strhuaji@gmail.com> | 2019-04-19 18:29:22 +0800 |
| commit | 399674bb9946664a880ee5e26690eb98f9aa7170 (patch) | |
| tree | 7da9495cfd23b3582896428e2481afdddceb0e1b /src/Java | |
| parent | 98649eab067e2ffd4c6983fe44f75b65ffb0954b (diff) | |
| parent | 7f7eecf6a84264ca229f6b8d6759004a9a21ae5d (diff) | |
| download | GT5-Unofficial-399674bb9946664a880ee5e26690eb98f9aa7170.tar.gz GT5-Unofficial-399674bb9946664a880ee5e26690eb98f9aa7170.tar.bz2 GT5-Unofficial-399674bb9946664a880ee5e26690eb98f9aa7170.zip | |
Automatic synchronization
Diffstat (limited to 'src/Java')
84 files changed, 6248 insertions, 930 deletions
diff --git a/src/Java/gregtech/api/util/SemiFluidFuelHandler.java b/src/Java/gregtech/api/util/SemiFluidFuelHandler.java index 1414b3beb3..c5b1065831 100644 --- a/src/Java/gregtech/api/util/SemiFluidFuelHandler.java +++ b/src/Java/gregtech/api/util/SemiFluidFuelHandler.java @@ -58,6 +58,7 @@ public class SemiFluidFuelHandler { public static boolean generateFuels() { final FluidStack aCreosote = FluidUtils.getFluidStack("creosote", 1000); final FluidStack aHeavyFuel = FluidUtils.getFluidStack("liquid_heavy_fuel", 1000); + final FluidStack aHeavyOil = FluidUtils.getFluidStack("liquid_heavy_oil", 1000); final HashMap<Integer, Pair<FluidStack, Integer>> aFoundFluidsFromItems = new HashMap<Integer, Pair<FluidStack, Integer>>(); // Find Fluids From items for (final GT_Recipe r : gregtech.api.util.GT_Recipe.GT_Recipe_Map.sDenseLiquidFuels.mRecipeList) { @@ -80,7 +81,7 @@ public class SemiFluidFuelHandler { aContainsCreosote = true; } } - g.mSpecialValue *= aContainsCreosote ? 8 : 4; + g.mSpecialValue *= aContainsCreosote ? 6 : 3; Logger.INFO("Added " + g.mFluidInputs[0].getLocalizedName() + " to the Semi-Fluid Generator fuel map. Fuel Produces "+g.mSpecialValue+"EU per 1000L."); sSemiFluidLiquidFuels.add(g); } @@ -89,9 +90,9 @@ public class SemiFluidFuelHandler { if (p != null) { int aFuelValue = p.getValue(); if (p.getKey().isFluidEqual(aCreosote)) { - aFuelValue *= 8; + aFuelValue *= 6; } - else if (p.getKey().isFluidEqual(aHeavyFuel)){ + else if (p.getKey().isFluidEqual(aHeavyFuel) || p.getKey().isFluidEqual(aHeavyOil)){ aFuelValue *= 1.5; } else { diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index e10369abe3..424a63e9bf 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -46,6 +46,7 @@ import gtPlusPlus.core.material.nuclear.FLUORIDES; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.data.LocaleUtils; import gtPlusPlus.core.util.minecraft.FluidUtils; +import gtPlusPlus.core.util.minecraft.HazmatUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -124,6 +125,10 @@ public class GTplusplus implements ActionListener { Logger.INFO("Loading some textures on the client."); // Tools Logger.WARNING("Processing texture: " + TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile().getResourcePath()); + Logger.WARNING("Processing texture: " + TexturesGtTools.ANGLE_GRINDER.getTextureFile().getResourcePath()); + Logger.WARNING("Processing texture: " + TexturesGtTools.ELECTRIC_SNIPS.getTextureFile().getResourcePath()); + Logger.WARNING("Processing texture: " + TexturesGtTools.ELECTRIC_LIGHTER.getTextureFile().getResourcePath()); + Logger.WARNING("Processing texture: " + TexturesGtTools.ELECTRIC_BUTCHER_KNIFE.getTextureFile().getResourcePath()); // Blocks Logger.WARNING("Processing texture: " + TexturesGtBlock.Casing_Machine_Dimensional.getTextureFile().getResourcePath()); @@ -186,6 +191,7 @@ public class GTplusplus implements ActionListener { INIT_PHASE.INIT.setPhaseActive(true); mChunkLoading.init(event); proxy.init(event); + HazmatUtils.init(); proxy.registerNetworkStuff(); instanceGtProxy.init(); Core_Manager.init(); diff --git a/src/Java/gtPlusPlus/api/interfaces/IToolable.java b/src/Java/gtPlusPlus/api/interfaces/IToolable.java new file mode 100644 index 0000000000..24797825a9 --- /dev/null +++ b/src/Java/gtPlusPlus/api/interfaces/IToolable.java @@ -0,0 +1,17 @@ +package gtPlusPlus.api.interfaces; + +public interface IToolable { + + public boolean isScrewdriverable(); + public boolean onScrewdriverLMB(); + public boolean onScrewdriverRMB(); + + public boolean isWrenchable(); + public boolean onWrenchLMB(); + public boolean onWrenchRMB(); + + public boolean isMalletable(); + public boolean onMalletLMB(); + public boolean onMalletRMB(); + +} diff --git a/src/Java/gtPlusPlus/api/objects/data/AutoMap.java b/src/Java/gtPlusPlus/api/objects/data/AutoMap.java index 4663229514..3583a04a74 100644 --- a/src/Java/gtPlusPlus/api/objects/data/AutoMap.java +++ b/src/Java/gtPlusPlus/api/objects/data/AutoMap.java @@ -3,7 +3,7 @@ package gtPlusPlus.api.objects.data; import java.io.Serializable; import java.util.*; -public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable, Collection<V>, Queue<V> { +public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable, Collection<V>, Queue<V>, List<V> { /** * The Internal Map @@ -22,11 +22,55 @@ public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable, Collect this(new LinkedHashMap<Integer, V>()); } + public Map<Integer, V> getMap(){ + return mInternalMap; + } + public AutoMap(Map<Integer, V> defaultMapType) { mInternalMap = defaultMapType; mInternalNameMap = new LinkedHashMap<String, Integer>(); } + /** + * Generates an AutoMap from the List. + * @param aList - Data to be inserted into the AutoMap. + */ + public AutoMap(List<V> aList) { + mInternalMap = new LinkedHashMap<Integer, V>(); + mInternalNameMap = new LinkedHashMap<String, Integer>(); + if (aList != null && aList.size() > 0) { + for (V obj : aList) { + add(obj); + } + } + } + /** + * Generates an AutoMap from a Set. + * @param aList - Data to be inserted into the AutoMap. + */ + public AutoMap(Set<V> aList) { + mInternalMap = new LinkedHashMap<Integer, V>(); + mInternalNameMap = new LinkedHashMap<String, Integer>(); + if (aList != null && aList.size() > 0) { + for (V obj : aList) { + add(obj); + } + } + } + /** + * Generates an AutoMap from a Collection. + * @param aList - Data to be inserted into the AutoMap. + */ + public AutoMap(Collection<V> aList) { + mInternalMap = new LinkedHashMap<Integer, V>(); + mInternalNameMap = new LinkedHashMap<String, Integer>(); + if (aList != null && aList.size() > 0) { + for (V obj : aList) { + add(obj); + } + } + } + @Override public Iterator<V> iterator() { return values().iterator(); @@ -211,5 +255,78 @@ public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable, Collect public V peek() { return element(); } + + @Override + public boolean addAll(int index, Collection<? extends V> c) { + for (V y : c) { + add(y); + } + return true; + } + + @Override + public V set(int index, V element) { + return mInternalMap.put(index, element); + } + + @Override + public void add(int index, V element) { + add(element); + } + + @Override + public V remove(int index) { + V h = mInternalMap.get(index); + set(index, null); + return h; + } + + @Override + public int indexOf(Object o) { + int aCount = 0; + for (V of : mInternalMap.values()) { + if (of != o) { + aCount++; + continue; + } + else { + return aCount; + } + } + return -1; + } + + @Override + public int lastIndexOf(Object o) { + //TODO + return indexOf(o); + } + + @Override + public ListIterator<V> listIterator() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ListIterator<V> listIterator(int index) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List<V> subList(int fromIndex, int toIndex) { + AutoMap<V> aNewSubList = new AutoMap<V>(); + for (int slot=fromIndex; slot<=toIndex; slot++) { + V obj = mInternalMap.get(slot); + if (obj == null) { + continue; + } + else { + aNewSubList.put(obj); + } + } + return aNewSubList; + } } diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/AABB.java b/src/Java/gtPlusPlus/api/objects/minecraft/AABB.java new file mode 100644 index 0000000000..722ac00b64 --- /dev/null +++ b/src/Java/gtPlusPlus/api/objects/minecraft/AABB.java @@ -0,0 +1,65 @@ +package gtPlusPlus.api.objects.minecraft; + +import gtPlusPlus.core.util.minecraft.EntityUtils; +import net.minecraft.entity.Entity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +/** + * Generates an AABB around an entity. + * @author Alkalus + * + */ +public cl |
