Add a TODO/Issue and fix capitalization
This commit is contained in:
+15
-1
@@ -121,7 +121,21 @@ dependencies {
|
|||||||
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
||||||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
||||||
minecraft 'net.minecraftforge:forge:1.16.5-36.1.0'
|
minecraft 'net.minecraftforge:forge:1.16.5-36.1.0'
|
||||||
|
|
||||||
|
|
||||||
|
// these were added to hopefully allow for cloning
|
||||||
|
// configuredFeatures to allow for safe
|
||||||
|
// multi threaded feature generation. Sadly I couldn't find
|
||||||
|
// a way to duplicate lambda functions (which features use)
|
||||||
|
// so for now I'm not sure what to do.
|
||||||
|
//implementation 'io.github.kostaskougios:cloning:1.10.3'
|
||||||
|
//
|
||||||
|
//implementation ('com.esotericsoftware:kryo:5.1.1') {
|
||||||
|
// exclude group: "org.objenesis"
|
||||||
|
//}
|
||||||
|
//implementation 'org.objenesis:objenesis:3.2'
|
||||||
|
|
||||||
|
|
||||||
// You may put jars on which you depend on in ./libs or you may define them like so..
|
// You may put jars on which you depend on in ./libs or you may define them like so..
|
||||||
// compile "some.group:artifact:version:classifier"
|
// compile "some.group:artifact:version:classifier"
|
||||||
// compile "some.group:artifact:version"
|
// compile "some.group:artifact:version"
|
||||||
|
|||||||
@@ -397,27 +397,15 @@ public class LodChunkGenWorker implements IWorker
|
|||||||
{
|
{
|
||||||
for(Supplier<ConfiguredFeature<?, ?>> featureSupplier : featuresForState.get(featureStateToGenerate))
|
for(Supplier<ConfiguredFeature<?, ?>> featureSupplier : featuresForState.get(featureStateToGenerate))
|
||||||
{
|
{
|
||||||
ConfiguredFeature<?, ?> configuredfeature = featureSupplier.get();
|
ConfiguredFeature<?, ?> configuredFeature = featureSupplier.get();
|
||||||
|
|
||||||
if (configuredFeaturesToAvoid.containsKey(configuredfeature.hashCode()))
|
if (configuredFeaturesToAvoid.containsKey(configuredFeature.hashCode()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/*
|
|
||||||
// clone any items that aren't thread safe to prevent
|
|
||||||
// them from causing issues
|
|
||||||
if(configuredfeature.config.getClass() == BlockClusterFeatureConfig.class)
|
|
||||||
{
|
|
||||||
config = cloneBlockClusterFeatureConfig((BlockClusterFeatureConfig) configuredfeature.config);
|
|
||||||
}
|
|
||||||
else if (configuredfeature.config.getClass() == DecoratedFeatureConfig.class)
|
|
||||||
{
|
|
||||||
config = cloneDecoratedFeatureConfig((DecoratedFeatureConfig) configuredfeature.config);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
configuredfeature.place(lodServerWorld, chunkGen, serverWorld.random, chunk.getPos().getWorldPosition());
|
configuredFeature.place(lodServerWorld, chunkGen, serverWorld.random, chunk.getPos().getWorldPosition());
|
||||||
}
|
}
|
||||||
catch(ConcurrentModificationException e)
|
catch(ConcurrentModificationException e)
|
||||||
{
|
{
|
||||||
@@ -425,13 +413,14 @@ public class LodChunkGenWorker implements IWorker
|
|||||||
// except pray that it doesn't effect the normal world generation
|
// except pray that it doesn't effect the normal world generation
|
||||||
// in any harmful way
|
// in any harmful way
|
||||||
|
|
||||||
|
// Issue #35
|
||||||
// I tried cloning the config for each feature, but that
|
// I tried cloning the config for each feature, but that
|
||||||
// path was blocked since I can't clone lambda methods.
|
// path was blocked since I can't clone lambda methods.
|
||||||
// I tried using a deep cloning library and discovered
|
// I tried using a deep cloning library and discovered
|
||||||
// the problem there.
|
// the problem there.
|
||||||
// ( https://github.com/kostaskougios/cloning )
|
// ( https://github.com/kostaskougios/cloning )
|
||||||
|
|
||||||
configuredFeaturesToAvoid.put(configuredfeature.hashCode(), configuredfeature);
|
configuredFeaturesToAvoid.put(configuredFeature.hashCode(), configuredFeature);
|
||||||
// ClientProxy.LOGGER.info(configuredFeaturesToAvoid.mappingCount());
|
// ClientProxy.LOGGER.info(configuredFeaturesToAvoid.mappingCount());
|
||||||
}
|
}
|
||||||
catch(UnsupportedOperationException e)
|
catch(UnsupportedOperationException e)
|
||||||
@@ -440,7 +429,7 @@ public class LodChunkGenWorker implements IWorker
|
|||||||
// isn't able to return something that a feature
|
// isn't able to return something that a feature
|
||||||
// generator needs
|
// generator needs
|
||||||
|
|
||||||
configuredFeaturesToAvoid.put(configuredfeature.hashCode(), configuredfeature);
|
configuredFeaturesToAvoid.put(configuredFeature.hashCode(), configuredFeature);
|
||||||
// ClientProxy.LOGGER.info(configuredFeaturesToAvoid.mappingCount());
|
// ClientProxy.LOGGER.info(configuredFeaturesToAvoid.mappingCount());
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
@@ -454,7 +443,7 @@ public class LodChunkGenWorker implements IWorker
|
|||||||
//ClientProxy.LOGGER.error("error class: \"" + configuredfeature.config.getClass() + "\"");
|
//ClientProxy.LOGGER.error("error class: \"" + configuredfeature.config.getClass() + "\"");
|
||||||
System.out.println();
|
System.out.println();
|
||||||
|
|
||||||
configuredFeaturesToAvoid.put(configuredfeature.hashCode(), configuredfeature);
|
configuredFeaturesToAvoid.put(configuredFeature.hashCode(), configuredFeature);
|
||||||
// ClientProxy.LOGGER.info(configuredFeaturesToAvoid.mappingCount());
|
// ClientProxy.LOGGER.info(configuredFeaturesToAvoid.mappingCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ public net.minecraft.world.gen.feature.ConfiguredFeature func_242765_a(Lnet/mine
|
|||||||
public net.minecraft.world.server.ServerChunkProvider field_217244_j # dataStorage
|
public net.minecraft.world.server.ServerChunkProvider field_217244_j # dataStorage
|
||||||
public net.minecraft.world.lighting.WorldLightManager field_215576_a # blockEngine
|
public net.minecraft.world.lighting.WorldLightManager field_215576_a # blockEngine
|
||||||
public net.minecraft.world.lighting.WorldLightManager field_215577_b # skyEngine
|
public net.minecraft.world.lighting.WorldLightManager field_215577_b # skyEngine
|
||||||
|
public net.minecraft.world.gen.feature.Feature field_236290_a_ # configuredCodec
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#=====================#
|
#=====================#
|
||||||
|
|||||||
Reference in New Issue
Block a user