Skip to content

Commit

Permalink
Merge pull request #876 from VolmitSoftware/Development
Browse files Browse the repository at this point in the history
Changelog:

Fixed Versioning compilation issues
Forceblock nolonger Crashes
Forceblock Works now (as intended, as far as we can tell)
  • Loading branch information
NextdoorPsycho authored Aug 26, 2022
2 parents 1d3681b + 4fed2e6 commit be39fce
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
id "de.undercouch.download" version "5.0.1"
}

version '2.2.11-1.19.2' // Needs to be version specific
version '2.2.13-1.19.2' // Needs to be version specific
def nmsVersion = "1.19.2"
def apiVersion = '1.19'
def spigotJarVersion = '1.19.1-R0.1-SNAPSHOT'
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/volmit/iris/Iris.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ public static void reportError(Throwable e) {
}

private void enable() {
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
IrisToolbelt.retainMantleDataForSlice(BlockData.class.getCanonicalName());
instance = this;
services = new KMap<>();
initialize("com.volmit.iris.core.service").forEach((i) -> services.put((Class<? extends IrisService>) i.getClass(), (IrisService) i));
Expand Down Expand Up @@ -416,6 +414,8 @@ private void enable() {
splash();
autoStartStudio();
checkForBukkitWorlds();
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
IrisToolbelt.retainMantleDataForSlice(BlockData.class.getCanonicalName());
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ
bd = decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData());

if(!underwater) {
if(!canGoOn(bd, bdx) && !decorator.isForcePlace()) {
if(!canGoOn(bd, bdx) && (!decorator.isForcePlace() && decorator.getForceBlock() == null) ) {
return;
}
}

if(decorator.getForceBlock() != null)
data.set(x, height, z, fixFaces(decorator.getForceBlock().getBlockData(getData()), x, height, z));

if(bd instanceof Bisected) {
bd = bd.clone();
((Bisected) bd).setHalf(Bisected.Half.TOP);
Expand All @@ -74,9 +77,8 @@ public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ
((Bisected) bd).setHalf(Bisected.Half.BOTTOM);
}

if(decorator.getForceBlock() != null)
data.set(x, height, z, fixFaces(decorator.getForceBlock().getBlockData(getData()), x, height, z));
data.set(x, height + 1, z, fixFaces(bd, x, height, z));
data.set(x, height + 1, z, fixFaces(bd, x, height + 1, z));

} else {
if(height < getDimension().getFluidHeight()) {
max = getDimension().getFluidHeight();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private void post(int currentPostX, int currentPostZ, Hunk<BlockData> currentDat
if(B.isFoliage(b) || b.getMaterial().equals(Material.DEAD_BUSH)) {
Material onto = getPostBlock(x, h, z, currentPostX, currentPostZ, currentData).getMaterial();

if(!B.canPlaceOnto(b.getMaterial(), onto)) {
if(!B.canPlaceOnto(b.getMaterial(), onto) && !B.isDecorant(b)) {
setPostBlock(x, h + 1, z, AIR, currentPostX, currentPostZ, currentData);
}
}
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/com/volmit/iris/engine/object/IrisGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,24 +213,24 @@ public double getHeight(double rx, double ry, double rz, long superSeed, boolean
return 0;
}

int hc = (int) ((cliffHeightMin * 10) + 10 + cliffHeightMax * seed + offsetX + offsetZ);
int hc = (int) ((cliffHeightMin * 10) + 10 + cliffHeightMax * getSeed() + offsetX + offsetZ);
double h = multiplicitive ? 1 : 0;
double tp = 0;

if(composite.size() == 1) {
if(multiplicitive) {
h *= composite.get(0).getNoise(seed + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
h *= composite.get(0).getNoise(getSeed() + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
} else {
tp += composite.get(0).getOpacity();
h += composite.get(0).getNoise(seed + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
h += composite.get(0).getNoise(getSeed() + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
}
} else {
for(IrisNoiseGenerator i : composite) {
if(multiplicitive) {
h *= i.getNoise(seed + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
h *= i.getNoise(getSeed() + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
} else {
tp += i.getOpacity();
h += i.getNoise(seed + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
h += i.getNoise(getSeed() + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
}
}
}
Expand All @@ -248,17 +248,17 @@ public double getHeight(double rx, double ry, double rz, long superSeed, boolean
}

public double cell(double rx, double rz, double v, double superSeed) {
getCellGenerator(seed + 46222).setShuffle(getCellFractureShuffle());
return getCellGenerator(seed + 46222).getDistance(rx / getCellFractureZoom(), rz / getCellFractureZoom()) > getCellPercentSize() ? (v * getCellFractureHeight()) : v;
getCellGenerator(getSeed() + 46222).setShuffle(getCellFractureShuffle());
return getCellGenerator(getSeed() + 46222).getDistance(rx / getCellFractureZoom(), rz / getCellFractureZoom()) > getCellPercentSize() ? (v * getCellFractureHeight()) : v;
}

private boolean hasCellCracks() {
return getCellFractureHeight() != 0;
}

public double getCliffHeight(double rx, double rz, double superSeed) {
int hc = (int) ((cliffHeightMin * 10) + 10 + cliffHeightMax * seed + offsetX + offsetZ);
double h = cliffHeightGenerator.getNoise((long) (seed + superSeed + hc), (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
int hc = (int) ((cliffHeightMin * 10) + 10 + cliffHeightMax * getSeed() + offsetX + offsetZ);
double h = cliffHeightGenerator.getNoise((long) (getSeed() + superSeed + hc), (rx + offsetX) / zoom, (rz + offsetZ) / zoom, getLoader());
return IrisInterpolation.lerp(cliffHeightMin, cliffHeightMax, h);
}

Expand Down

0 comments on commit be39fce

Please sign in to comment.