trench warfare special

This commit is contained in:
Boblet 2025-05-06 16:42:11 +02:00
parent af8cc78ad5
commit b508f2f534
24 changed files with 378 additions and 15 deletions

View File

@ -1,7 +1,17 @@
## Added
* Sandbags
* Connect to other sandbags or solid blocks
* Pretts
* Wooden barrier
* Pretty
* Automatically walls off connected solid blocks in addition to the direction it was placed in
## Changed
* Increased bayonet damage from 5 to 7.5 hearts
* Two numeric redstone over radio signals sent over the same channel will now be added together instead of one signal replacing the other
* This means that reading the fill state of multiple batteries over the same channel should result the combined fill state of all batteries
* Halved base spread of the .22 SMG
* Certain secret guns now have a proper way of being obtained
## Fixed
* Fixed RoR controller having the wrong recipe

View File

@ -279,6 +279,9 @@ public class ModBlocks {
public static Block asphalt;
public static Block asphalt_light;
public static Block sandbags;
public static Block wood_barrier;
public static Block reinforced_brick;
public static Block reinforced_ducrete;
public static Block reinforced_glass;
@ -1476,6 +1479,9 @@ public class ModBlocks {
gravel_diamond = new BlockFalling(Material.sand).setBlockName("gravel_diamond").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGravel).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":gravel_diamond");
asphalt = new BlockSpeedy(Material.rock, 1.5).setBlockName("asphalt").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(120.0F).setBlockTextureName(RefStrings.MODID + ":asphalt");
asphalt_light = new BlockSpeedy(Material.rock, 1.5).setBlockName("asphalt_light").setCreativeTab(MainRegistry.blockTab).setLightLevel(1F).setHardness(15.0F).setResistance(120.0F).setBlockTextureName(RefStrings.MODID + ":asphalt_light");
sandbags = new BlockSandbags(Material.ground).setBlockName("sandbags").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(30.0F).setBlockTextureName(RefStrings.MODID + ":sandbags");
wood_barrier = new BlockBarrier(Material.wood).setStepSound(Block.soundTypeWood).setBlockName("wood_barrier").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(30.0F).setBlockTextureName(RefStrings.MODID + ":wood_barrier");
reinforced_brick = new BlockGeneric(Material.rock).setBlockName("reinforced_brick").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(300.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_brick");
reinforced_glass = new BlockNTMGlassCT(0, RefStrings.MODID + ":reinforced_glass", Material.rock).setBlockName("reinforced_glass").setCreativeTab(MainRegistry.blockTab).setLightOpacity(0).setHardness(2.0F).setResistance(25.0F);
@ -2654,6 +2660,8 @@ public class ModBlocks {
GameRegistry.registerBlock(floodlight_beam, floodlight_beam.getUnlocalizedName());
//Reinforced Blocks
register(sandbags);
register(wood_barrier);
GameRegistry.registerBlock(asphalt, ItemBlockBlastInfo.class, asphalt.getUnlocalizedName());
GameRegistry.registerBlock(asphalt_light, ItemBlockBlastInfo.class, asphalt_light.getUnlocalizedName());
GameRegistry.registerBlock(reinforced_brick, ItemBlockBlastInfo.class, reinforced_brick.getUnlocalizedName());

View File

@ -0,0 +1,159 @@
package com.hbm.blocks.generic;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.Library;
import com.hbm.render.block.ISBRHUniversal;
import com.hbm.render.util.RenderBlocksNT;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockBarrier extends Block implements ISBRHUniversal {
public BlockBarrier(Material mat) {
super(mat);
}
@Override public int getRenderType() { return renderID; }
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
int meta = world.getBlockMetadata(x, y, z);
setBlockBounds(0, 0, 0, 1, 1, 1);
/*Block nx = world.getBlock(x - 1, y, z);
Block px = world.getBlock(x + 1, y, z);
Block nz = world.getBlock(x, y, z - 1);
Block pz = world.getBlock(x, y, z + 1);
int count = 0;
if(nx.isOpaqueCube() || nx.isNormalCube() || meta == Library.POS_X.ordinal()) count++;
if(nz.isOpaqueCube() || nz.isNormalCube() || meta == Library.POS_Z.ordinal()) count++;
if(px.isOpaqueCube() || px.isNormalCube() || meta == Library.NEG_X.ordinal()) count++;
if(pz.isOpaqueCube() || pz.isNormalCube() || meta == Library.NEG_Z.ordinal()) count++;
if(count > 1) return;*/
if(meta == Library.POS_X.ordinal()) setBlockBounds(0, 0, 0, 0.125F, 1, 1);
if(meta == Library.POS_Z.ordinal()) setBlockBounds(0, 0, 0, 1, 1, 0.125F);
if(meta == Library.NEG_X.ordinal()) setBlockBounds(0.875F, 0, 0, 1, 1, 1);
if(meta == Library.NEG_Z.ordinal()) setBlockBounds(0, 0, 0.875F, 1, 1, 1);
}
@Override
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list, Entity collider) {
int meta = world.getBlockMetadata(x, y, z);
List<AxisAlignedBB> bbs = new ArrayList();
Block nx = world.getBlock(x - 1, y, z);
Block px = world.getBlock(x + 1, y, z);
Block nz = world.getBlock(x, y, z - 1);
Block pz = world.getBlock(x, y, z + 1);
if(nx.isOpaqueCube() || nx.isNormalCube() || meta == Library.POS_X.ordinal()) bbs.add(AxisAlignedBB.getBoundingBox(x, y, z, x + 0.125, y + 1, z + 1));
if(nz.isOpaqueCube() || nz.isNormalCube() || meta == Library.POS_Z.ordinal()) bbs.add(AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 0.125));
if(px.isOpaqueCube() || px.isNormalCube() || meta == Library.NEG_X.ordinal()) bbs.add(AxisAlignedBB.getBoundingBox(x + 0.875, y, z, x + 1, y + 1, z + 1));
if(pz.isOpaqueCube() || pz.isNormalCube() || meta == Library.NEG_Z.ordinal()) bbs.add(AxisAlignedBB.getBoundingBox(x, y, z + 0.875, x + 1, y + 1, z + 1));
for(AxisAlignedBB bb : bbs) {
if(aabb.intersectsWith(bb)) {
list.add(bb);
}
}
}
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
return true;
}
@Override
public void renderInventoryBlock(Block block, int meta, int modelId, Object renderBlocks) {
GL11.glPushMatrix();
RenderBlocks renderer = (RenderBlocks) renderBlocks;
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
renderer.setRenderBounds(0.4375, 0D, 0.4375D, 0.5625D, 1D, 0.5625D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.5D, 0.0625D, 0D, 0.5625D, 0.4725, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.5D, 0.5625D, 0D, 0.5625D, 0.9375, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, Object renderBlocks) {
RenderBlocksNT renderer = RenderBlocksNT.INSTANCE.setWorld(world);
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
tessellator.setColorOpaque_F(1, 1, 1);
int meta = world.getBlockMetadata(x, y, z);
Block nx = world.getBlock(x - 1, y, z);
Block px = world.getBlock(x + 1, y, z);
Block nz = world.getBlock(x, y, z - 1);
Block pz = world.getBlock(x, y, z + 1);
boolean negX = nx.isOpaqueCube() || nx.isNormalCube() || meta == Library.POS_X.ordinal();
boolean negZ = nz.isOpaqueCube() || nz.isNormalCube() || meta == Library.POS_Z.ordinal();
boolean posX = px.isOpaqueCube() || px.isNormalCube() || meta == Library.NEG_X.ordinal();
boolean posZ = pz.isOpaqueCube() || pz.isNormalCube() || meta == Library.NEG_Z.ordinal();
if(negX) {
renderer.setRenderBounds(0D, 0D, 0.4375D, 0.125D, 1D, 0.5625D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0D, 0.0625D, negZ ? 0.125D : 0D, 0.0625D, 0.4375D, posZ ? 0.875D : 1D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0D, 0.5625D, negZ ? 0.125D : 0D, 0.0625D, 0.9375D, posZ ? 0.875D : 1D); renderer.renderStandardBlock(block, x, y, z);
}
if(negZ) {
renderer.setRenderBounds(0.4375D, 0D, 0D, 0.5625D, 1D, 0.125D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(negX ? 0.125D : 0D, 0.0625D, 0D, posX ? 0.875D : 1D, 0.4375D, 0.0625D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(negX ? 0.125D : 0D, 0.5625D, 0D, posX ? 0.875D : 1D, 0.9375D, 0.0625D); renderer.renderStandardBlock(block, x, y, z);
}
if(posX) {
renderer.setRenderBounds(0.875D, 0D, 0.4375D, 1D, 1D, 0.5625D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.9375D, 0.0625D, negZ ? 0.125D : 0D, 1D, 0.4375D, posZ ? 0.875D : 1D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.9375D, 0.5625D, negZ ? 0.125D : 0D, 1D, 0.9375D, posZ ? 0.875D : 1D); renderer.renderStandardBlock(block, x, y, z);
}
if(posZ) {
renderer.setRenderBounds(0.4375D, 0D, 0.875D, 0.5625D, 1D, 1D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(negX ? 0.125D : 0D, 0.0625D, 0.9375D, posX ? 0.875D : 1D, 0.4375D, 1D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(negX ? 0.125D : 0D, 0.5625D, 0.9375D, posX ? 0.875D : 1D, 0.9375D, 1D); renderer.renderStandardBlock(block, x, y, z);
}
return true;
}
}

View File

@ -0,0 +1,84 @@
package com.hbm.blocks.generic;
import org.lwjgl.opengl.GL11;
import com.hbm.render.block.ISBRHUniversal;
import com.hbm.render.util.RenderBlocksNT;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockSandbags extends Block implements ISBRHUniversal {
public BlockSandbags(Material mat) {
super(mat);
}
@Override public int getRenderType() { return renderID; }
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
setBlockBoundsBasedOnState(world, x, y, z);
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
@Override
@SideOnly(Side.CLIENT)
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
setBlockBoundsBasedOnState(world, x, y, z);
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
float min = 0.25F;
float max = 0.75F;
Block nx = world.getBlock(x - 1, y, z);
Block px = world.getBlock(x + 1, y, z);
Block nz = world.getBlock(x, y, z - 1);
Block pz = world.getBlock(x, y, z + 1);
float minX = (nx.isOpaqueCube() || nx.isNormalCube() || nx == this) ? 0F : min;
float minZ = (nz.isOpaqueCube() || nz.isNormalCube() || nz == this) ? 0F : min;
float maxX = (px.isOpaqueCube() || px.isNormalCube() || px == this) ? 1F : max;
float maxZ = (pz.isOpaqueCube() || pz.isNormalCube() || pz == this) ? 1F : max;
this.setBlockBounds(minX, 0, minZ, maxX, 1, maxZ);
}
@Override
public void renderInventoryBlock(Block block, int meta, int modelId, Object renderBlocks) {
GL11.glPushMatrix();
RenderBlocks renderer = (RenderBlocks) renderBlocks;
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
renderer.setRenderBounds(0.125D, 0D, 0.125D, 0.875D, 1D, 0.875D);
RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, Object renderBlocks) {
RenderBlocksNT renderer = RenderBlocksNT.INSTANCE.setWorld(world);
renderer.setRenderBoundsFromBlock(block);
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
tessellator.setColorOpaque_F(1, 1, 1);
renderer.renderStandardBlock(block, x, y, z);
return true;
}
}

View File

@ -3,7 +3,6 @@ package com.hbm.blocks.generic;
import java.util.function.Consumer;
import java.util.function.Function;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
import com.hbm.entity.mob.EntityUndeadSoldier;
import com.hbm.items.ItemEnums.EnumSecretType;
@ -13,10 +12,12 @@ import com.hbm.util.Vec3NT;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
public class DungeonSpawner extends BlockContainer {
@ -34,7 +35,7 @@ public class DungeonSpawner extends BlockContainer {
public int phase = 0;
public int timer = 0;
public EnumSpawnerType type = EnumSpawnerType.NONE;
public EnumSpawnerType type = EnumSpawnerType.ABERRATOR;
@Override
public void updateEntity() {
@ -67,7 +68,7 @@ public class DungeonSpawner extends BlockContainer {
public static enum EnumSpawnerType {
NONE(CON_TEST, PHASE_TEST);
ABERRATOR(CON_ABERRATOR, PHASE_ABERRATOR);
public Function<TileEntityDungeonSpawner, Boolean> phaseCondition;
public Consumer<TileEntityDungeonSpawner> phase;
@ -78,23 +79,23 @@ public class DungeonSpawner extends BlockContainer {
}
}
public static Function<TileEntityDungeonSpawner, Boolean> CON_TEST = (tile) -> {
public static Function<TileEntityDungeonSpawner, Boolean> CON_ABERRATOR = (tile) -> {
World world = tile.getWorldObj();
int x = tile.xCoord;
int y = tile.yCoord;
int z = tile.zCoord;
if(tile.phase == 0) {
if(world.getTotalWorldTime() % 20 != 0) return false;
//return !world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(20, 10, 20)).isEmpty();
return !world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y - 2, z + 1).expand(20, 10, 20)).isEmpty();
}
if(tile.phase < 3) {
if(world.getTotalWorldTime() % 20 != 0 || tile.timer < 60) return false;
//return world.getEntitiesWithinAABB(EntityUndeadSoldier.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(50, 20, 50)).isEmpty();
return world.getEntitiesWithinAABB(EntityUndeadSoldier.class, AxisAlignedBB.getBoundingBox(x, y, z, x - 2, y + 1, z + 1).expand(50, 20, 50)).isEmpty();
}
return false;
};
public static Consumer<TileEntityDungeonSpawner> PHASE_TEST = (tile) -> {
public static Consumer<TileEntityDungeonSpawner> PHASE_ABERRATOR = (tile) -> {
World world = tile.getWorldObj();
int x = tile.xCoord;
int y = tile.yCoord;
@ -104,21 +105,26 @@ public class DungeonSpawner extends BlockContainer {
Vec3NT vec = new Vec3NT(10, 0, 0);
for(int i = 0; i < 10; i++) {
EntityUndeadSoldier mob = new EntityUndeadSoldier(world);
mob.setPositionAndRotation(x + 0.5 + vec.xCoord, y, z + 0.5 + vec.zCoord, i * 36F, 0);
for(int j = 0; j < 7; j++) {
mob.setPositionAndRotation(x + 0.5 + vec.xCoord, y - 5, z + 0.5 + vec.zCoord, i * 36F, 0);
if(mob.getCanSpawnHere()) {
mob.onSpawnWithEgg(null);
world.spawnEntityInWorld(mob);
break;
}
}
vec.rotateAroundYDeg(36D);
mob.onSpawnWithEgg(null);
world.spawnEntityInWorld(mob);
}
}
}
if(tile.phase > 2) {
world.setBlock(x, y + 1, z, ModBlocks.skeleton_holder, 2 + world.rand.nextInt(4), 3);
TileEntity te = world.getTileEntity(x, y + 1, z);
TileEntity te = world.getTileEntity(x, y + 18, z);
if(te instanceof TileEntitySkeletonHolder) {
TileEntitySkeletonHolder skeleton = (TileEntitySkeletonHolder) te;
skeleton.item = new ItemStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR.ordinal());
skeleton.markDirty();
world.markBlockForUpdate(x, y, z);
world.markBlockForUpdate(x, y + 18, z);
}
world.setBlock(x, y, z, Blocks.obsidian);
}

View File

@ -48,7 +48,7 @@ public class XFactory22lr {
ModItems.gun_am180 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(177 * 25).draw(15).inspect(38).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
.dmg(2F).delay(1).dry(10).auto(true).spread(0.02F).reload(66).jam(30).sound("hbm:weapon.fire.greaseGun", 1.0F, 1.0F)
.dmg(2F).delay(1).dry(10).auto(true).spread(0.01F).reload(66).jam(30).sound("hbm:weapon.fire.greaseGun", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 177).addConfigs(p22_sp, p22_fmj, p22_jhp, p22_ap))
.offset(1, -0.0625 * 1.5, -0.1875D)
.setupStandardFire().recoil(LAMBDA_RECOIL_AM180))

View File

@ -767,6 +767,9 @@ public class ClientProxy extends ServerProxy {
@Override
public void registerBlockRenderer() {
RenderingRegistry.registerBlockHandler(new RenderISBRHUniversal());
/// STOP DOING THIS ///
RenderingRegistry.registerBlockHandler(new RenderScaffoldBlock());
RenderingRegistry.registerBlockHandler(new RenderTapeBlock());
RenderingRegistry.registerBlockHandler(new RenderSteelBeam());

View File

@ -441,6 +441,8 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.barbed_wire_wither, 8), new Object[] { "BBB", "BIB", "BBB", 'B', ModBlocks.barbed_wire, 'I', new ItemStack(Items.skull, 1, 1) });
addRecipeAuto(new ItemStack(ModBlocks.barbed_wire_ultradeath, 4), new Object[] { "BCB", "CIC", "BCB", 'B', ModBlocks.barbed_wire, 'C', ModItems.powder_yellowcake, 'I', ModItems.nuclear_waste });
addShapelessAuto(new ItemStack(ModBlocks.sandbags, 4), new Object[] { ModItems.plate_polymer, KEY_SAND, KEY_SAND, KEY_SAND });
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.tape_recorder), 4), new Object[] { "TST", "SSS", 'T', W.ingot(), 'S', STEEL.ingot() });
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_poles), 16), new Object[] { "S S", "SSS", "S S", 'S', STEEL.ingot() });
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.pole_top), 1), new Object[] { "T T", "TRT", "BBB", 'T', W.ingot(), 'B', BE.ingot(), 'R', MINGRADE.ingot() });

