mirror of
https://github.com/GTNewHorizons/FindIt.git
synced 2026-11-24 18:24:21 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
296f29ae76 | ||
|
|
84dd2e45f9 | ||
|
|
3b6d5fa3ad | ||
|
|
f2b4c1a262 | ||
|
|
199f1d81e1 | ||
|
|
c764b60a83 | ||
|
|
c793ceec36 | ||
|
|
fd292e5649 | ||
|
|
5c78cd6e54 | ||
|
|
b03be8e3a7 | ||
|
|
f925a189b0 |
No files matched your search
@@ -3,9 +3,9 @@ name: Build and test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
push:
|
push:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
|
|||||||
@@ -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
|
||||||
+15
-14
@@ -1,26 +1,27 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.75-GTNH:dev")
|
implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.121-GTNH:dev")
|
||||||
implementation("com.github.GTNewHorizons:GTNHLib:0.9.42:dev")
|
implementation("com.github.GTNewHorizons:GTNHLib:0.11.37:dev")
|
||||||
|
|
||||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.348:dev")
|
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.54.80:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.21:dev")
|
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.36:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:Draconic-Evolution:1.5.19-GTNH:dev")
|
compileOnly("com.github.GTNewHorizons:Draconic-Evolution:1.5.31-GTNH:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.11.8:dev")
|
compileOnly("com.github.GTNewHorizons:ForestryMC:4.11.34:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:AdventureBackpack2:1.4.16-GTNH:dev")
|
compileOnly("com.github.GTNewHorizons:AdventureBackpack2:1.4.23-GTNH:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:ProjectRed:4.12.27-GTNH:dev")
|
compileOnly("com.github.GTNewHorizons:ProjectRed:4.12.41-GTNH:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:Minecraft-Backpack-Mod:2.6.10-GTNH:dev")
|
compileOnly("com.github.GTNewHorizons:Minecraft-Backpack-Mod:2.6.16-GTNH:dev")
|
||||||
compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913")
|
compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913")
|
||||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
|
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
|
||||||
compileOnly("com.github.GTNewHorizons:AspectRecipeIndex:1.0.4:dev")
|
compileOnly("com.github.GTNewHorizons:AspectRecipeIndex:1.1.3:dev")
|
||||||
|
compileOnly("net.xonich.mc:NoHotbarNeeded:0.0.3:dev")
|
||||||
|
|
||||||
// For testing in dev environment.
|
// For testing in dev environment.
|
||||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:StorageDrawers:2.2.16-GTNH")
|
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:StorageDrawers:2.2.28-GTNH")
|
||||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:waila:1.19.22")
|
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:waila:1.19.31")
|
||||||
// runtimeOnlyNonPublishable("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
|
// runtimeOnlyNonPublishable("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
|
||||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:Baubles-Expanded:2.2.11-GTNH:dev")
|
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:Baubles-Expanded:2.2.22-GTNH:dev")
|
||||||
// runtimeOnlyNonPublishable(rfg.deobf("curse.maven:thaumcraft-nei-plugin-225095:2241913"))
|
// runtimeOnlyNonPublishable(rfg.deobf("curse.maven:thaumcraft-nei-plugin-225095:2241913"))
|
||||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:AspectRecipeIndex:1.0.4:dev")
|
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:AspectRecipeIndex:1.1.3:dev")
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
#This file is generated by updateDaemonJvm
|
#This file is generated by updateDaemonJvm
|
||||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
|
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1df82b76031285ef2e6a4f59ffe9299d/redirect
|
||||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/59a9771cad43219260d9aac9a8ec4d6a/redirect
|
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7d5be6a02945ac2e045048ee54a7d32/redirect
|
||||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3689d0bcdd77ac01674ba3c9dbbe94d0/redirect
|
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/643f404f769811f5f265fd66f7af5d89/redirect
|
||||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/b96cb7670c095245220e7d01d5927b58/redirect
|
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/38256085a73e137cb4937ea9c4807fec/redirect
|
||||||
toolchainVersion=25
|
toolchainVersion=25
|
||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.29'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -10,6 +10,8 @@ import com.gtnh.findit.handler.AdventureBackpackProvider;
|
|||||||
import com.gtnh.findit.handler.BackpackProvider;
|
import com.gtnh.findit.handler.BackpackProvider;
|
||||||
import com.gtnh.findit.handler.DraconicEvolutionProvider;
|
import com.gtnh.findit.handler.DraconicEvolutionProvider;
|
||||||
import com.gtnh.findit.handler.ForestryStackFilterProvider;
|
import com.gtnh.findit.handler.ForestryStackFilterProvider;
|
||||||
|
import com.gtnh.findit.handler.GregTechCoverChestProvider;
|
||||||
|
import com.gtnh.findit.handler.GregTechCoverProvider;
|
||||||
import com.gtnh.findit.handler.MinecraftProvider;
|
import com.gtnh.findit.handler.MinecraftProvider;
|
||||||
import com.gtnh.findit.handler.ProjectRedExplorationProvider;
|
import com.gtnh.findit.handler.ProjectRedExplorationProvider;
|
||||||
import com.gtnh.findit.handler.ThaumcraftProvider;
|
import com.gtnh.findit.handler.ThaumcraftProvider;
|
||||||
@@ -95,6 +97,11 @@ public class FindIt {
|
|||||||
this.pluginsList.add(new ThaumcraftProvider());
|
this.pluginsList.add(new ThaumcraftProvider());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.isGregTechLoaded) {
|
||||||
|
this.pluginsList.add(new GregTechCoverProvider());
|
||||||
|
this.pluginsList.add(new GregTechCoverChestProvider());
|
||||||
|
}
|
||||||
|
|
||||||
this.pluginsList.add(new MinecraftProvider());
|
this.pluginsList.add(new MinecraftProvider());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import java.util.List;
|
|||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockChest;
|
import net.minecraft.block.BlockChest;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.EntityPlayerSP;
|
|
||||||
import net.minecraft.client.multiplayer.WorldClient;
|
import net.minecraft.client.multiplayer.WorldClient;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityChest;
|
import net.minecraft.tileentity.TileEntityChest;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
@@ -44,7 +44,7 @@ public class BlockHighlighter {
|
|||||||
positions.clear();
|
positions.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityPlayerSP p = mc.thePlayer;
|
EntityLivingBase p = mc.renderViewEntity != null ? mc.renderViewEntity : mc.thePlayer;
|
||||||
double doubleX = p.lastTickPosX + (p.posX - p.lastTickPosX) * event.partialTicks;
|
double doubleX = p.lastTickPosX + (p.posX - p.lastTickPosX) * event.partialTicks;
|
||||||
double doubleY = p.lastTickPosY + (p.posY - p.lastTickPosY) * event.partialTicks;
|
double doubleY = p.lastTickPosY + (p.posY - p.lastTickPosY) * event.partialTicks;
|
||||||
double doubleZ = p.lastTickPosZ + (p.posZ - p.lastTickPosZ) * event.partialTicks;
|
double doubleZ = p.lastTickPosZ + (p.posZ - p.lastTickPosZ) * event.partialTicks;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.EntityPlayerSP;
|
|
||||||
import net.minecraft.client.renderer.entity.RenderItem;
|
import net.minecraft.client.renderer.entity.RenderItem;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
@@ -40,7 +40,7 @@ public class EntityHighlighter {
|
|||||||
entityIds.clear();
|
entityIds.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityPlayerSP p = mc.thePlayer;
|
EntityLivingBase p = mc.renderViewEntity != null ? mc.renderViewEntity : mc.thePlayer;
|
||||||
double doubleX = p.lastTickPosX + (p.posX - p.lastTickPosX) * event.partialTicks;
|
double doubleX = p.lastTickPosX + (p.posX - p.lastTickPosX) * event.partialTicks;
|
||||||
double doubleY = p.lastTickPosY + (p.posY - p.lastTickPosY) * event.partialTicks;
|
double doubleY = p.lastTickPosY + (p.posY - p.lastTickPosY) * event.partialTicks;
|
||||||
double doubleZ = p.lastTickPosZ + (p.posZ - p.lastTickPosZ) * event.partialTicks;
|
double doubleZ = p.lastTickPosZ + (p.posZ - p.lastTickPosZ) * event.partialTicks;
|
||||||
|
|||||||
@@ -49,13 +49,14 @@ public class ParticlePosition extends EntityReddustFX {
|
|||||||
float rotationYZ, float rotationXY, float rotationXZ) {
|
float rotationYZ, float rotationXY, float rotationXZ) {
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
|
|
||||||
|
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
||||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||||
|
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
super.renderParticle(tessellator, partialTickTime, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
|
super.renderParticle(tessellator, partialTickTime, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
GL11.glPopAttrib();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,11 @@ public class SlotHighlighter implements IContainerDrawHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void renderSlotUnderlay(GuiContainer gui, Slot slot) {
|
public void renderSlotUnderlay(GuiContainer gui, Slot slot) {
|
||||||
if (this.gui == gui && this.slots.contains(slot)) {
|
if (this.gui == gui && this.slots.contains(slot)) {
|
||||||
GL11.glPushMatrix();
|
GL11.glPushAttrib(
|
||||||
|
GL11.GL_ENABLE_BIT | GL11.GL_COLOR_BUFFER_BIT
|
||||||
|
| GL11.GL_CURRENT_BIT
|
||||||
|
| GL11.GL_LIGHTING_BIT
|
||||||
|
| GL11.GL_TEXTURE_BIT);
|
||||||
|
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||||
@@ -71,12 +75,7 @@ public class SlotHighlighter implements IContainerDrawHandler {
|
|||||||
highlightSlot(tessellator, slot.xDisplayPosition, slot.yDisplayPosition);
|
highlightSlot(tessellator, slot.xDisplayPosition, slot.yDisplayPosition);
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
|
|
||||||
GL11.glShadeModel(GL11.GL_FLAT);
|
GL11.glPopAttrib();
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
|
||||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
|
||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.gtnh.findit.handler;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
import com.gtnewhorizons.modularui.api.forge.IItemHandler;
|
||||||
|
import com.gtnh.findit.IStackFilter;
|
||||||
|
import com.gtnh.findit.IStackFilter.IStackFilterProvider;
|
||||||
|
import com.gtnh.findit.service.itemfinder.FindItemRequest;
|
||||||
|
|
||||||
|
import gregtech.api.interfaces.tileentity.ICoverable;
|
||||||
|
import gregtech.common.covers.Cover;
|
||||||
|
import gregtech.common.covers.CoverChest;
|
||||||
|
|
||||||
|
public class GregTechCoverChestProvider implements IStackFilterProvider {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IStackFilter getFilter(EntityPlayer player, TileEntity tileEntity) {
|
||||||
|
if (!(tileEntity instanceof ICoverable coverable)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return request -> {
|
||||||
|
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
|
if (!coverable.hasCoverAtSide(side)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (coverChestMatches(player, request, coverable.getCoverAtSide(side))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IStackFilter getFilter(EntityPlayer player, ItemStack stack) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean coverChestMatches(EntityPlayer player, FindItemRequest request, Cover cover) {
|
||||||
|
if (!(cover instanceof CoverChest coverChest)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
IItemHandler items = coverChest.getItems();
|
||||||
|
for (int slot = 0; slot < items.getSlots(); slot++) {
|
||||||
|
ItemStack slotItem = items.getStackInSlot(slot);
|
||||||
|
if (slotItem != null && request.isStackSatisfies(player, slotItem)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.gtnh.findit.handler;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
import com.gtnh.findit.IStackFilter;
|
||||||
|
import com.gtnh.findit.IStackFilter.IStackFilterProvider;
|
||||||
|
|
||||||
|
import gregtech.api.covers.CoverRegistry;
|
||||||
|
import gregtech.api.interfaces.tileentity.ICoverable;
|
||||||
|
import gregtech.api.util.GTUtility;
|
||||||
|
|
||||||
|
public class GregTechCoverProvider implements IStackFilterProvider {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IStackFilter getFilter(EntityPlayer player, TileEntity tileEntity) {
|
||||||
|
if (!(tileEntity instanceof ICoverable coverable)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return request -> {
|
||||||
|
ItemStack stackToFind = request.getStackToFind();
|
||||||
|
if (stackToFind == null || !CoverRegistry.isCover(stackToFind)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
|
if (!coverable.hasCoverAtSide(side)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack coverStack = coverable.getCoverItemAtSide(side);
|
||||||
|
if (GTUtility.areStacksEqual(stackToFind, coverStack, true)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IStackFilter getFilter(EntityPlayer player, ItemStack stack) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,6 @@ import com.gtnh.findit.FindItNetwork;
|
|||||||
import com.gtnh.findit.util.WorldUtils;
|
import com.gtnh.findit.util.WorldUtils;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
|
||||||
|
|
||||||
public class BlockFindService {
|
public class BlockFindService {
|
||||||
|
|
||||||
@@ -37,12 +36,11 @@ public class BlockFindService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tileMeta;
|
int tileMeta = tileBlock.getDamageValue(
|
||||||
if (FindIt.isGregTechLoaded() && tileEntity instanceof IGregTechTileEntity gregTech) {
|
tileEntity.getWorldObj(),
|
||||||
tileMeta = gregTech.getMetaTileID();
|
tileEntity.xCoord,
|
||||||
} else {
|
tileEntity.yCoord,
|
||||||
tileMeta = tileEntity.getBlockMetadata();
|
tileEntity.zCoord);
|
||||||
}
|
|
||||||
|
|
||||||
if (request.getMetaToFind() == tileMeta) {
|
if (request.getMetaToFind() == tileMeta) {
|
||||||
positions.add(new ChunkPosition(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord));
|
positions.add(new ChunkPosition(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord));
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class ProtoUtils {
|
|||||||
buf.writeInt(positions.size());
|
buf.writeInt(positions.size());
|
||||||
for (ChunkPosition pos : positions) {
|
for (ChunkPosition pos : positions) {
|
||||||
buf.writeInt(pos.chunkPosX);
|
buf.writeInt(pos.chunkPosX);
|
||||||
buf.writeByte(pos.chunkPosY);
|
buf.writeInt(pos.chunkPosY);
|
||||||
buf.writeInt(pos.chunkPosZ);
|
buf.writeInt(pos.chunkPosZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ public class ProtoUtils {
|
|||||||
List<ChunkPosition> positions = new ArrayList<>();
|
List<ChunkPosition> positions = new ArrayList<>();
|
||||||
while (amount > 0) {
|
while (amount > 0) {
|
||||||
final int x = buf.readInt();
|
final int x = buf.readInt();
|
||||||
final int y = buf.readUnsignedByte();
|
final int y = buf.readInt();
|
||||||
final int z = buf.readInt();
|
final int z = buf.readInt();
|
||||||
positions.add(new ChunkPosition(x, y, z));
|
positions.add(new ChunkPosition(x, y, z));
|
||||||
--amount;
|
--amount;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 227 B |
Reference in new issue
Block a user