This commit is contained in:
Bob 2023-07-25 22:21:48 +02:00
parent 244fbacd39
commit 1ffb2737aa
7 changed files with 54 additions and 55 deletions

View File

@ -1,24 +1,13 @@
## Added
* Custom machines
* Simple processing multiblocks that can be created via config
* The config found in `hbmConfig/hbmCustomMachines.json` defines the input and output slots, fluid amount, speed and consumption multipliers as well as the multiblock
* The config in `hbmRecipes/hbmCustomMachines.json` defines the recipes for all multiblocks with inputs, outputs base speed and consumption rates
* Currently, custom machine recipes do not show up in NEI, a handler will be added soon
* All recipes are shaped, even the fluid types, this was done to improve performance
* Item inputs have filter slots for automation, this allows the right ingredients to be inserted into the right slot easily. For simple machines, this slot can be left empty so any item can be inserted.
* By default, the standard config creates one custom machine with one recipe called the paper press, turning sawdust and water into paper
* More examples can be found in the configs attached to this github release
* Custom machines can also be configured as generators, using up item and fluid inputs and turning them into energy
* While changing the configs and adding/removing machines in an existing world is possible, this is not recommended because of potential ID shifts of the machines, breaking existing custom machines in the world
* With custom machines, quite a few otherwise unused construction blocks have been added which are recommended to be used for custom machines as they come in tiers, have reasonable cost and mesh well visually with the multiblocks
* However, using them is not mandatory, the only functional block is the port which is most likely needed for automation, although the machine's controller itself also serves as a port
* New command `/ntmsatellites`
* `/ntmsatellites orbit` will send the held saatellite into orbit
* `/ntmsatellites descend <frequency>` will delete the given satellite
## Changed
* Additional OC compat for fluid gauges
* Crates now display their contents when in item form
* Updated russian localization
* It's no longer possible to insert items into the satellite cargo pad, it's only for unloading
* The satellite linker will no longer assign new frequencies in the randomizer slot if that frequency is already taken
* Custom machines will now show a hologram showing how they are built
## Fixed
* Hopefully fixed an issue where pollution-based mob buffs apply multiple times, resulting in near-unkillable mobs
* Fixed exploit allowing the cap for shield infusions to be bypassed
* Fixed tier detection mode in the radar detecting the Y-position instead of the actual tier
* Fixed missing parenthesis in sigmoid curve's description
* Fixed crash caused by mobs spawning in highly polluted area

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4670
mod_build_number=4671
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\
@ -14,5 +14,5 @@ credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion al
\ Toshayo (satellite loot system, project settings, gradle curse task), Silly541 (config for safe ME drives),\
\ Voxelstice (OpenComputers integration, turbine spinup), BallOfEnergy1 (OpenComputers integration), martemen\
\ (project settings), Pvndols (thorium fuel recipe, gas turbine), JamesH2 (blood mechanics, nitric acid,\
\ particle emitter), sdddddf80 (recipe configs, chinese localization), SuperCraftAlex (tooltips)\
\ LePeep (coilgun model), Maksymisio (polish localization)
\ particle emitter), sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
\ SuperCraftAlex (tooltips) LePeep (coilgun model), Maksymisio (polish localization)

View File

