Skip to content

Commit

Permalink
*pipe falling sound effect*
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed Sep 17, 2024
1 parent c3bc6c6 commit 3a81e79
Show file tree
Hide file tree
Showing 215 changed files with 1,082 additions and 1,440 deletions.
21 changes: 13 additions & 8 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
## Changed
* Pyrolysis recipes have been added
* Bedrock ores can be roasted at much higher speeds
* Pyrolysis ovens can now turn 4,000mB of coker gas into 500mB refgas
* Hydrogen + coal can be turned into heavy oil, heavy oil + coal turns into coalgas directly
* The CCGT startup and shutdown sounds are now affected by mufflers
* Armor battery packs now have recipes
* The ambient radiation generator's functionality and recipe have been disabled as it is being deprecated
* The pyrolysis oven is now compatible with overdrive upgrades
* Steel walls and corners no longer use TESRs for rendering, making them more performant at large scale and fixing any oddities regarding their rendering
* Steel walls and corners can now be rotated using the screwdriver (right click for clockwise, shift click for counter-clockwise)
* Steel walls and corners now use new textures as well as slightly cleaner models
* Steel corner bounding boxes now closely match their model

## Fixed
* Crash caused by new system gun init on servers
* Fixed chemfac output slots not being marked as outputs, not granting achievements and allowing items to be inserted
* Fixed crash caused by the pyrolysis oven on servers
* Due this type of issue happening constantly, the GUI provider system no longer uses any client-only code
* Fixed small black bar rendering under the arrow box of NEI universal handlers when using the NH NEI fork
* Fixed desh screwdrivers not being usable for picking locks
* Possibly fixed an issue caused by MouseTweaks (in combination with other mods) duplicating click input (I can't replicate the issue so I can at best guess)
* Fixed pyrolysis ovens not being able to operate due to the output buffer being full, despite the buffer being a different type
* Fixed a vanilla bug in the standard block renderer causing boxduct bends to have incorrect UV on the -Z and +X sides
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5090
mod_build_number=5091

credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/blocks/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ private static void initializeBlock() {
pole_top = new DecoPoleTop(Material.iron).setBlockName("pole_top").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_pole_top");
pole_satellite_receiver = new DecoPoleSatelliteReceiver(Material.iron).setBlockName("pole_satellite_receiver").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_satellite_receiver");
steel_wall = new DecoBlock(Material.iron).setBlockName("steel_wall").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_wall");
steel_corner = new DecoBlock(Material.iron).setBlockName("steel_corner").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_corner");
steel_corner = new DecoBlock(Material.iron).setBlockName("steel_corner").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_wall");
steel_roof = new DecoBlock(Material.iron).setBlockName("steel_roof").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_roof");
steel_beam = new DecoBlock(Material.iron).setBlockName("steel_beam").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_beam");
steel_scaffold = new BlockScaffold().setBlockName("steel_scaffold").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_steel_orig");
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/hbm/blocks/generic/BlockBobble.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
Expand Down Expand Up @@ -227,7 +226,7 @@ public Container provideContainer(int ID, EntityPlayer player, World world, int

@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIScreenBobble((TileEntityBobble) world.getTileEntity(x, y, z));
}
}
3 changes: 1 addition & 2 deletions src/main/java/com/hbm/blocks/generic/BlockSnowglobe.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
Expand Down Expand Up @@ -193,7 +192,7 @@ public Container provideContainer(int ID, EntityPlayer player, World world, int

@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIScreenSnowglobe((TileEntitySnowglobe) world.getTileEntity(x, y, z));
}
}
169 changes: 81 additions & 88 deletions src/main/java/com/hbm/blocks/generic/DecoBlock.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
package com.hbm.blocks.generic;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

import com.hbm.blocks.ModBlocks;
import com.hbm.tileentity.deco.TileEntityDecoBlock;

import api.hbm.block.IToolable;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
Expand All @@ -17,28 +22,52 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

public class DecoBlock extends BlockContainer {
public class DecoBlock extends BlockContainer implements IToolable {

Random rand = new Random();

public DecoBlock(Material p_i45386_1_) {
super(p_i45386_1_);
}

@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;
if(this != ModBlocks.steel_wall && this != ModBlocks.steel_corner) return false;

int meta = world.getBlockMetadata(x, y, z);

if(!player.isSneaking()) {
if(meta == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 3);
else if(meta == 4) world.setBlockMetadataWithNotify(x, y, z, 2, 3);
else if(meta == 2) world.setBlockMetadataWithNotify(x, y, z, 5, 3);
else if(meta == 5) world.setBlockMetadataWithNotify(x, y, z, 3, 3);
} else {
if(meta == 3) world.setBlockMetadataWithNotify(x, y, z, 5, 3);
else if(meta == 4) world.setBlockMetadataWithNotify(x, y, z, 3, 3);
else if(meta == 2) world.setBlockMetadataWithNotify(x, y, z, 4, 3);
else if(meta == 5) world.setBlockMetadataWithNotify(x, y, z, 2, 3);
}

return true;
}

@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
if(this == ModBlocks.steel_scaffold || this == ModBlocks.steel_beam) return null;
if(this == ModBlocks.steel_scaffold || this == ModBlocks.steel_beam || this == ModBlocks.steel_wall || this == ModBlocks.steel_corner) return null;
return new TileEntityDecoBlock();
}

public static int renderIDBeam = RenderingRegistry.getNextAvailableRenderId();
public static int renderIDWall = RenderingRegistry.getNextAvailableRenderId();
public static int renderIDCorner = RenderingRegistry.getNextAvailableRenderId();

