Skip to content

Commit

Permalink
Automatic Commit Message for when Greg does not type before hitting E…
Browse files Browse the repository at this point in the history
…nter.
  • Loading branch information
GregoriusT committed Jun 26, 2023
1 parent 747b073 commit 6ff8496
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public ItemStack getCraftingOutput(boolean aAllowCache) {
if (!slotHas(SLOTS_CRAFTING[0])) slot(SLOTS_CRAFTING[0], ST.amount(0, slot(tDestination)));
break;
case 8:
// Because of the original Furnace Recipe.
// Because of the original Furnace and Chest Recipes.
if (!slotHas(SLOTS_CRAFTING[8])) slot(SLOTS_CRAFTING[8], ST.amount(0, slot(tDestination)));
if (!slotHas(SLOTS_CRAFTING[7])) slot(SLOTS_CRAFTING[7], ST.amount(0, slot(tDestination)));
if (!slotHas(SLOTS_CRAFTING[6])) slot(SLOTS_CRAFTING[6], ST.amount(0, slot(tDestination)));
Expand All @@ -251,7 +251,7 @@ public ItemStack getCraftingOutput(boolean aAllowCache) {
if (!slotHas(SLOTS_CRAFTING[0])) slot(SLOTS_CRAFTING[0], ST.amount(0, slot(tDestination)));
break;
case 6:
// 3x2 because of the original Wall and Trapdoor Recipes.
// 3x2 because of the original Wall and Trapdoor Recipes.
if (!slotHas(SLOTS_CRAFTING[5])) slot(SLOTS_CRAFTING[5], ST.amount(0, slot(tDestination)));
if (!slotHas(SLOTS_CRAFTING[4])) slot(SLOTS_CRAFTING[4], ST.amount(0, slot(tDestination)));
if (!slotHas(SLOTS_CRAFTING[2])) slot(SLOTS_CRAFTING[2], ST.amount(0, slot(tDestination)));
Expand Down
21 changes: 11 additions & 10 deletions src/main/java/gregapi/worldgen/WorldgenBlob.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2021 GregTech-6 Team
* Copyright (c) 2023 GregTech-6 Team
*
* This file is part of GregTech.
*
Expand All @@ -19,13 +19,6 @@

package gregapi.worldgen;

import static gregapi.data.CS.*;

import java.util.Collection;
import java.util.List;
import java.util.Random;
import java.util.Set;

import gregapi.util.UT;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
Expand All @@ -34,6 +27,14 @@
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;

import java.util.Collection;
import java.util.List;
import java.util.Random;
import java.util.Set;

import static gregapi.data.CS.F;
import static gregapi.data.CS.T;

/**
* @author Gregorius Techneticies
*/
Expand All @@ -48,7 +49,7 @@ public WorldgenBlob(String aName, boolean aDefault, Block aBlock, int aBlockMeta
super(aName, aDefault, aLists);
mBlock = aBlock==null?Blocks.cobblestone:aBlock;
mBlockMeta = UT.Code.bind4(aBlockMeta);
mProbability = getConfigFile().get(mCategory, "Probability" , aProbability);
mProbability = Math.max(1, getConfigFile().get(mCategory, "Probability" , aProbability));
mAmount = (int)UT.Code.bind(1, 16, getConfigFile().get(mCategory, "Amount" , aAmount));
mSize = (int)UT.Code.bind(4, 250, getConfigFile().get(mCategory, "Size" , aSize));
mMinY = getConfigFile().get(mCategory, "MinHeight" , aMinY);
Expand All @@ -64,7 +65,7 @@ public boolean generate(World aWorld, Chunk aChunk, int aDimType, int aMinX, int
for (String tName : aBiomeNames) if (mBiomeList.contains(tName)) {temp = F; break;}
if (temp) return F;
}
if (mProbability <= 1 || aRandom.nextInt(mProbability) == 0) {
if (aRandom.nextInt(mProbability) == 0) {
for (int i = 0; i < mAmount; i++) {
int tX = aMinX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aMinZ + aRandom.nextInt(16);
if (mAllowToGenerateinVoid || !aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package gregtech.tileentity.energy.reactors;

import gregapi.data.CS.*;
import gregapi.data.FL;
import gregapi.data.MT;
import gregapi.item.IItemReactorRod;
Expand Down Expand Up @@ -87,7 +86,7 @@ public void onServerTickPost(boolean aFirst) {
tAdjacent = tAdjacents[SIDE_Z_NEG-2]; if (tAdjacent != null) mNeutronCounts[2] += tAdjacent.mTileEntity.getReactorRodNeutronReflection(S0312[tAdjacent.mSideOfTileEntity], tNeutronCount, tModerated);
tAdjacent = tAdjacents[SIDE_X_POS-2]; if (tAdjacent != null) mNeutronCounts[2] += tAdjacent.mTileEntity.getReactorRodNeutronReflection(S2103[tAdjacent.mSideOfTileEntity], tNeutronCount, tModerated);
}

tNeutronCount = getReactorRodNeutronEmission(3);
tModerated = isReactorRodModerated(3);
if (tNeutronCount != 0 || tModerated) {
Expand All @@ -105,33 +104,33 @@ public void onServerTickPost(boolean aFirst) {
updateReactorRodModeration(2);
updateReactorRodModeration(3);
}

long tCalc = UT.Code.divup((oNeutronCounts[0] = mNeutronCounts[0]) + (oNeutronCounts[1] = mNeutronCounts[1]) + (oNeutronCounts[2] = mNeutronCounts[2]) + (oNeutronCounts[3] = mNeutronCounts[3]), 256);

// TODO Raycasting through Lead, Water and similar Blocks.
if (tCalc > 0 && SERVER_TIME % 20 == 10) {
for (Object tEntity : worldObj.loadedEntityList) if (tEntity instanceof EntityLivingBase) {
int tStrength = UT.Code.bindInt((long)(tCalc - ((EntityLivingBase)tEntity).getDistance(xCoord, yCoord, zCoord)));
if (tStrength > 0) UT.Entities.applyRadioactivity((EntityLivingBase)tEntity, (int)UT.Code.divup(tStrength, 10), tStrength);
}
}

mRunning = (tCalc != 0);

long tEnergy = mEnergy;

if (getReactorRodNeutronReaction(0)) mRunning = T;
if (getReactorRodNeutronReaction(1)) mRunning = T;
if (getReactorRodNeutronReaction(2)) mRunning = T;
if (getReactorRodNeutronReaction(3)) mRunning = T;

int tDivider = 1;
if (MT.Na.mLiquid.isFluidEqual(mTanks[0].getFluid())) tDivider = 6;
else if (MT.Sn.mLiquid.isFluidEqual(mTanks[0].getFluid())) tDivider = 3;
mEnergy = UT.Code.divup(mEnergy - tEnergy, tDivider) + tEnergy;

oEnergy = mEnergy - tEnergy;

if (mEnergy > 0) {
boolean tIsExploding = F;
if (FL.Coolant_IC2.is(mTanks[0])) {
Expand Down

0 comments on commit 6ff8496

Please sign in to comment.