@ -370,6 +370,8 @@ public class EntityEffectHandler {
double asbestos = Math.min(HbmLivingProps.getAsbestos(entity), HbmLivingProps.maxAsbestos);
double soot = PollutionHandler.getPollution(entity.worldObj, (int) Math.floor(entity.posX), (int) Math.floor(entity.posY + entity.getEyeHeight()), (int) Math.floor(entity.posZ), PollutionType.SOOT);
if(!(entity instanceof EntityPlayer)) soot = 0;
if(ArmorRegistry.hasProtection(entity, 3, HazardClass.PARTICLE_COARSE)) soot = 0;
boolean coughs = blacklung / HbmLivingProps.maxBlacklung > 0.25D || asbestos / HbmLivingProps.maxAsbestos > 0.25D || soot > 30;

View File

@ -323,8 +323,8 @@ public class PollutionHandler {
if(living instanceof IMob) {
if(data.pollution[PollutionType.SOOT.ordinal()] > RadiationConfig.buffMobThreshold) {
if(living.getEntityAttribute(SharedMonsterAttributes.maxHealth) != null) living.getEntityAttribute(SharedMonsterAttributes.maxHealth).applyModifier(new AttributeModifier(maxHealth, "Soot Anger Health Increase", 1D, 1));
if(living.getEntityAttribute(SharedMonsterAttributes.attackDamage) != null) living.getEntityAttribute(SharedMonsterAttributes.attackDamage).applyModifier(new AttributeModifier(attackDamage, "Soot Anger Damage Increase", 1.5D, 1));
if(living.getEntityAttribute(SharedMonsterAttributes.maxHealth) != null && living.getEntityAttribute(SharedMonsterAttributes.maxHealth).getModifier(maxHealth) == null) living.getEntityAttribute(SharedMonsterAttributes.maxHealth).applyModifier(new AttributeModifier(maxHealth, "Soot Anger Health Increase", 1D, 1));
if(living.getEntityAttribute(SharedMonsterAttributes.attackDamage) != null && living.getEntityAttribute(SharedMonsterAttributes.attackDamage).getModifier(attackDamage) == null) living.getEntityAttribute(SharedMonsterAttributes.attackDamage).applyModifier(new AttributeModifier(attackDamage, "Soot Anger Damage Increase", 1.5D, 1));
living.heal(living.getMaxHealth());
}
}

View File

@ -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 (4670)";
public static final String VERSION = "1.0.27 BETA (4671)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -3,42 +3,48 @@ package com.hbm.render.tileentity;
import com.hbm.config.CustomMachineConfigJSON;
import com.hbm.render.util.SmallBlockPronter;
import com.hbm.tileentity.machine.TileEntityCustomMachine;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
public class RenderCustomMachine extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
NBTTagCompound nbt = new NBTTagCompound();
tile.writeToNBT(nbt);
CustomMachineConfigJSON.MachineConfiguration config = CustomMachineConfigJSON.customMachines.get(nbt.getString("machineType"));
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
TileEntityCustomMachine custom = (TileEntityCustomMachine) tile;
CustomMachineConfigJSON.MachineConfiguration config = custom.config;
ForgeDirection dir = ForgeDirection.getOrientation(tile.getBlockMetadata());
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
bindTexture(TextureMap.locationBlocksTexture);
SmallBlockPronter.startDrawing();
for(CustomMachineConfigJSON.MachineConfiguration.ComponentDefinition comp : config.components){
int rx = - dir.offsetX * comp.x + rot.offsetX * comp.x;
int ry = + comp.y;
int rz = - dir.offsetZ * comp.z + rot.offsetZ * comp.z;
if(dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) {
rx = + dir.offsetZ * comp.z - rot.offsetZ * comp.z;
rz = + dir.offsetX * comp.x - rot.offsetX * comp.x;
}
SmallBlockPronter.drawSmolBlockAt(comp.block,comp.metas.get(comp.metas.size()-1).getAsInt(),rx,ry,rz);
}
SmallBlockPronter.draw();
GL11.glPopMatrix();
}
ForgeDirection dir = ForgeDirection.getOrientation(tile.getBlockMetadata());
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
if(config != null && !custom.structureOK) {
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
bindTexture(TextureMap.locationBlocksTexture);
SmallBlockPronter.startDrawing();
for(CustomMachineConfigJSON.MachineConfiguration.ComponentDefinition comp : config.components) {
int rx = -dir.offsetX * comp.x + rot.offsetX * comp.x;
int ry = +comp.y;
int rz = -dir.offsetZ * comp.z + rot.offsetZ * comp.z;
if(dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) {
rx = +dir.offsetZ * comp.z - rot.offsetZ * comp.z;
rz = +dir.offsetX * comp.x - rot.offsetX * comp.x;
}
int index = (int) ((System.currentTimeMillis() / 1000) % comp.metas.size());
SmallBlockPronter.drawSmolBlockAt(comp.block, comp.metas.get(index).getAsInt(), rx, ry, rz);
}
SmallBlockPronter.draw();
GL11.glPopMatrix();
}
}
}

View File

@ -174,6 +174,7 @@ public class TileEntityCustomMachine extends TileEntityMachineBase implements IF
NBTTagCompound data = new NBTTagCompound();
data.setString("type", this.machineType);
data.setLong("power", power);
data.setBoolean("structureOK", structureOK);
data.setInteger("progress", progress);
data.setInteger("maxProgress", maxProgress);
for(int i = 0; i < inputTanks.length; i++) inputTanks[i].writeToNBT(data, "i" + i);
@ -369,6 +370,7 @@ public class TileEntityCustomMachine extends TileEntityMachineBase implements IF
this.power = nbt.getLong("power");
this.progress = nbt.getInteger("progress");
this.structureOK = nbt.getBoolean("structureOK");
this.maxProgress = nbt.getInteger("maxProgress");
for(int i = 0; i < inputTanks.length; i++) inputTanks[i].readFromNBT(nbt, "i" + i);
for(int i = 0; i < outputTanks.length; i++) outputTanks[i].readFromNBT(nbt, "o" + i);