Compare commits

..
29 Commits
Author SHA1 Message Date
Martin Robertz 948a021f3e update 2024-12-29 18:01:20 +01:00
Simon Zünd 346bbf4e53 Remove left-over code and textures for ultra dense ME conduits (#182) 2024-12-29 16:25:03 +00:00
Martin Robertz 5769ebe3cb update 2024-12-22 01:21:47 +01:00
Pascal 4558f194be ensure TileLightNode instance at breakBlock (#181) 2024-12-21 10:31:30 -06:00
Martin Robertz e12142890e update 2024-11-16 15:28:59 +01:00
Kogepan229andboubou19 e6ebb5dfec Fix Zombie Generator NPE (#180)
Co-authored-by: boubou19 <[email protected]>
2024-11-14 19:22:20 +00:00
54M44R 1d4f6831dd Prevent Silver Capacitor from being used as Upgrade (#178) 2024-11-14 13:32:38 +00:00
Dream Master 726ce46475 update 2024-11-12 12:15:49 +01:00
Noc d01de95e8e removed conduit subtype (#179) 2024-11-12 08:35:28 +01:00
Martin Robertz b15d357f1a update 2024-10-21 21:56:28 +02:00
Darren Eberly 0fbf6f05ba No more TESR on conduits (#176)
* Goodbye TESR, Hello ISBRH

* More fluid conduit rendering work

* more stuff

* spotless

* Add empty check to fluid conduit renderer
2024-10-21 20:08:58 +02:00
Martin Robertz bf9c2cd2c7 update 2024-10-02 15:16:09 +02:00
chochem 51b4c4e74c dont double apply oredicts (#175) 2024-10-01 20:16:52 +01:00
Dream Master cf6b678dd9 update 2024-07-15 23:45:30 +07:00
Under 6c205150b1 Travel Staff Blink Keybind fixes. (#163)
Fixes 2 separate bugs with the SoT keybind.
1. Staff of Teleportation in GTNH pack specifically didn't work due to reporting as having 0 power through the RF API. Fixed this by having it always report that it's full of power since it has infinite.
2. BlackSteelSword and EndSteelSword (The Ender and MKII) both were quite funky with keybind, causing no teleports to happen when they really should have.
Fixed this through tweaks to how this is handled in a number of places to allow for proper handling while not changing the default held/shift held behavior.

Tested in SP, Anchor behavior while holding staffs and Swords with travel thing on them work as expected. Keybind now works and is able to use swords with travel thing on them.
One quirk is that if you are holding a sword with travel upgrade, but NOT shifting, the sword itself stops counting as a valid travel item. So if ONLY using sword no separate SoT the keybind will not work unless you hold shift. If you have another SoT in your inventory it will identify and use that and still blink you upon hitting keybind.
This quirk doesn't really matter in most cases, just something worth noting I guess.
2024-07-15 23:43:39 +07:00
Zoltán Szepesi e39a1e1eb6 Fix LiquidConduit not attempting to pull fluids from all directions if one of external tanks are empty (#174) 2024-07-15 19:09:16 +07:00
glowredman 4a94c1ba90 Remove isModLoaded check for GTNH Lib (#172) 2024-07-11 08:44:35 -05:00
Jason Mitchell 0fc382dd13 Update dependencies.gradle (#170)
Fix server test
2024-07-11 03:31:46 -05:00
Jason Mitchell 04964e15e4 hard dep on gtnhlib 2024-07-10 14:09:43 -07:00
Jason Mitchell 085ccc9d21 Try a CasList, since the Collections.synchronizedList actually needed the reads to be synchronized... 2024-07-10 13:40:46 -07:00
Dream Master 1903589e29 update 2024-07-08 13:26:52 +07:00
Ethryan 46971bbe0e Rename Dark Iron Bars to Dark Steel (#167) 2024-07-05 13:20:31 +07:00
Martin Robertz 4ccecf7bc0 update 2024-07-02 23:50:19 +02:00
Jason Mitchell 92fb58f0c6 Work around CME
* Not entirely sure why it's being concurrently modified.. so let's just make it safe for now
2024-06-30 14:15:24 -07:00
Martin Robertz 54c6db0afc update 2024-06-05 22:49:08 +02:00
OvermindDL1 84d9dcaf00 Fix another thread data race issue introduced in #164. 2024-06-04 21:53:01 -07:00
Jason Mitchell af923d1977 Probably less thread unsafe. (#164) 2024-06-04 18:53:14 -07:00
Martin Robertz efb918fc6d update 2024-06-02 23:05:27 +02:00
6447ffb4d5 Tweaks to EnderIO travel + teleportation (#158)
* Tweak teleport staff controls

* Fix comment

* Fix logic

* spotlessApply (#159)

Co-authored-by: GitHub GTNH Actions <>

* Add configs for teleport staff actions

* Various TP fixes

* Allow TP to unloaded anchor
* Improve TP through wall by checking every 0.5 instead of 2 distance
* Fix blink placing player one block too high
* Fix anchor being incorrectly selected sometimes by constraining to visual angle

* Add server-side handling for two-in-one teleport action

* Clear stored anchors on world load

* Check for obstructed anchor on long-distance teleport

* Check anchor accessibility and require `player != null`

* Handle server-side `travelToLocation`

* Limit backwards teleport check

* 2-in-1 TP: find destination client-side

* spotlessApply (#161)

Co-authored-by: GitHub GTNH Actions <>

* Don't conserve momentum

* Address review comments

* Refactor packet instantiation

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-02 17:20:23 +02:00
33 changed files with 138 additions and 246 deletions

No files matched your search

+11 -11
View File
@@ -2,21 +2,21 @@
dependencies {
api('com.github.GTNewHorizons:EnderCore:0.4.6:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.3:dev')
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.6.1-GTNH:dev')
compileOnly("com.github.GTNewHorizons:GTNHLib:0.2.11:dev")
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.0:dev')
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.7.8-GTNH:dev')
api("com.github.GTNewHorizons:GTNHLib:0.6.0:dev")
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:dev')
api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748
shadowImplementation('cglib:cglib-nodep:3.3.0')
compileOnly('com.github.GTNewHorizons:waila:1.8.0:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-404-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:waila:1.8.2:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-511-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.48.09:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.8:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.13.5-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Chisel:2.15.0-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.11-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.36:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Railcraft:9.16.0:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.0.5-GTNH:api') {transitive = false}
compileOnly('com.github.GTNewHorizons:Chisel:2.16.0-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.1-GTNH:api') {transitive = false}
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('curse.maven:ee3-65509:2305023') // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
@@ -24,5 +24,5 @@ dependencies {
compileOnly(rfg.deobf('curse.maven:mekanism-268560:2475797')) // https://www.curseforge.com/minecraft/mc-mods/mekanism/files/2475797
compileOnly(rfg.deobf('maven.modrinth:immibis-microblocks:59.1.2')) // https://modrinth.com/mod/immibis-microblocks/version/59.1.2
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-alpha51:api') {transitive = false}
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta28:api') {transitive = false}
}
+12 -1
View File
@@ -85,6 +85,11 @@ accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
# Mixin classes will have access to "main" classes, but not the other way around.
separateMixinSourceSet =
# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false
@@ -117,9 +122,15 @@ minimizeShadowedDependencies = true
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
# list of strings, with the acceptable keys being(case does not matter):
# cursemaven
# modrinth
excludeWellKnownRepositories =
# 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.
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.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+5 -2
View File
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# 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
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Vendored
+2
View File
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
}
@@ -27,7 +27,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import crazypants.enderio.conduit.BlockConduitBundle;
import crazypants.enderio.conduit.IConduit;
import crazypants.enderio.conduit.TileConduitBundle;
import crazypants.enderio.conduit.facade.FacadeRenderer;
import crazypants.enderio.conduit.gas.GasConduit;
import crazypants.enderio.conduit.gas.GasUtil;
@@ -378,7 +377,6 @@ public class ClientProxy extends CommonProxy {
cbr = new ConduitBundleRenderer((float) Config.conduitScale);
BlockConduitBundle.rendererId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(cbr);
ClientRegistry.bindTileEntitySpecialRenderer(TileConduitBundle.class, cbr);
ClientRegistry.bindTileEntitySpecialRenderer(TileTravelAnchor.class, new TravelEntitySpecialRenderer());
@@ -186,7 +186,7 @@ import crazypants.util.EE3Util;
modid = MODID,
name = MOD_NAME,
version = VERSION,
dependencies = "required-after:CoFHLib@(1.0.3B3,);after:endercore;after:MineFactoryReloaded;after:Forestry;after:Waila@[1.5.8,);after:Thaumcraft;after:appliedenergistics2@[rv2-beta-8,);after:chisel",
dependencies = "required-after:CoFHLib@(1.0.3B3,);after:endercore;after:MineFactoryReloaded;after:Forestry;after:Waila@[1.5.8,);after:Thaumcraft;after:appliedenergistics2@[rv2-beta-8,);after:chisel;required-after:gtnhlib@[0.2.10,)",
guiFactory = "crazypants.enderio.config.ConfigFactoryEIO")
public class EnderIO {
@@ -697,10 +697,6 @@ public class ConduitRecipes {
res.stackSize = 1;
ItemStack resDense = new ItemStack(EnderIO.itemMEConduit, 1, 1);
ItemStack resUltra = new ItemStack(EnderIO.itemMEConduit, 1, 2);
addShaped(resDense, "bCb", "CbC", "bCb", 'b', conduitBinder, 'C', res);
if (Config.enableMEUltraDenseConduits) {
addShaped(resUltra, "bCb", "CbC", "bCb", 'b', conduitBinder, 'C', resDense);
}
}
}
@@ -25,6 +25,7 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import com.enderio.core.client.render.BoundingBox;
import com.gtnewhorizon.gtnhlib.concurrent.cas.CasList;
import appeng.api.networking.IGridNode;
import appeng.api.util.AECableType;
@@ -66,7 +67,7 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
public static final short NBT_VERSION = 1;
private final List<IConduit> conduits = new ArrayList<IConduit>();
private final List<IConduit> conduits = new CasList<>();
private Block facadeId = null;
private int facadeMeta = 0;
@@ -74,9 +75,9 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
private boolean facadeChanged;
private final List<CollidableComponent> cachedCollidables = new ArrayList<CollidableComponent>();
private final List<CollidableComponent> cachedCollidables = new ArrayList<>();
private final List<CollidableComponent> cachedConnectors = new ArrayList<CollidableComponent>();
private final List<CollidableComponent> cachedConnectors = new ArrayList<>();
private boolean conduitsDirty = true;
private boolean collidablesDirty = true;
@@ -536,7 +537,7 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
@Override
public List<CollidableComponent> getConnectors() {
List<CollidableComponent> result = new ArrayList<CollidableComponent>();
List<CollidableComponent> result = new ArrayList<>();
addConnectors(result);
return result;
}
@@ -143,7 +143,7 @@ public class LiquidConduit extends AbstractTankConduit {
}
}
if (!foundFluid) {
return;
continue;
}
FluidStack couldDrain = extTank.drain(dir.getOpposite(), MAX_EXTRACT_PER_TICK, false);
@@ -1,11 +1,11 @@
package crazypants.enderio.conduit.liquid;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
@@ -56,10 +56,17 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
super.renderEntity(conduitBundleRenderer, te, conduit, x, y, z, partialTick, worldLight, rb);
}
public void renderDynamicEntity(ConduitBundleRenderer conduitBundleRenderer, IConduitBundle te, IConduit conduit,
double x, double y, double z, float partialTick, float worldLight) {
}
@Override
protected void renderConduit(IIcon tex, IConduit conduit, CollidableComponent component, float brightness) {
Tessellator tessellator = Tessellator.instance;
if (isNSEWUD(component.dir)) {
LiquidConduit lc = (LiquidConduit) conduit;
IIcon fluidTex = conduit.getTransmitionTextureForState(component);
FluidStack fluid = lc.getFluidType();
if (fluid != null) {
renderFluidOutline(component, fluid);
@@ -67,33 +74,40 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
BoundingBox[] cubes = toCubes(component.bound);
for (BoundingBox cube : cubes) {
drawSection(cube, tex.getMinU(), tex.getMaxU(), tex.getMinV(), tex.getMaxV(), component.dir, false);
// This check is kinda broken, but whatever, it was like that when this was done in a TESR too
if (lc.getTank().getFilledRatio() <= 0) {
continue;
}
tessellator.setColorOpaque_F(0.7f, 0.7f, 0.7f);
drawSection(
cube,
fluidTex.getMinU(),
fluidTex.getMaxU(),
fluidTex.getMinV(),
fluidTex.getMaxV(),
component.dir,
true);
}
} else {
drawSection(
component.bound,
tex.getMinU(),
tex.getMaxU(),
tex.getMinV(),
tex.getMaxV(),
component.dir,
true);
}
if (conduit.getConnectionMode(component.dir) == ConnectionMode.DISABLED) {
final CubeRenderer cr = CubeRenderer.get();
int i;
tex = EnderIO.blockConduitBundle.getConnectorIcon(component.data);
List<Vertex> corners = component.bound
.getCornersWithUvForFace(component.dir, tex.getMinU(), tex.getMaxU(), tex.getMinV(), tex.getMaxV());
for (i = corners.size() - 1; i >= 0; i--) {
Vertex c = corners.get(i);
cr.addVecWithUV(c.xyz, c.uv.x, c.uv.y);
}
// back face
for (i = corners.size() - 1; i >= 0; i--) {
Vertex c = corners.get(i);
cr.addVecWithUV(c.xyz, c.uv.x, c.uv.y);
if (conduit.getConnectionMode(component.dir) == ConnectionMode.DISABLED) {
final CubeRenderer cr = CubeRenderer.get();
int i;
tex = EnderIO.blockConduitBundle.getConnectorIcon(component.data);
List<Vertex> corners = component.bound.getCornersWithUvForFace(
component.dir,
tex.getMinU(),
tex.getMaxU(),
tex.getMinV(),
tex.getMaxV());
for (i = corners.size() - 1; i >= 0; i--) {
Vertex c = corners.get(i);
cr.addVecWithUV(c.xyz, c.uv.x, c.uv.y);
}
// back face
for (i = corners.size() - 1; i >= 0; i--) {
Vertex c = corners.get(i);
cr.addVecWithUV(c.xyz, c.uv.x, c.uv.y);
}
}
}
}
@@ -113,27 +127,29 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
}
}
private static Map<CollidableComponent, Map<Fluid, List<CachableRenderStatement>>> cache = new WeakHashMap<CollidableComponent, Map<Fluid, List<CachableRenderStatement>>>();
private static final Map<CollidableComponent, Map<Fluid, List<CachableRenderStatement>>> cache = Collections
.synchronizedMap(new WeakHashMap<>());
public static List<CachableRenderStatement> computeFluidOutlineToCache(CollidableComponent component, Fluid fluid,
double scaleFactor, float outlineWidth) {
Map<Fluid, List<CachableRenderStatement>> cache0 = cache.get(component);
if (cache0 == null) {
cache0 = new HashMap<Fluid, List<CachableRenderStatement>>();
cache.put(component, cache0);
}
// Only init once per component across all threads so the cache stays accurate.
Map<Fluid, List<CachableRenderStatement>> cache0 = cache
.computeIfAbsent(component, _k -> new ConcurrentHashMap<>());
// The rest of this function 'should' be in a `computeIfAbsent` as well for:
// `cache0.computeIfAbsent(fluid, _k -> ...)` but that won't cause a bug in this case,
// just a bit more garbage.
List<CachableRenderStatement> data = cache0.get(fluid);
if (data != null) {
return data;
}
data = new ArrayList<CachableRenderStatement>();
cache0.put(fluid, data);
data = new ArrayList<>();
IIcon texture = fluid.getStillIcon();
if (texture == null) {
texture = fluid.getIcon();
if (texture == null) {
cache0.put(fluid, data);
return data;
}
}
@@ -192,6 +208,7 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
}
}
}
cache0.put(fluid, data);
return data;
}
@@ -239,49 +256,6 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
// done in the dynamic section
}
@Override
public boolean isDynamic() {
return true;
}
@Override
public void renderDynamicEntity(ConduitBundleRenderer conduitBundleRenderer, IConduitBundle te, IConduit conduit,
double x, double y, double z, float partialTick, float worldLight) {
if (((LiquidConduit) conduit).getTank().getFilledRatio() <= 0) {
return;
}
Collection<CollidableComponent> components = conduit.getCollidableComponents();
Tessellator tessellator = Tessellator.instance;
calculateRatios((LiquidConduit) conduit);
transmissionScaleFactor = conduit.getTransmitionGeometryScale();
IIcon tex;
for (CollidableComponent component : components) {
if (renderComponent(component)) {
if (isNSEWUD(component.dir) && conduit.getTransmitionTextureForState(component) != null) {
tessellator.setColorOpaque_F(1, 1, 1);
tex = conduit.getTransmitionTextureForState(component);
BoundingBox[] cubes = toCubes(component.bound);
for (BoundingBox cube : cubes) {
drawSection(
cube,
tex.getMinU(),
tex.getMaxU(),
tex.getMinV(),
tex.getMaxV(),
component.dir,
true);
}
}
}
}
}
@Override
protected void setVerticesForTransmission(BoundingBox bound, ForgeDirection id) {
@@ -14,7 +14,5 @@ public interface IMEConduit extends IConduit {
boolean isDense();
boolean isDenseUltra();
int getChannelsInUse();
}
@@ -15,8 +15,7 @@ public class ItemMEConduit extends AbstractItemConduit {
private static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
new ItemConduitSubtype(ModObject.itemMEConduit.name(), "enderio:itemMeConduit"),
new ItemConduitSubtype(ModObject.itemMEConduit.name() + "Dense", "enderio:itemMeConduitDense"),
new ItemConduitSubtype(ModObject.itemMEConduit.name() + "DenseUltra", "enderio:itemMeConduitDenseUltra") };
new ItemConduitSubtype(ModObject.itemMEConduit.name() + "Dense", "enderio:itemMeConduitDense") };
public static ItemMEConduit create() {
ItemMEConduit result = new ItemMEConduit();
@@ -16,7 +16,6 @@ import com.enderio.core.client.render.IconUtil;
import com.enderio.core.common.util.BlockCoord;
import appeng.api.AEApi;
import appeng.api.networking.GridFlags;
import appeng.api.networking.IGridConnection;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
@@ -51,7 +50,6 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
public static IIcon[] longTextures;
private boolean isDense;
private boolean isDenseUltra;
private int playerID = -1;
public MEConduit() {
@@ -59,7 +57,6 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
}
public MEConduit(int itemDamage) {
isDenseUltra = itemDamage == 2;
isDense = itemDamage == 1;
}
@@ -68,16 +65,14 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
@Override
public void registerIcons(IIconRegister register) {
coreTextures = new IIcon[3];
longTextures = new IIcon[3];
coreTextures = new IIcon[2];
longTextures = new IIcon[2];
coreTextures[0] = register.registerIcon(EnderIO.DOMAIN + ":meConduitCore");
coreTextures[1] = register.registerIcon(EnderIO.DOMAIN + ":meConduitCoreDense");
coreTextures[2] = register.registerIcon(EnderIO.DOMAIN + ":meConduitCoreDenseUltra");
longTextures[0] = register.registerIcon(EnderIO.DOMAIN + ":meConduit");
longTextures[1] = register.registerIcon(EnderIO.DOMAIN + ":meConduitDense");
longTextures[2] = register.registerIcon(EnderIO.DOMAIN + ":meConduitDenseUltra");
}
@Override
@@ -87,10 +82,7 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
});
}
public static int getDamageForState(boolean isDense, boolean isDenseUltra) {
if (isDenseUltra) {
return 2;
}
public static int getDamageForState(boolean isDense) {
if (isDense) {
return 1;
}
@@ -104,7 +96,7 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
@Override
public ItemStack createItem() {
return new ItemStack(EnderIO.itemMEConduit, 1, getDamageForState(isDense, isDenseUltra));
return new ItemStack(EnderIO.itemMEConduit, 1, getDamageForState(isDense));
}
@Override
@@ -122,7 +114,6 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
public void writeToNBT(NBTTagCompound nbtRoot) {
super.writeToNBT(nbtRoot);
nbtRoot.setBoolean("isDense", isDense);
nbtRoot.setBoolean("isDenseUltra", isDenseUltra);
nbtRoot.setInteger("playerID", playerID);
}
@@ -135,9 +126,6 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
} else {
playerID = -1;
}
if (nbtRoot.hasKey("isDenseUltra")) {
isDenseUltra = nbtRoot.getBoolean("isDenseUltra");
}
}
public void setPlayerID(int playerID) {
@@ -208,22 +196,12 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
@Method(modid = "appliedenergistics2")
private Boolean canConnectToGridNode(IGridNode node, ForgeDirection dir) {
if (node.getGridBlock().getConnectableSides().contains(dir.getOpposite())) {
if (isDenseUltra()) {
return node.hasFlag(GridFlags.ULTRA_DENSE_CAPACITY)
|| ((node.hasFlag(GridFlags.DENSE_CAPACITY)) && !node.hasFlag(GridFlags.CANNOT_CARRY));
} else if (isDense()) {
return true;
} else {
return !node.hasFlag(GridFlags.ULTRA_DENSE_CAPACITY);
}
}
return false;
return node.getGridBlock().getConnectableSides().contains(dir.getOpposite());
}
@Override
public IIcon getTextureForState(CollidableComponent component) {
int state = getDamageForState(isDense, isDenseUltra);
int state = getDamageForState(isDense);
if (component.dir == ForgeDirection.UNKNOWN) {
return coreTextures[state];
} else {
@@ -400,9 +378,4 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
public boolean isDense() {
return isDense;
}
@Override
public boolean isDenseUltra() {
return isDenseUltra;
}
}
@@ -43,9 +43,6 @@ public class MEConduitGrid implements IGridBlock {
@Override
public EnumSet<GridFlags> getFlags() {
if (conduit.isDenseUltra()) {
return EnumSet.of(GridFlags.ULTRA_DENSE_CAPACITY);
}
if (conduit.isDense()) {
return EnumSet.of(GridFlags.DENSE_CAPACITY);
}
@@ -11,7 +11,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
@@ -19,13 +18,9 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.enderio.core.client.render.BoundingBox;
import com.enderio.core.client.render.CubeRenderer;
import com.enderio.core.client.render.IconUtil;
import com.enderio.core.client.render.RenderUtil;
import com.enderio.core.common.util.BlockCoord;
import com.enderio.core.common.util.IBlockAccessWrapper;
import com.google.common.collect.Lists;
@@ -53,59 +48,12 @@ import crazypants.util.RenderPassHelper;
@SideOnly(Side.CLIENT)
@ThreadSafeISBRH(perThread = false)
public class ConduitBundleRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler {
public class ConduitBundleRenderer implements ISimpleBlockRenderingHandler {
public ConduitBundleRenderer(float conduitScale) {}
public ConduitBundleRenderer() {}
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTick) {
IConduitBundle bundle = (IConduitBundle) te;
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
if (bundle == null || (bundle.hasFacade() && bundle.getFacadeId().isOpaqueCube()
&& !ConduitUtil.isFacadeHidden(bundle, player))) {
return;
}
final Tessellator tessellator = Tessellator.instance;
float brightness = -1;
for (IConduit con : bundle.getConduits()) {
if (ConduitUtil.renderConduit(player, con)) {
final ConduitRenderer renderer = con.getRenderer();
if (renderer.isDynamic()) {
if (brightness == -1) {
BlockCoord loc = bundle.getLocation();
brightness = bundle.getEntity().getWorldObj()
.getLightBrightnessForSkyBlocks(loc.x, loc.y, loc.z, 0);
RenderUtil.bindBlockTexture();
GL11.glPushAttrib(GL11.GL_ENABLE_BIT | GL11.GL_LIGHTING_BIT);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
tessellator.startDrawingQuads();
}
renderer.renderDynamicEntity(this, bundle, con, x, y, z, partialTick, brightness);
}
}
}
if (brightness != -1) {
tessellator.draw();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
GL11.glPopAttrib();
}
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
RenderBlocks rb) {
@@ -10,8 +10,4 @@ public interface ConduitRenderer {
void renderEntity(ConduitBundleRenderer conduitBundleRenderer, IConduitBundle te, IConduit con, double x, double y,
double z, float partialTick, float worldLight, RenderBlocks rb);
boolean isDynamic();
void renderDynamicEntity(ConduitBundleRenderer conduitBundleRenderer, IConduitBundle te, IConduit con, double x,
double y, double z, float partialTick, float worldLight);
}
@@ -63,10 +63,6 @@ public class DefaultConduitRenderer implements ConduitRenderer {
}
}
@Override
public void renderDynamicEntity(ConduitBundleRenderer conduitBundleRenderer, IConduitBundle te, IConduit con,
double x, double y, double z, float partialTick, float worldLight) {}
protected void renderConduit(IIcon tex, IConduit conduit, CollidableComponent component, float brightness) {
final CubeRenderer cr = CubeRenderer.get();
@@ -349,8 +345,4 @@ public class DefaultConduitRenderer implements ConduitRenderer {
return new BoundingBox[] { bb };
}
@Override
public boolean isDynamic() {
return false;
}
}
@@ -475,7 +475,6 @@ public final class Config {
public static boolean isGasConduitEnabled = true;
public static boolean enableMEConduits = true;
public static boolean enableMEUltraDenseConduits = false;
public static boolean enableOCConduits = true;
public static boolean enableOCConduitsAnimatedTexture = true;
@@ -2415,11 +2414,6 @@ public final class Config {
sectionItems.name,
enableMEConduits,
"Allows ME conduits. Only has an effect with AE2 installed.");
enableMEUltraDenseConduits = config.getBoolean(
"enableMEUltraDenseConduits",
sectionItems.name,
enableMEUltraDenseConduits,
"Allows ME Ultra Dense conduits. Only has an effect with AE2 installed.");
enableOCConduits = config.getBoolean(
"enableOCConduits",
sectionItems.name,
@@ -168,7 +168,8 @@ public abstract class AbstractMachineEntity extends TileEntityEio
public final boolean isItemValidForSlot(int i, ItemStack itemstack) {
if (slotDefinition.isUpgradeSlot(i)) {
return itemstack != null && itemstack.getItem() == EnderIO.itemBasicCapacitor
&& itemstack.getItemDamage() > 0;
&& itemstack.getItemDamage() > 0
&& itemstack.getItemDamage() != 7;
}
return isMachineItemValidForSlot(i, itemstack);
}
@@ -40,6 +40,11 @@ public class TileZombieGenerator extends AbstractGeneratorEntity
public String getMachineName() {
return ModObject.blockFrankenzombieGenerator.unlocalisedName;
}
@Override
public GeneratorType getGeneratorType() {
return GeneratorType.FRANKENZOMBIE;
}
}
public static class TileEnderGenerator extends TileZombieGenerator {
@@ -58,6 +63,11 @@ public class TileZombieGenerator extends AbstractGeneratorEntity
protected Fluid getFluidType() {
return EnderIO.fluidEnderDistillation;
}
@Override
public GeneratorType getGeneratorType() {
return GeneratorType.ENDER;
}
}
private static int IO_MB_TICK = 250;
@@ -326,7 +336,7 @@ public class TileZombieGenerator extends AbstractGeneratorEntity
}
public GeneratorType getGeneratorType() {
return ((BlockZombieGenerator) worldObj.getBlock(xCoord, yCoord, zCoord)).getGeneratorType();
return GeneratorType.ZOMBIE;
}
public int getOutputPerTick() {
@@ -5,6 +5,7 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@@ -56,9 +57,10 @@ public class BlockLightNode extends BlockEio {
@Override
public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
TileLightNode te = (TileLightNode) world.getTileEntity(x, y, z);
if (te != null) {
te.onBlockRemoved();
TileEntity te = world.getTileEntity(x, y, z);
if (te instanceof TileLightNode) {
TileLightNode light = (TileLightNode) te;
light.onBlockRemoved();
}
}
@@ -33,9 +33,10 @@ public enum Alloy {
if (oreDictName != null) {
this.oreIngots.add("ingot" + StringUtils.capitalize(oreDictName));
this.oreBlocks.add("block" + StringUtils.capitalize(oreDictName));
} else {
this.oreIngots.add("ingot" + StringUtils.capitalize(baseName));
this.oreBlocks.add("block" + StringUtils.capitalize(baseName));
}
this.oreIngots.add("ingot" + StringUtils.capitalize(baseName));
this.oreBlocks.add("block" + StringUtils.capitalize(baseName));
this.hardness = hardness;
}
@@ -103,7 +103,7 @@ public class ItemCapacitor extends Item implements ICapacitorItem {
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
if (par1ItemStack != null && par1ItemStack.getItemDamage() > 0) {
if (par1ItemStack != null && par1ItemStack.getItemDamage() > 0 && par1ItemStack.getItemDamage() != 7) {
par3List.add(EnderIO.lang.localize("machine.tooltip.upgrade"));
if (SpecialTooltipHandler.showAdvancedTooltips()) {
SpecialTooltipHandler.addDetailedTooltipFromResources(par3List, "enderio.machine.tooltip.upgrade");
@@ -46,7 +46,6 @@ import com.google.common.collect.Table;
import com.google.common.collect.TreeBasedTable;
import com.gtnewhorizon.gtnhlib.GTNHLib;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
@@ -200,12 +199,11 @@ public class TravelController {
public boolean activateTravelAccessable(ItemStack equipped, World world, EntityPlayer player, TravelSource source,
boolean alsoDoTeleport) {
if (!hasTarget()) {
PacketLongDistanceTravelEvent p = new PacketLongDistanceTravelEvent(player, false, source);
if (alsoDoTeleport) {
Optional<BlockCoord> destinationOptional = findTeleportDestination(player);
if (destinationOptional.isPresent()) {
BlockCoord destination = destinationOptional.get();
p = new PacketLongDistanceTravelEvent(
PacketLongDistanceTravelEvent p = new PacketLongDistanceTravelEvent(
player,
false,
source,
@@ -213,12 +211,18 @@ public class TravelController {
destination.x,
destination.y,
destination.z);
PacketHandler.INSTANCE.sendToServer(p);
// We have no way of knowing if it will succeed, so just return false.
return false;
}
}
PacketLongDistanceTravelEvent p = new PacketLongDistanceTravelEvent(player, false, source);
PacketHandler.INSTANCE.sendToServer(p);
// We have no way of knowing if it will succeed, so just return false.
return false;
}
BlockCoord target = selectedCoord;
TileEntity te = world.getTileEntity(target.x, target.y, target.z);
if (te instanceof ITravelAccessable) {
@@ -1189,19 +1193,15 @@ public class TravelController {
}
public static void showMessage(EntityPlayer player, IChatComponent chatComponent) {
if (Loader.isModLoaded("gtnhlib")) {
if (player instanceof EntityPlayerMP) {
chatComponent.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.WHITE));
GTNHLib.proxy.sendMessageAboveHotbar((EntityPlayerMP) player, chatComponent, 60, true, true);
} else {
GTNHLib.proxy.printMessageAboveHotbar(
EnumChatFormatting.WHITE + chatComponent.getFormattedText(),
60,
true,
true);
}
if (player instanceof EntityPlayerMP) {
chatComponent.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.WHITE));
GTNHLib.proxy.sendMessageAboveHotbar((EntityPlayerMP) player, chatComponent, 60, true, true);
} else {
player.addChatComponentMessage(chatComponent);
GTNHLib.proxy.printMessageAboveHotbar(
EnumChatFormatting.WHITE + chatComponent.getFormattedText(),
60,
true,
true);
}
}
}
@@ -344,14 +344,13 @@ public class WailaCompat implements IWailaDataProvider {
} else if (itemStack.getItem() == EnderIO.itemMEConduit) {
NBTTagCompound nbtRoot = accessor.getNBTData();
if (nbtRoot.hasKey("isDense")) {
boolean isDenseUltra = nbtRoot.getBoolean("isDenseUltra");
boolean isDense = nbtRoot.getBoolean("isDense");
int channelsInUse = nbtRoot.getInteger("channelsInUse");
currenttip.add(
MessageFormat.format(
EnderIO.lang.localize("itemMEConduit.channelsUsed"),
channelsInUse,
isDenseUltra ? 128 : (isDense ? 32 : 8)));
isDense ? 32 : 8));
}
}
}
@@ -387,7 +386,6 @@ public class WailaCompat implements IWailaDataProvider {
if (mec != null) {
tag.setInteger("channelsInUse", mec.getChannelsInUse());
tag.setBoolean("isDense", mec.isDense());
tag.setBoolean("isDenseUltra", mec.isDenseUltra());
}
} else if (te instanceof IInternalPoweredTile) {
IInternalPoweredTile ipte = (IInternalPoweredTile) te;
@@ -130,7 +130,6 @@ enderio.itemGasConduit.tooltip.detailed.line1=Transportiert Mekanism-kompatible
enderio.itemMEConduit.name=ME-Leitung
enderio.itemMEConduitDense.name=Dichte ME-Leitung
enderio.itemMEConduitDenseUltra.name=Extrem Dichte ME-Leitungen
enderio.itemMEConduit.channelsUsed={0,number} von {1,number} Kanälen
enderio.itemOCConduit.name=Netzwerkleitung (OC)
@@ -136,7 +136,6 @@ enderio.itemGasConduit.tooltip.detailed.line1=Transfers Mekanism-compatible gase
enderio.itemMEConduit.name=ME Conduit
enderio.itemMEConduitDense.name=Dense ME Conduit
enderio.itemMEConduitDenseUltra.name=Ultra Dense ME Conduit
enderio.itemMEConduit.channelsUsed={0,number} of {1,number} Channels
enderio.itemOCConduit.name=Network Conduit (OC)
@@ -150,7 +149,7 @@ enderio.silicon.name=Silicon
enderio.conduitBinder.name=Conduit Binder
enderio.binderComposite.name=Binder Composite
enderio.phasedIronNugget.name=Pulsating Iron Nugget
tile.blockDarkIronBars.name=Dark Iron Bars
tile.blockDarkIronBars.name=Dark Steel Bars
tile.blockSoulariumBars.name=Soularium Bars
tile.blockEndSteelBars.name=End Steel Bars
tile.blockEndermanSkull.name=Enderman Skull
Binary file not shown.

Before

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB