Compare commits

..
24 Commits
Author SHA1 Message Date
Martin Robertz 2bbe087d75 update 2024-05-27 21:55:05 +02:00
Martin Robertz dc996f4cb2 Merge remote-tracking branch 'origin/tweak-teleport-staff' into dev 2024-05-27 21:54:07 +02:00
D-Cysteine c6be6cf600 Address review comments 2024-05-27 12:53:58 -06:00
Martin Robertz d60fc9b436 update 2024-05-20 11:07:51 +02:00
Martin Robertz 6ad43b2e0d Merge remote-tracking branch 'TheUnderTaker11/git-please' into dev 2024-05-20 11:07:22 +02:00
D-Cysteine 67d49173dc Don't conserve momentum 2024-05-19 16:19:49 -06:00
Martin Robertz 42573b3fa4 update 2024-05-09 10:04:12 +02:00
Martin Robertz c4cbe05dfe Merge branch 'master' into dev
# Conflicts:
#	dependencies.gradle
2024-05-09 10:03:47 +02:00
Martin Robertz a591baf426 update 2024-05-06 09:55:08 +02:00
Martin Robertz 4131a1e7b7 Merge remote-tracking branch 'origin/tweak-teleport-staff' into dev 2024-05-06 09:54:22 +02:00
github-actions[bot]andGitHub GTNH Actions 32c251d805 spotlessApply (#161)
Co-authored-by: GitHub GTNH Actions <>
2024-04-23 19:03:07 -06:00
D-Cysteine b237c6cb4d 2-in-1 TP: find destination client-side 2024-04-23 18:59:06 -06:00
D-Cysteine 58e8bf712c Limit backwards teleport check 2024-04-14 13:01:17 -06:00
D-Cysteine f1978a6a15 Handle server-side travelToLocation 2024-04-13 16:14:42 -06:00
D-Cysteine 5bd58bd981 Check anchor accessibility and require player != null 2024-04-13 16:14:25 -06:00
D-Cysteine b0f7c8600a Check for obstructed anchor on long-distance teleport 2024-04-13 15:35:40 -06:00
D-Cysteine 1b2c38cf0a Clear stored anchors on world load 2024-04-13 15:35:26 -06:00
D-Cysteine e6c216ab31 Add server-side handling for two-in-one teleport action 2024-04-13 15:35:08 -06:00
D-Cysteine 745b6ed528 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
2024-04-13 14:46:20 -06:00
D-Cysteine 9422337282 Add configs for teleport staff actions 2024-04-13 14:44:43 -06:00
github-actions[bot]andGitHub GTNH Actions 3b0025500e spotlessApply (#159)
Co-authored-by: GitHub GTNH Actions <>
2024-04-13 17:36:56 +02:00
D-Cysteine dd739ba58e Fix logic 2024-04-13 09:11:50 -06:00
D-Cysteine edbd5621c3 Fix comment 2024-04-13 09:10:10 -06:00
D-Cysteine d90c7dae1b Tweak teleport staff controls 2024-04-13 09:06:16 -06:00
3 changed files with 13 additions and 22 deletions

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ dependencies {
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:Baubles:1.0.4:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.48.20: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}
@@ -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-alpha52:api') {transitive = false}
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-alpha51:api') {transitive = false}
}
@@ -2,11 +2,10 @@ package crazypants.enderio.conduit.liquid;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
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;
@@ -114,29 +113,27 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
}
}
private static final Map<CollidableComponent, Map<Fluid, List<CachableRenderStatement>>> cache = Collections
.synchronizedMap(new WeakHashMap<>());
private static Map<CollidableComponent, Map<Fluid, List<CachableRenderStatement>>> cache = new WeakHashMap<CollidableComponent, Map<Fluid, List<CachableRenderStatement>>>();
public static List<CachableRenderStatement> computeFluidOutlineToCache(CollidableComponent component, Fluid fluid,
double scaleFactor, float outlineWidth) {
// 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.
Map<Fluid, List<CachableRenderStatement>> cache0 = cache.get(component);
if (cache0 == null) {
cache0 = new HashMap<Fluid, List<CachableRenderStatement>>();
cache.put(component, cache0);
}
List<CachableRenderStatement> data = cache0.get(fluid);
if (data != null) {
return data;
}
data = new ArrayList<>();
data = new ArrayList<CachableRenderStatement>();
cache0.put(fluid, data);
IIcon texture = fluid.getStillIcon();
if (texture == null) {
texture = fluid.getIcon();
if (texture == null) {
cache0.put(fluid, data);
return data;
}
}
@@ -195,7 +192,6 @@ public class LiquidConduitRenderer extends DefaultConduitRenderer implements IRe
}
}
}
cache0.put(fluid, data);
return data;
}
@@ -200,11 +200,12 @@ 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();
PacketLongDistanceTravelEvent p = new PacketLongDistanceTravelEvent(
p = new PacketLongDistanceTravelEvent(
player,
false,
source,
@@ -212,18 +213,12 @@ 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) {