mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-25 22:54:40 +00:00
Implement metal blocks and clean up some unloc names
This commit is contained in:
1 parent
42237f0be8
commit
9a05bc03a9
12 files changed
+986
-849
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
/**
|
||||
@@ -7,6 +8,14 @@ import net.minecraft.world.IBlockAccess;
|
||||
*/
|
||||
public class BlockBeaconBase extends BlockCarvable {
|
||||
|
||||
public BlockBeaconBase() {
|
||||
super();
|
||||
}
|
||||
|
||||
public BlockBeaconBase(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) {
|
||||
return true;
|
||||
|
||||
@@ -5,6 +5,9 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -165,6 +168,18 @@ public class TileEntityPresent extends TileEntity implements IInventory {
|
||||
}
|
||||
autoSearch = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeToNBT(tag);
|
||||
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
|
||||
readFromNBT(packet.func_148857_g());
|
||||
}
|
||||
|
||||
/* IInventory */
|
||||
|
||||
@@ -188,6 +203,7 @@ public class TileEntityPresent extends TileEntity implements IInventory {
|
||||
ItemStack[] inv = inventory;
|
||||
if (isConnected() && slot >= inventory.length) {
|
||||
inv = connection.inventory;
|
||||
slot %= inventory.length;
|
||||
}
|
||||
|
||||
if (inv[slot] != null)
|
||||
|
||||
Reference in new issue
Block a user