mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
she ate 16 tons of coal and died </3
This commit is contained in:
parent
984338bd7d
commit
7c2e8e27cf
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=4543
|
||||
mod_build_number=4550
|
||||
|
||||
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
|
||||
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting),\
|
||||
|
||||
@ -5,6 +5,8 @@ import net.minecraft.world.World;
|
||||
|
||||
public interface IConveyorBelt {
|
||||
|
||||
/** Returns true if the item should stay on the conveyor, false if the item should drop off */
|
||||
public boolean canItemStay(World world, int x, int y, int z, Vec3 itemPos);
|
||||
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed);
|
||||
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos);
|
||||
}
|
||||
|
||||
@ -143,6 +143,7 @@ public class BlockLoot extends BlockContainer {
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
ItemStack stack = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("item" + i));
|
||||
if(stack == null || stack.getItem() == null) continue;
|
||||
double x = nbt.getDouble("x" + i);
|
||||
double y = nbt.getDouble("y" + i);
|
||||
double z = nbt.getDouble("z" + i);
|
||||
@ -158,6 +159,7 @@ public class BlockLoot extends BlockContainer {
|
||||
|
||||
for(int i = 0; i < items.size(); i++) {
|
||||
Quartet<ItemStack, Double, Double, Double> item = items.get(i);
|
||||
if(item == null || item.getW() == null) continue;
|
||||
NBTTagCompound stack = new NBTTagCompound();
|
||||
item.getW().writeToNBT(stack);
|
||||
nbt.setTag("item" + i, stack);
|
||||
|
||||
@ -2,16 +2,16 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry.EntityRegistration;
|
||||
import api.hbm.block.IToolable;
|
||||
import api.hbm.block.IToolable.ToolType;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@ -19,7 +19,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineFan extends BlockContainer {
|
||||
public class MachineFan extends BlockContainer implements IToolable {
|
||||
|
||||
public MachineFan() {
|
||||
super(Material.iron);
|
||||
@ -113,5 +113,29 @@ public class MachineFan extends BlockContainer {
|
||||
this.spin -= 360;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
if(tool != ToolType.SCREWDRIVER) return false;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(meta == 0) world.setBlockMetadataWithNotify(x, y, z, 1, 3);
|
||||
if(meta == 1) world.setBlockMetadataWithNotify(x, y, z, 0, 3);
|
||||
if(meta == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 3);
|
||||
if(meta == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 3);
|
||||
if(meta == 4) world.setBlockMetadataWithNotify(x, y, z, 5, 3);
|
||||
if(meta == 5) world.setBlockMetadataWithNotify(x, y, z, 4, 3);
|
||||
|
||||
//TileEntityFan fan = (TileEntityFan) world.getTileEntity(x, y, z);
|
||||
//fan.blockMetadata = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.tileentity.machine.TileEntityWatz;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Watz extends BlockDummyable {
|
||||
@ -25,7 +26,9 @@ public class Watz extends BlockDummyable {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
if(!world.isRemote) player.addChatComponentMessage(new ChatComponentText("Oh gee, I wonder if the nameless uncraftable thing that isn't even in the changelog works yet, maybe if I click often enough it will work!!"));
|
||||
return true;
|
||||
//return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -50,6 +50,11 @@ public abstract class BlockConveyorBase extends Block implements IConveyorBelt {
|
||||
return super.getIcon(side, metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canItemStay(World world, int x, int y, int z, Vec3 itemPos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||
|
||||
|
||||
@ -49,6 +49,11 @@ public class BlockConveyorClassic extends Block implements IConveyorBelt {
|
||||
return super.getIcon(side, metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canItemStay(World world, int x, int y, int z, Vec3 itemPos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||
|
||||
|
||||
@ -82,8 +82,9 @@ public abstract class EntityMovingConveyorObject extends Entity {
|
||||
int blockZ = (int) Math.floor(posZ);
|
||||
|
||||
Block b = worldObj.getBlock(blockX, blockY, blockZ);
|
||||
boolean isOnConveyor = b instanceof IConveyorBelt && ((IConveyorBelt) b).canItemStay(worldObj, blockX, blockY, blockZ, Vec3.createVectorHelper(posX, posY, posZ));
|
||||
|
||||
if(!(b instanceof IConveyorBelt)) {
|
||||
if(!isOnConveyor) {
|
||||
|
||||
if(onLeaveConveyor()) {
|
||||
return;
|
||||
|
||||
@ -6659,8 +6659,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(rbmk_pellet_zfb_am_mix, rbmk_pellet_zfb_am_mix.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rbmk_pellet_drx, rbmk_pellet_drx.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(watz_pellet, watz_pellet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(watz_pellet_depleted, watz_pellet_depleted.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(watz_pellet, watz_pellet.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(watz_pellet_depleted, watz_pellet_depleted.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(debris_graphite, debris_graphite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(debris_metal, debris_metal.getUnlocalizedName());
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4543H1)";
|
||||
public static final String VERSION = "1.0.27 BETA (4550)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -2,7 +2,9 @@ package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.render.util.BeamPronter;
|
||||
import com.hbm.render.util.BeamPronter.EnumBeamType;
|
||||
import com.hbm.render.util.BeamPronter.EnumWaveType;
|
||||
@ -12,10 +14,13 @@ import com.hbm.tileentity.machine.TileEntityCoreReceiver;
|
||||
import com.hbm.tileentity.machine.TileEntityCoreStabilizer;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderCoreComponent extends TileEntitySpecialRenderer {
|
||||
public class RenderCoreComponent extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
public RenderCoreComponent() { }
|
||||
|
||||
@ -104,4 +109,46 @@ public class RenderCoreComponent extends TileEntitySpecialRenderer {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() { return null; }
|
||||
|
||||
@Override
|
||||
public Item[] getItemsForRenderer() {
|
||||
return new Item[] {
|
||||
Item.getItemFromBlock(ModBlocks.dfc_emitter),
|
||||
Item.getItemFromBlock(ModBlocks.dfc_receiver),
|
||||
Item.getItemFromBlock(ModBlocks.dfc_injector),
|
||||
Item.getItemFromBlock(ModBlocks.dfc_stabilizer)
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2.5, 0);
|
||||
double scale = 5;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack item) {
|
||||
GL11.glScaled(2, 2, 2);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
if(item.getItem() == Item.getItemFromBlock(ModBlocks.dfc_emitter)) {
|
||||
bindTexture(ResourceManager.dfc_emitter_tex);
|
||||
ResourceManager.dfc_emitter.renderAll();
|
||||
}
|
||||
if(item.getItem() == Item.getItemFromBlock(ModBlocks.dfc_receiver)) {
|
||||
bindTexture(ResourceManager.dfc_receiver_tex);
|
||||
ResourceManager.dfc_receiver.renderAll();
|
||||
}
|
||||
if(item.getItem() == Item.getItemFromBlock(ModBlocks.dfc_injector)) {
|
||||
bindTexture(ResourceManager.dfc_injector_tex);
|
||||
ResourceManager.dfc_injector.renderAll();
|
||||
}
|
||||
if(item.getItem() == Item.getItemFromBlock(ModBlocks.dfc_stabilizer)) {
|
||||
bindTexture(ResourceManager.dfc_stabilizer_tex);
|
||||
ResourceManager.dfc_injector.renderAll();
|
||||
}
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user