Skip to content

Commit

Permalink
Version: 2.0.0 Release - The Big Fixing
Browse files Browse the repository at this point in the history
by: cerph
Added more Control panel mechanics

by: Th3_Sl1ce
Added More Translations
Added Conveyors and Extractor/Inserter

by: Alcater
Added Torex Nuke
Added Mk5 Nuke processing
Added scortched nuke craters
Added N² and Balefire charge
Added Launchpad cooldown
Added 7 Blockstates per waste block
Added Galacticraft sealing to all big doors
Added pink log tooltip
Added 1.7 Fuel system
Added striped concrete
Added cable gauge
Added peace dimension config
Added hazmat potion resistance
Added N² Missile
Added pocket radar
Added contaminated sandstone and terracotta
Added item contamination threshold config
Added power box recipe
Added latex
Added Electronium sc battery
Added sugar and paper recipe in press
Added Bauble support to rad counters
Added Hadron guide book
Added James cape

Changed RBMK render to be 4x faster but have stretched side texture
Changed Nuke and Missile models
Changed Nukes to use the new system
Changed Batteries to only send to higher tier then themselves
Changed Coal gas do half lung dmg
Changed lockpicking to require both hands
Changed blast dmg balance
Changed Radar and Forcefuel model
Changed default config to have better values
Changed Missiles to use Mk5 system
Changed Bossbar colors
Changed Xenon-135 production 6x
Changed recipes to require less neoveline
Changed corium production to give less
Changed Armors to work more similar to 1.7
Changed max RBMK column height to 250
Changed broadcaster to not affect people in creative or spectator
Changed Factories to spawn NTM

Removed N45 Mine
Removed Old Drill
Removed unused stuff
Removed random sellafite spawning
Removed creative battery recipe
Removed Wand recipe
Removed EntityDrying and EntityRainDrop
Removed i131 and co60 decontamination recipes

Fixed crash when moving from reloaded
Fixed Jetpack and hud sync
Fixed Fuel uncrafting exploit
Fixed 3rd person armor sneak
Fixed Door locking
Fixed NTM glas not dropping
Fixed Xp loophole
Fixed Barrel exploding crash
Fixed BlockOldLeaf crash
Fixed Door skins
Fixed Radiobox
Fixed Cheapo crash
Fixed Big turret manual control
Fixed Jungle dungeon spawning
Fixed Ufo and Balls advancemnts and coins
Fixed Chopper sounds
Fixed pressure pipes crash
Fixed DNT armor not working on mobs
Fixed vomiting
Fixed Powerarmor sneak sound spam
Fixed missing fuel values in Blastfurnace
Fixed Boiler
Fixed Glider falldmg
Fixed landing pad armor mod
Fixed Aoe mining
Fixed siren sound loop
Fixed waste uncrafting loophole
Fixed riddle
Fixed missing revolver texture
Fixed drill not going all the way
  • Loading branch information
