Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
181d48ac60 | ||
|
|
267adc0a31 |
No files matched your search
@@ -0,0 +1,17 @@
|
||||
name: Optimize images
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
push:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
jobs:
|
||||
optimize-images:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
||||
secrets: inherit
|
||||
@@ -12,6 +12,7 @@ dependencies {
|
||||
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:waila:1.19.22:dev') {transitive = false}
|
||||
runtimeOnlyNonPublishable('com.github.GTNewHorizons:WAILAPlugins:0.7.2:dev') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:Backhand:1.8.4:dev") { transitive = false }
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-812-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.6-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.261:dev') {transitive = false}
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -66,7 +67,9 @@ import crazypants.enderio.teleport.packet.PacketDrainStaff;
|
||||
import crazypants.enderio.teleport.packet.PacketLongDistanceTravelEvent;
|
||||
import crazypants.enderio.teleport.packet.PacketOpenAuthGui;
|
||||
import crazypants.enderio.teleport.packet.PacketTravelEvent;
|
||||
import crazypants.util.BackhandUtil;
|
||||
import crazypants.util.BaublesUtil;
|
||||
import xonin.backhand.api.core.BackhandUtils;
|
||||
|
||||
public class TravelController {
|
||||
|
||||
@@ -538,6 +541,21 @@ public class TravelController {
|
||||
return action < 2;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private TravelSource getTravelSource(final EntityPlayer ep, final ItemStack stack) {
|
||||
final Item item = stack.getItem();
|
||||
if (item instanceof ItemTeleportStaff) {
|
||||
if (((ItemTeleportStaff) item).isActive(ep, stack)) {
|
||||
return TravelSource.TELEPORT_STAFF;
|
||||
}
|
||||
} else if (item instanceof IItemOfTravel) {
|
||||
if (((IItemOfTravel) item).isActive(ep, stack)) {
|
||||
return TravelSource.STAFF;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Returns null if no travel item is in inventory/baubles. */
|
||||
@Nullable
|
||||
public TravelSource getTravelItemTravelSource(EntityPlayer ep, boolean checkInventoryAndBaubles) {
|
||||
@@ -545,6 +563,16 @@ public class TravelController {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (BackhandUtil.backhandLoaded) {
|
||||
final ItemStack offhand = BackhandUtils.getOffhandItem(ep);
|
||||
if (offhand != null && offhand.getItem() != null) {
|
||||
final TravelSource source = getTravelSource(ep, offhand);
|
||||
if (source != null) {
|
||||
return source;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack equipped = ep.getCurrentEquippedItem();
|
||||
if (checkInventoryAndBaubles) {
|
||||
if (equipped == null || !(equipped.getItem() instanceof IItemOfTravel)
|
||||
@@ -552,16 +580,9 @@ public class TravelController {
|
||||
equipped = findTravelItemInInventoryOrBaubles(ep);
|
||||
}
|
||||
}
|
||||
|
||||
if (equipped != null) {
|
||||
if (equipped.getItem() instanceof ItemTeleportStaff) {
|
||||
if (((ItemTeleportStaff) equipped.getItem()).isActive(ep, equipped)) {
|
||||
return TravelSource.TELEPORT_STAFF;
|
||||
}
|
||||
} else if (equipped.getItem() instanceof IItemOfTravel) {
|
||||
if (((IItemOfTravel) equipped.getItem()).isActive(ep, equipped)) {
|
||||
return TravelSource.STAFF;
|
||||
}
|
||||
}
|
||||
return getTravelSource(ep, equipped);
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -634,6 +655,7 @@ public class TravelController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return travelItemSlot;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package crazypants.util;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class BackhandUtil {
|
||||
|
||||
public final static boolean backhandLoaded = Loader.isModLoaded("backhand");
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 395 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 429 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 896 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 733 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 456 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 336 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 202 B |
|
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 461 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 458 B After Width: | Height: | Size: 417 B |
|
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 423 B |
|
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 962 B |
|
Before Width: | Height: | Size: 868 B After Width: | Height: | Size: 791 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 928 B |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 896 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 646 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 592 B After Width: | Height: | Size: 423 B |
|
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 424 B |
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 174 B |
|
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 838 B After Width: | Height: | Size: 837 B |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 412 B |
|
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 222 B |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 236 B |