@Override
public int getRenderType(){
if(this == ModBlocks.steel_beam)
return renderIDBeam;
else
return -1;
if(this == ModBlocks.steel_wall) return renderIDWall;
if(this == ModBlocks.steel_corner) return renderIDCorner;
if(this == ModBlocks.steel_beam) return renderIDBeam;
return -1;
}

@Override
Expand All @@ -60,39 +89,23 @@ public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
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, 3, 2);
}
if(i == 1) {
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
if(i == 2) {
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
if(i == 3) {
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}

@Override
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_);
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
int te = world.getBlockMetadata(x, y, z);
float f = 0.0625F;

if(this == ModBlocks.steel_wall) {
switch(te) {
case 4:
this.setBlockBounds(14 * f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
break;
case 2:
this.setBlockBounds(0.0F, 0.0F, 14 * f, 1.0F, 1.0F, 1.0F);
break;
case 5:
this.setBlockBounds(0.0F, 0.0F, 0.0F, 2 * f, 1.0F, 1.0F);
break;
case 3:
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2 * f);
break;
case 4: this.setBlockBounds(14 * f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); break;
case 2: this.setBlockBounds(0.0F, 0.0F, 14 * f, 1.0F, 1.0F, 1.0F); break;
case 5: this.setBlockBounds(0.0F, 0.0F, 0.0F, 2 * f, 1.0F, 1.0F); break;
case 3: this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2 * f); break;
}
}

Expand All @@ -111,77 +124,57 @@ public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_
if(this == ModBlocks.steel_scaffold) {
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
switch(te) {
case 4:
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
break;
case 2:
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
break;
case 5:
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
break;
case 3:
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
break;
case 4: this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F); break;
case 2: this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f); break;
case 5: this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F); break;
case 3: this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f); break;
}
}

// this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}

@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {

int te = world.getBlockMetadata(x, y, z);
float f = 0.0625F;

if(this == ModBlocks.steel_wall) {
switch(te) {
case 4:
this.setBlockBounds(14 * f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
break;
this.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 addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list, Entity collider) {

if(this == ModBlocks.steel_corner) {
int meta = world.getBlockMetadata(x, y, z);
List<AxisAlignedBB> bbs = new ArrayList();

switch(meta) {
case 2:
this.setBlockBounds(0.0F, 0.0F, 14 * f, 1.0F, 1.0F, 1.0F);
break;
case 5:
this.setBlockBounds(0.0F, 0.0F, 0.0F, 2 * f, 1.0F, 1.0F);
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.25D, y + 0D, z + 0.875D, x + 1D, y + 1D, z + 1D));
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0.75D, x + 0.25D, y + 1D, z + 1D));
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0D, x + 0.125D, y + 1D, z + 0.75D));
break;
case 3:
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 2 * f);
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0D, x + 0.75D, y + 1D, z + 0.125D));
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.75D, y + 0D, z + 0D, x + 1D, y + 1D, z + 0.25D));
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.875D, y + 0D, z + 0.25D, x + 1D, y + 1D, z + 1D));
break;
}
}

if(this == ModBlocks.steel_corner) {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}

if(this == ModBlocks.steel_roof) {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1 * f, 1.0F);
}

if(this == ModBlocks.steel_beam) {
this.setBlockBounds(7 * f, 0.0F, 7 * f, 9 * f, 1.0F, 9 * f);
}

if(this == ModBlocks.steel_scaffold) {
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
switch(te) {
case 4:
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
break;
case 2:
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.875D, y + 0D, z + 0D, x + 1D, y + 1D, z + 0.75D));
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.75D, y + 0D, z + 0.75D, x + 1D, y + 1D, z + 1D));
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0.875D, x + 0.75D, y + 1D, z + 1D));
break;
case 5:
this.setBlockBounds(2 * f, 0.0F, 0.0F, 14 * f, 1.0F, 1.0F);
break;
case 3:
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0.25D, x + 0.125D, y + 1D, z + 1D));
bbs.add(AxisAlignedBB.getBoundingBox(x + 0D, y + 0D, z + 0D, x + 0.25D, y + 1D, z + 0.25D));
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.25D, y + 0D, z + 0D, x + 1D, y + 1D, z + 0.125D));
break;
}

for(AxisAlignedBB bb : bbs) {
if(aabb.intersectsWith(bb)) {
list.add(bb);
}
}
} else {
super.addCollisionBoxesToList(world, x, y, z, aabb, list, collider);
}

return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
}
3 changes: 1 addition & 2 deletions src/main/java/com/hbm/blocks/machine/BlockArmorTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
Expand Down Expand Up @@ -65,7 +64,7 @@ public Container provideContainer(int ID, EntityPlayer player, World world, int

@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIArmorTable(player.inventory);
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/hbm/blocks/machine/NTMAnvil.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.IIconRegister;
Expand Down Expand Up @@ -192,7 +191,7 @@ public Container provideContainer(int ID, EntityPlayer player, World world, int

@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIAnvil(player.inventory, ((NTMAnvil)world.getBlock(x, y, z)).tier);
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/hbm/blocks/machine/RadioRec.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
Expand Down Expand Up @@ -102,7 +101,7 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p

@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);

if(te instanceof TileEntityRadioRec)
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/hbm/blocks/network/RadioTorchCounter.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
Expand Down Expand Up @@ -56,7 +55,7 @@ public Container provideContainer(int ID, EntityPlayer player, World world, int

@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUICounterTorch(player.inventory, (TileEntityRadioTorchCounter) world.getTileEntity(x, y, z));
}

Expand Down
Loading

0 comments on commit 3a81e79

Please sign in to comment.