Alcatergit committed Feb 8, 2024
1 parent 065d2f9 commit d8ce3f6
Show file tree
Hide file tree
Showing 1,571 changed files with 41,759 additions and 30,711 deletions.
28 changes: 23 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
buildscript {
repositories {
maven { url = "https://maven.minecraftforge.net/" }
maven { url = "https://files.minecraftforge.net/maven" }
maven { url = "https://files.minecraftforge.net/maven" }
mavenCentral()
maven {
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
Expand All @@ -24,7 +24,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.9.8'
version = '2.0.0'
group = 'com.hbm' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'NTM-Extended-1.12.2'

Expand Down Expand Up @@ -86,6 +86,18 @@ repositories {
name = "jared maven"
url = "http://maven.blamejared.com/"
}
maven { //GC
name = "galacticraft"
url = "https://maven.galacticraft.net/repository/legacy/"
}
maven { // baubles
name = "mcmoddev"
url = "https://maven.mcmoddev.com"
}
maven {
name = 'CoFH Maven'
url = 'https://maven.covers1624.net'
}
}

dependencies {
Expand Down Expand Up @@ -115,10 +127,16 @@ dependencies {
// at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei_1.12.2:${version_jei}")

//compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api")
//compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api")
//runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}")

compileOnly "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-${version_crafttweaker}"

compileOnly fg.deobf("dev.galacticraft:galacticraft-legacy:${version_gc}")

compileOnly fg.deobf("com.azanor:Baubles:${version_baubles}")

compileOnly fg.deobf("cofh:RedstoneFlux:1.12-${version_redstoneflux}:universal")
}

// Example for how to get properties into the manifest for reading by the runtime..
Expand Down Expand Up @@ -153,4 +171,4 @@ publishing {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}
}
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
version_mc=1.12.2
version=1.9.8
version=2.0.0
version_jei=4.16.1.302
version_redstoneflux=2.1.0.6
version_crafttweaker=4.1.14.521
version_gc=4.0.2.283
version_baubles=1.12-1.5.2
1 change: 0 additions & 1 deletion src/main/java/api/hbm/block/IToolable.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public interface IToolable {
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/api/hbm/energy/IEnergyConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ public enum ConnectionPriority {
HIGH
}

public default boolean isStorage() { //used for batteries
return false;
}

public default void updateStandardConnections(World world, TileEntity te) {
updateStandardConnections(world, te.getPos());
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/api/hbm/energy/IPowerNet.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ public interface IPowerNet {
public List<IEnergyConnector> getSubscribers();

public long transferPower(long power);
public long getTotalTransfer();
}
121 changes: 114 additions & 7 deletions src/main/java/api/hbm/energy/PowerNet.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public class PowerNet implements IPowerNet {
private HashMap<Integer, Integer> proxies = new HashMap();
private List<IEnergyConnector> subscribers = new ArrayList();

public static List<PowerNet> trackingInstances = null;
protected long totalTransfer = 0;

@Override
public void joinNetworks(IPowerNet network) {

Expand Down Expand Up @@ -119,18 +122,27 @@ public void destroy() {
public boolean isValid() {
return this.valid;
}

@Override
public long getTotalTransfer() {
return this.totalTransfer;
}

public long lastCleanup = System.currentTimeMillis();

@Override
public long transferPower(long power) {

/*if(lastCleanup + 45 < System.currentTimeMillis()) {
cleanup(this.subscribers);
lastCleanup = System.currentTimeMillis();
}*/

return fairTransfer(this.subscribers, power);
List<PowerNet> cache = new ArrayList();
if(trackingInstances != null && !trackingInstances.isEmpty()) {
cache.addAll(trackingInstances);
}

trackingInstances = new ArrayList();
trackingInstances.add(this);
long result = fairTransfer(this.subscribers, power);
trackingInstances.addAll(cache);
return result;
}

public static void cleanup(List<IEnergyConnector> subscribers) {
Expand All @@ -139,16 +151,95 @@ public static void cleanup(List<IEnergyConnector> subscribers) {
x == null || !(x instanceof TileEntity) || ((TileEntity)x).isInvalid() || !x.isLoaded()
);
}


public static boolean shouldSend(ConnectionPriority senderPrio, ConnectionPriority p, IEnergyConnector x){
return (x.getPriority() == p) && (!x.isStorage() || (senderPrio.compareTo(p) <= 0));
}

public static long fairTransferWithPrio(ConnectionPriority senderPrio, List<IEnergyConnector> subscribers, long power) {

if(power <= 0) return 0;

if(subscribers.isEmpty())
return power;

cleanup(subscribers);

ConnectionPriority[] priorities = new ConnectionPriority[] {ConnectionPriority.HIGH, ConnectionPriority.NORMAL, ConnectionPriority.LOW};

long totalTransfer = 0;

for(ConnectionPriority p : priorities) {

List<IEnergyConnector> subList = new ArrayList();
subscribers.forEach(x -> {
if(shouldSend(senderPrio, p, x)) {
subList.add(x);
}
});

if(subList.isEmpty())
continue;

List<Long> weight = new ArrayList();
long totalReq = 0;

for(IEnergyConnector con : subList) {
long req = con.getTransferWeight();
weight.add(req);
totalReq += req;
}

if(totalReq == 0)
continue;

long totalGiven = 0;

for(int i = 0; i < subList.size(); i++) {
IEnergyConnector con = subList.get(i);
long req = weight.get(i);
double fraction = (double)req / (double)totalReq;

long given = (long) Math.floor(fraction * power);

totalGiven += (given - con.transferPower(given));

if(con instanceof TileEntity) {
TileEntity tile = (TileEntity) con;
tile.getWorld().markChunkDirty(tile.getPos(), tile);
}
}

power -= totalGiven;
totalTransfer += totalGiven;
}

if(trackingInstances != null) {

for(int i = 0; i < trackingInstances.size(); i++) {
PowerNet net = trackingInstances.get(i);
net.totalTransfer += totalTransfer;
}

trackingInstances.clear();
}

return power;
}

public static long fairTransfer(List<IEnergyConnector> subscribers, long power) {

if(power <= 0) return 0;

if(subscribers.isEmpty())
return power;

cleanup(subscribers);

ConnectionPriority[] priorities = new ConnectionPriority[] {ConnectionPriority.HIGH, ConnectionPriority.NORMAL, ConnectionPriority.LOW};

long totalTransfer = 0;

for(ConnectionPriority p : priorities) {

List<IEnergyConnector> subList = new ArrayList();
Expand Down Expand Up @@ -183,9 +274,25 @@ public static long fairTransfer(List<IEnergyConnector> subscribers, long power)
long given = (long) Math.floor(fraction * power);

totalGiven += (given - con.transferPower(given));

if(con instanceof TileEntity) {
TileEntity tile = (TileEntity) con;
tile.getWorld().markChunkDirty(tile.getPos(), tile);
}
}

power -= totalGiven;
totalTransfer += totalGiven;
}

if(trackingInstances != null) {

for(int i = 0; i < trackingInstances.size(); i++) {
PowerNet net = trackingInstances.get(i);
net.totalTransfer += totalTransfer;
}

trackingInstances.clear();
}

return power;
Expand Down
24 changes: 0 additions & 24 deletions src/main/java/cofh/redstoneflux/api/IEnergyConnection.java

This file was deleted.

50 changes: 0 additions & 50 deletions src/main/java/cofh/redstoneflux/api/IEnergyContainerItem.java

This file was deleted.

31 changes: 0 additions & 31 deletions src/main/java/cofh/redstoneflux/api/IEnergyHandler.java

This file was deleted.

Loading

0 comments on commit d8ce3f6

Please sign in to comment.