Browse Source

Fixed more issues with Skyroot tools, updated to MC 1.10.2

labyrinthchest
Collin1971 4 years ago
parent
commit
08d760343a
8 changed files with 15 additions and 23 deletions
  1. +3
    -3
      build.properties
  2. +1
    -1
      modules/Gilded-Games-Util
  3. +1
    -1
      src/main/java/com/gildedgames/aether/common/CommonProxy.java
  4. +2
    -2
      src/main/java/com/gildedgames/aether/common/items/tools/ItemSkyrootTool.java
  5. +0
    -2
      src/main/java/com/gildedgames/aether/common/network/NetworkingAether.java
  6. +2
    -4
      src/main/java/com/gildedgames/aether/common/player/PlayerAetherEvents.java
  7. +4
    -8
      src/main/java/com/gildedgames/aether/common/world/chunk/PlacementFlagProvider.java
  8. +2
    -2
      src/main/java/com/gildedgames/aether/common/world/dungeon/util/Schematic.java

+ 3
- 3
build.properties View File

@@ -1,4 +1,4 @@
mod_version=1.10-r1
mod_version=1.10.2-r1

forge_version=1.10-12.18.0.1986-1.10.0
forge_mappings=snapshot_20160625
forge_version=1.10.2-12.18.0.2007-1.10.0
forge_mappings=snapshot_20160705

+ 1
- 1
modules/Gilded-Games-Util

@@ -1 +1 @@
Subproject commit f69df4074541102af4c3782e01bdf8d74347d00e
Subproject commit 47ad567bdce136be69078f3b8eab9ec7c907bc9f

+ 1
- 1
src/main/java/com/gildedgames/aether/common/CommonProxy.java View File

@@ -99,7 +99,7 @@ public class CommonProxy

MinecraftForge.EVENT_BUS.register(ItemsAether.skyroot_sword);

ChunkModule.api().registerHookFactory(this.placementFlagProvider);
ChunkModule.api().registerChunkHookProvider(this.placementFlagProvider);
}

public void postInit(FMLPostInitializationEvent event)


+ 2
- 2
src/main/java/com/gildedgames/aether/common/items/tools/ItemSkyrootTool.java View File

@@ -3,7 +3,7 @@ package com.gildedgames.aether.common.items.tools;
import com.gildedgames.aether.common.AetherCore;
import com.gildedgames.aether.common.blocks.util.ISkyrootMinable;
import com.gildedgames.util.modules.chunk.ChunkModule;
import com.gildedgames.util.modules.chunk.api.hook.BlockBitFlagChunkHook;
import com.gildedgames.util.modules.chunk.impl.hooks.BlockBitFlagChunkHook;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.EnchantmentHelper;
@@ -31,7 +31,7 @@ public class ItemSkyrootTool extends ItemAetherTool
{
BlockBitFlagChunkHook data = ChunkModule.api().getHook(world, pos, AetherCore.PROXY.getPlacementFlagProvider());

boolean wasPlaced = data.isMarked(pos.getX() & 15, pos.getY() & 15, pos.getZ() & 15);
boolean wasPlaced = data.isMarked(pos);

if (!wasPlaced && state.getBlock().isToolEffective(this.toolType.getToolClass(), state))
{


+ 0
- 2
src/main/java/com/gildedgames/aether/common/network/NetworkingAether.java View File

@@ -20,8 +20,6 @@ public class NetworkingAether
instance = NetworkRegistry.INSTANCE.newSimpleChannel(AetherCore.MOD_ID);

instance.registerMessage(AetherMovementPacket.Handler.class, AetherMovementPacket.class, discriminant++, Side.SERVER);

// TODO :)
}

public static void sendPacketToPlayer(IMessage message, EntityPlayerMP player)


+ 2
- 4
src/main/java/com/gildedgames/aether/common/player/PlayerAetherEvents.java View File

@@ -4,7 +4,7 @@ import com.gildedgames.aether.api.capabilites.AetherCapabilities;
import com.gildedgames.aether.api.player.IPlayerAetherCapability;
import com.gildedgames.aether.common.AetherCore;
import com.gildedgames.util.modules.chunk.ChunkModule;
import com.gildedgames.util.modules.chunk.api.hook.BlockBitFlagChunkHook;
import com.gildedgames.util.modules.chunk.impl.hooks.BlockBitFlagChunkHook;
import net.minecraft.nbt.NBTBase;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
@@ -118,11 +118,9 @@ public class PlayerAetherEvents
{
BlockBitFlagChunkHook data = ChunkModule.api().getHook(event.getWorld(), event.getPos(), AetherCore.PROXY.getPlacementFlagProvider());

int x = event.getPos().getX(), y = event.getPos().getY(), z = event.getPos().getZ();

if (data != null)
{
data.mark(x, y, z);
data.mark(event.getPos());
}
}
}

+ 4
- 8
src/main/java/com/gildedgames/aether/common/world/chunk/PlacementFlagProvider.java View File

@@ -1,21 +1,17 @@
package com.gildedgames.aether.common.world.chunk;

import com.gildedgames.aether.common.AetherCore;
import com.gildedgames.util.modules.chunk.api.hook.BlockBitFlagChunkHook;
import com.gildedgames.util.modules.chunk.impl.hooks.BlockBitFlagChunkHook;
import com.gildedgames.util.modules.chunk.api.hook.IChunkHookProvider;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraft.util.math.ChunkPos;

public class PlacementFlagProvider implements IChunkHookProvider<BlockBitFlagChunkHook>
{
@Override
public BlockBitFlagChunkHook createHook(World world, NBTTagCompound tag)
public BlockBitFlagChunkHook createHook(ChunkPos pos)
{
BlockBitFlagChunkHook data = new BlockBitFlagChunkHook();
data.read(tag);

return data;
return new BlockBitFlagChunkHook();
}

@Override


+ 2
- 2
src/main/java/com/gildedgames/aether/common/world/dungeon/util/Schematic.java View File

@@ -126,7 +126,7 @@ public class Schematic
tileEntityData.setInteger("y", blockData.y + location.getY());
tileEntityData.setInteger("z", blockData.z + location.getZ());

world.setTileEntity(new BlockPos(blockData.x + location.getX(), blockData.y + location.getY(), blockData.z + location.getZ()), TileEntity.func_190200_a(world, tileEntityData));
world.setTileEntity(new BlockPos(blockData.x + location.getX(), blockData.y + location.getY(), blockData.z + location.getZ()), TileEntity.create(world, tileEntityData));
}
}
}
@@ -176,7 +176,7 @@ public class Schematic
tileEntityData.setInteger("y", blockData.y + loc.getY());
tileEntityData.setInteger("z", blockData.z + loc.getZ());

world.setTileEntity(new BlockPos(blockData.x + loc.getX(), blockData.y + loc.getY(), blockData.z + loc.getZ()), TileEntity.func_190200_a(world, tileEntityData));
world.setTileEntity(new BlockPos(blockData.x + loc.getX(), blockData.y + loc.getY(), blockData.z + loc.getZ()), TileEntity.create(world, tileEntityData));
}
}
}


Loading…
Cancel
Save