1.20-pre2

This commit is contained in:
modmuss50 2023-05-16 19:55:34 +01:00 committed by modmuss
parent 8f8de066f6
commit 91df771011
6 changed files with 12 additions and 8 deletions

View file

@ -137,7 +137,7 @@ public class RebornCoreCommands {
CompletableFuture.supplyAsync(() -> serverChunkManager.getChunk(chunkPosX, chunkPosZ, ChunkStatus.FULL, true), EXECUTOR_SERVICE)
.whenComplete((chunk, throwable) -> {
int max = (int) Math.pow(size, 2);
ctx.getSource().sendFeedback(Text.literal(String.format("Finished generating %d:%d (%d/%d %d%%)", chunk.getPos().x, chunk.getPos().z, completed.getAndIncrement(), max, completed.get() == 0 ? 0 : (int) ((completed.get() * 100.0f) / max))), true);
ctx.getSource().sendFeedback(() -> Text.literal(String.format("Finished generating %d:%d (%d/%d %d%%)", chunk.getPos().x, chunk.getPos().z, completed.getAndIncrement(), max, completed.get() == 0 ? 0 : (int) ((completed.get() * 100.0f) / max))), true);
}
);
}

View file

@ -33,4 +33,6 @@ accessible method net/minecraft/world/gen/foliage/FoliagePlacerType reg
accessible method net/minecraft/recipe/RecipeManager getAllOfType (Lnet/minecraft/recipe/RecipeType;)Ljava/util/Map;
accessible field net/minecraft/screen/ScreenHandler listeners Ljava/util/List;
accessible field net/minecraft/structure/pool/StructurePool elements Lit/unimi/dsi/fastutil/objects/ObjectArrayList;
accessible field net/minecraft/structure/pool/StructurePool elements Lit/unimi/dsi/fastutil/objects/ObjectArrayList;
accessible method net/minecraft/block/CropBlock getAgeProperty ()Lnet/minecraft/state/property/IntProperty;

View file

@ -7,10 +7,10 @@ mod_version=5.7.0
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20-pre1
yarn_version=1.20-pre1+build.7
minecraft_version=1.20-pre2
yarn_version=1.20-pre2+build.1
loader_version=0.14.19
fapi_version=0.80.3+1.20
fapi_version=0.81.2+1.20
# Dependencies
energy_version=3.0.0

View file

@ -96,8 +96,8 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity
}
}
if (block instanceof CropBlock) {
processAgedCrop(blockState, blockPos, ((CropBlock) block).getAgeProperty(), ((CropBlock) block).getMaxAge(), 0);
if (block instanceof CropBlock cropBlock) {
processAgedCrop(blockState, blockPos, cropBlock.getAgeProperty(), ((CropBlock) block).getMaxAge(), 0);
} else if (block instanceof NetherWartBlock) {
processAgedCrop(blockState, blockPos, NetherWartBlock.AGE, 3, 0);
} else if (block instanceof SweetBerryBushBlock) {

View file

@ -73,7 +73,7 @@ public class TechRebornTemplates {
return 0;
}
ctx.getSource().sendFeedback(Text.literal("done"), true);
ctx.getSource().sendFeedback(() -> Text.literal("done"), true);
return Command.SINGLE_SUCCESS;
}

View file

@ -35,4 +35,6 @@ accessible field net/minecraft/screen/ScreenHandler listeners Ljava/
accessible field net/minecraft/structure/pool/StructurePool elements Lit/unimi/dsi/fastutil/objects/ObjectArrayList;
accessible method net/minecraft/block/CropBlock getAgeProperty ()Lnet/minecraft/state/property/IntProperty;
# DO NOT EDIT THIS FILE, edit the RebornCore AW, it will automatically be coped to this one.