View File

@ -62,6 +62,8 @@ public class StructureManager {
public static final NBTStructure lighthouse = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/lighthouse.nbt"));
public static final NBTStructure dish = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/dish.nbt"));
public static final NBTStructure spire = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/spire.nbt"));
// public static final NBTStructure test_rot = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-rot.nbt"));
// public static final NBTStructure test_jigsaw = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-jigsaw.nbt"));
// public static final NBTStructure test_jigsaw_core = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-jigsaw-core.nbt"));

View File

@ -0,0 +1,13 @@
package com.hbm.render.block;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.Block;
import net.minecraft.world.IBlockAccess;
public interface ISBRHUniversal {
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
public void renderInventoryBlock(Block block, int metadata, int modelId, Object renderBlocks);
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, Object renderBlocks);
}

View File

@ -0,0 +1,29 @@
package com.hbm.render.block;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
public class RenderISBRHUniversal implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
((ISBRHUniversal) block).renderInventoryBlock(block, metadata, modelId, renderer);
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
return ((ISBRHUniversal) block).renderWorldBlock(world, x, y, z, block, modelId, renderer);
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
return true;
}
@Override
public int getRenderId() {
return ISBRHUniversal.renderID;
}
}

View File

@ -25,6 +25,37 @@ public class RenderBlocksNT extends RenderBlocks {
return this;
}
public static void renderStandardInventoryBlock(Block block, int meta, RenderBlocks renderer) {
Tessellator tessellator = Tessellator.instance;
tessellator.setColorOpaque_F(1, 1, 1);
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, -1.0F, 0.0F);
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 0.0F, -1.0F);
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 0.0F, 1.0F);
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(1.0F, 0.0F, 0.0F);
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, meta));
tessellator.draw();
}
@Override
public void renderFaceZNeg(Block block, double x, double y, double z, IIcon icon) {
Tessellator tessellator = Tessellator.instance;

View File

@ -40,6 +40,13 @@ public class NTMWorldGenerator implements IWorldGenerator {
final List<BiomeGenBase> beachBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach });
final List<BiomeGenBase> lighthouseBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean, BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach });
/// SPIRE ///
NBTStructure.registerStructure(0, new SpawnCondition() {{
canSpawn = biome -> biome.heightVariation <= 0.05F && !invalidBiomes.contains(biome);
structure = new JigsawPiece("spire", StructureManager.spire, -1);
spawnWeight = 2;
}});
NBTStructure.registerStructure(0, new SpawnCondition() {{
canSpawn = biome -> !invalidBiomes.contains(biome);
start = d -> new MapGenNTMFeatures.Start(d.getW(), d.getX(), d.getY(), d.getZ());
@ -177,7 +184,7 @@ public class NTMWorldGenerator implements IWorldGenerator {
add(new JigsawPiece("meteor_dragon_tesla", StructureManager.meteor_dragon_tesla) {{ blockTable = crates; }}, 1);
add(new JigsawPiece("meteor_dragon_trap", StructureManager.meteor_dragon_trap) {{ blockTable = crates; }}, 1);
add(new JigsawPiece("meteor_dragon_crate_crab", StructureManager.meteor_dragon_crate_crab) {{ blockTable = crates; }}, 1);
fallback = "headback";
fallback = "headback";
}});
put("fallback", new JigsawPool() {{
add(new JigsawPiece("meteor_fallback", StructureManager.meteor_fallback) {{ blockTable = bricks; }}, 1);

View File

@ -9,6 +9,7 @@ import com.hbm.inventory.RecipesCommon.MetaBlock;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@Deprecated
public class CellularDungeon {
//a buffer "map" of the rooms being generated before being spawned in

View File

@ -2,6 +2,7 @@ package com.hbm.world.generator;
import com.hbm.world.generator.room.*;
@Deprecated
public class CellularDungeonFactory {
public static CellularDungeon jungle;

View File

@ -6,6 +6,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@Deprecated
public class CellularDungeonRoom {
protected CellularDungeon parent;

View File

@ -11,6 +11,7 @@ import com.hbm.world.generator.TimedGenerator.ITimedJob;
import net.minecraft.world.World;
@Deprecated
@NotableComments
public class JungleDungeon extends CellularDungeon {

View File

@ -7,6 +7,7 @@ import com.hbm.interfaces.Spaghetti;
import net.minecraft.world.World;
@Deprecated
@Spaghetti("this class should be destroyed")
public class TimedGenerator {

View File

@ -4743,6 +4743,7 @@ tile.sand_lead.name=Bleisand
tile.sand_polonium.name=Poloniumsand
tile.sand_quartz.name=Quarzsand
tile.sand_uranium.name=Uransand
tile.sandbags.name=Sandsäcke
tile.sat_dock.name=Frachtlandeplattform
tile.sat_foeq.name=PEAF - Mk.I FOEQ Dunasonde mit experimenter nuklearer Schubdüse (Dekoblock)
tile.sat_laser.name=Orbitaler Todesstrahl (Dekoblock)
@ -4875,6 +4876,7 @@ tile.watz_end.name=Watz-Stabilitätselement
tile.watz_end_bolted.name=Watz-Stabilitätselement (Genietet)
tile.watz_hatch.name=Watzreaktorzugriffsluke
tile.watz_pump.name=Watz-Druckpumpe
tile.wood_barrier.name=Holzbarriere
tile.yellow_barrel.name=Radioaktives Fass
tile.zirnox_destroyed.name=Zerstörter ZINOX

View File

@ -5898,6 +5898,7 @@ tile.sand_lead.name=Lead Sand
tile.sand_polonium.name=Polonium Sand
tile.sand_quartz.name=Quartz Sand
tile.sand_uranium.name=Uranium Sand
tile.sandbags.name=Sandbags
tile.sat_dock.name=Cargo Landing Pad
tile.sat_foeq.name=PEAF - Mk.I FOEQ Duna Probe with experimental Nuclear Propulsion (Deco Block)
tile.sat_laser.name=Orbital Death Ray (Deco Block)
@ -6037,6 +6038,7 @@ tile.watz_end.name=Watz Reactor Stability Element
tile.watz_end_bolted.name=Watz Reactor Stability Element (Riveted)
tile.watz_hatch.name=Watz Reactor Access Hatch
tile.watz_pump.name=Watz Pressure Pump
tile.wood_barrier.name=Wooden Barrier
tile.yellow_barrel.name=Radioactive Barrel
tile.zirnox_destroyed.name=Destroyed ZIRNOX

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B