Skip to content

Commit bf62e60

Browse files
committed
- Fixed circuit configurator radius && Fixed getBlock method
Former-commit-id: 65decf4
1 parent 7daa0b4 commit bf62e60

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
minecraft.version=1.7.10
22
forge.version=10.13.4.1566-1.7.10
33

4-
detravscanner.version=gt.9.29-0.42.0
4+
detravscanner.version=gt.9.29-0.42.1
55

66
ae2.version=rv2-beta-33
77
applecore.version=1.7.10-1.2.1+107.59407

src/main/java/com/detrav/items/behaviours/BehaviourDetravConfigurator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public ItemStack onItemRightClick(GT_MetaBase_Item aItem, ItemStack aStack, Worl
2525
int circuit_config = inv.mainInventory[i].getItemDamage();
2626
if(circuit_config > 5)
2727
circuit_config = 5;
28-
circuit_config *= 2;
28+
//circuit_config *= 2;
2929
circuit_config++;
3030
inv.mainInventory[i] = DetravItemList.ConfiguredCircuit.get(1);
3131
ItemStack aCircuit = inv.mainInventory[i];

src/main/java/com/detrav/tileentities/Detrav_MetaTileEntity_AdvMiner2.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ public boolean checkRecipe(ItemStack aStack) {
109109
World w = getBaseMetaTileEntity().getWorld();
110110
if(w==null) return false;
111111
Chunk c = w.getChunkProvider().provideChunk(x>>4,z>>4);
112-
x = x & 15;
113-
z = z & 15;
112+
int x1 = x & 15;
113+
int z1 = z & 15;
114114
int yTo = getYTo();
115115
for(int yLevel = getYFrom(); yLevel>=yTo; yLevel --)
116116
{
117-
Block tBlock = c.getBlock(x,yLevel,z);
118-
int tMetaID = c.getBlockMetadata(x,yLevel,z);
117+
Block tBlock = c.getBlock(x1,yLevel,z1);
118+
int tMetaID = c.getBlockMetadata(x1,yLevel,z1);
119119
if (tBlock instanceof GT_Block_Ores_Abstract) {
120-
TileEntity tTileEntity = c.getTileEntityUnsafe(x,yLevel,z);
120+
TileEntity tTileEntity = c.getTileEntityUnsafe(x1,yLevel,z1);
121121
if ((tTileEntity!=null)
122122
&& (tTileEntity instanceof GT_TileEntity_Ores)
123123
&& ((GT_TileEntity_Ores) tTileEntity).mNatural == true
@@ -144,7 +144,11 @@ public boolean checkRecipe(ItemStack aStack) {
144144
while ((tMineBlock==null || tMineBlock == Blocks.air) && !mMineList.isEmpty()) {
145145
mle = mMineList.get(0);
146146
mMineList.remove(0);
147-
tMineBlock = getBaseMetaTileEntity().getBlock(mle.chunkPosX, mle.chunkPosY, mle.chunkPosZ);
147+
tMineBlock = getBaseMetaTileEntity()
148+
.getWorld()
149+
.getChunkProvider()
150+
.provideChunk( mle.chunkPosX >> 4, mle.chunkPosZ >> 4 )
151+
.getBlock(mle.chunkPosX&15, mle.chunkPosY, mle.chunkPosZ&15);
148152
}
149153

150154
if (tMineBlock!=null && tMineBlock!=Blocks.air) {

0 commit comments

Comments
 (0)