Skip to content

Commit

Permalink
Move FindStructureMoves to another mod and update to 1.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
polarbub committed Jan 16, 2023
1 parent 0847c4c commit b99f20c
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 230 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ run/fabric-server-launcher.properties
run/

edit.txt
src.zip
notes.txt
moves1.19.3.txt
checklist.txt
resetServer.sh
resetSingleplayer.sh
startServer.sh
locations.txt
startServer.sh
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id 'fabric-loom' version '1.0-SNAPSHOT'
}

sourceCompatibility = JavaVersion.VERSION_17
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/versions.html

minecraft_version=1.19.2
yarn_mappings=1.19.2+build.17
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.12
fabric_version=0.72.0+1.19.2
fabric_version=0.72.0+1.19.3

# Mod Properties
mod_version = 1.1.10
mod_version = 1.1.11
maven_group = protosky
archives_base_name = protosky
2 changes: 1 addition & 1 deletion src/main/java/protosky/WorldGenUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.structure.StructurePlacementData;
import net.minecraft.structure.StructureTemplate;
Expand All @@ -14,7 +15,6 @@
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.random.RandomSeed;
import net.minecraft.util.math.random.Xoroshiro128PlusPlusRandom;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.world.Heightmap;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package protosky.mixins.StructureHelperInvokers;

import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.util.math.BlockBox;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.GenerationSettings;
import net.minecraft.world.biome.source.BiomeSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public interface OceanRuinGeneratorPieceInvoker {
@Accessor("integrity")
float getIntegrity();

@Invoker("method_14829")
int method_14829Invoker(BlockPos start, BlockView world, BlockPos end);
/*@Invoker("method_14829")
int method_14829Invoker(BlockPos start, BlockView world, BlockPos end);*/
}
12 changes: 8 additions & 4 deletions src/main/java/protosky/stuctures/StructureHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.EndPortalFrameBlock;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.structure.*;
import net.minecraft.structure.processor.BlockIgnoreStructureProcessor;
import net.minecraft.structure.processor.BlockRotStructureProcessor;
Expand All @@ -19,8 +23,6 @@
import net.minecraft.util.math.random.Random;
import net.minecraft.util.math.random.RandomSeed;
import net.minecraft.util.math.random.Xoroshiro128PlusPlusRandom;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.world.Heightmap;
import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.WorldAccess;
Expand All @@ -32,6 +34,7 @@
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.util.PlacedFeatureIndexer;
import net.minecraft.world.gen.structure.Structure;
import net.minecraft.world.gen.structure.StructureType;
import org.apache.commons.lang3.tuple.MutablePair;
import org.apache.commons.lang3.tuple.Pair;
import protosky.mixins.StructureHelperInvokers.*;
Expand Down Expand Up @@ -93,7 +96,8 @@ private static int oceanRuinYCalculator(BlockPos start, WorldAccess world, Block

private static synchronized void fixRaceCondition(WorldAccess world) {
if (!ran) {
Registry<Structure> structureRegistry = world.getRegistryManager().get(Registry.STRUCTURE_KEY);
//Registry<StructureType<?>> structureRegistry = Registries.STRUCTURE_TYPE;
Registry<Structure> structureRegistry = world.getRegistryManager().get(RegistryKeys.STRUCTURE);

structures.clear();
structures.add(new MutablePair<>(
Expand Down Expand Up @@ -351,7 +355,7 @@ public static void handleStructures(StructureWorldAccess world, Chunk chunk, Str
BlockPos blockPos = chunkSectionPos.getMinPos();

//Get the structure registry
Registry<Structure> registry = world.getRegistryManager().get(Registry.STRUCTURE_KEY);
Registry<Structure> registry = world.getRegistryManager().get(RegistryKeys.STRUCTURE);
Map<Integer, List<Structure>> map = registry.stream()
.collect(Collectors.groupingBy(structureType -> structureType.getFeatureGenerationStep().ordinal()));

Expand Down
209 changes: 0 additions & 209 deletions src/main/java/protosky/testing/findMovedStructure.java

This file was deleted.

Binary file removed src/main/resources/assets/protosky/icon.png
Binary file not shown.
3 changes: 0 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
"entrypoints": {
"main": [
"protosky.fixWorldLoads"
],
"notentrypoints": [
"protosky.testing.findMovedStructure"
]
},
"mixins": [
Expand Down

0 comments on commit b99f20c

Please sign in to comment.