Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ dependencies {
implementation "com.dtteam.dynamictreesplus:DynamicTreesPlus:$dynamic_trees_plus_version"
// implementation "curse.maven:dynamictrees-252818:7206627"
// implementation "curse.maven:dynamictreesplus-478155:7205442"
implementation "curse.maven:regions-unexplored-659110:6273893"
implementation "curse.maven:regions-unexplored-659110:7737325"
implementation "curse.maven:terrablender-neoforge-940057:6054947"

implementation "curse.maven:jade-324717:6853386"
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/dtteam/dtru/init/DTRUPlusRegistries.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import net.minecraft.world.level.block.state.BlockState;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.neoforge.data.event.GatherDataEvent;
import net.regions_unexplored.block.RuBlocks;
import net.regions_unexplored.registry.RUBlocks;

public class DTRUPlusRegistries {

Expand Down Expand Up @@ -54,11 +54,11 @@ public static void registerSpeciesTypes(final TypeRegistryEvent<Species> event)
}

public static void setup(){
setupBioshroomConnectable(RuBlocks.BLUE_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RuBlocks.GLOWING_BLUE_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RuBlocks.GLOWING_GREEN_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RuBlocks.GLOWING_PINK_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RuBlocks.GLOWING_YELLOW_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RUBlocks.BLUE_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RUBlocks.GLOWING_BLUE_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RUBlocks.GLOWING_GREEN_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RUBlocks.GLOWING_PINK_BIOSHROOM_BLOCK.get());
setupBioshroomConnectable(RUBlocks.GLOWING_YELLOW_BIOSHROOM_BLOCK.get());

BranchConnectables.makeBlockConnectable(Blocks.SHROOMLIGHT, (state, level, pos, side) -> {
if (side.getAxis() == Direction.Axis.Y) return 0;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/dtteam/dtru/init/DTRURegistries.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
import net.minecraft.world.phys.shapes.VoxelShape;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.regions_unexplored.world.features.treedecorators.BlackwoodBioshroom;
import net.regions_unexplored.world.level.feature.configuration.GiantBioshroomConfiguration;
import net.regions_unexplored.world.level.feature.configuration.RuTreeConfiguration;
import net.regions_unexplored.world.level.feature.configuration.RUTreeConfiguration;
import net.regions_unexplored.world.level.feature.tree.*;
import net.regions_unexplored.world.level.feature.tree.nether.BrimWillowFeature;
import net.regions_unexplored.world.level.feature.tree.nether.TallBrimWillowFeature;
import net.regions_unexplored.worldgen.treedecorator.BlackwoodBioshroomDecorator;

@EventBusSubscriber(modid = DynamicTreesRU.MOD_ID)
public class DTRURegistries {
Expand Down Expand Up @@ -93,7 +93,7 @@ public static void registerFamilyTypes(final TypeRegistryEvent<Family> event) {
event.registerType(DynamicTreesRU.location("brimwood"), BrimwoodFamily.TYPE);
}

public static final FeatureCanceller RU_TREE_CANCELLER = new TreeFeatureCanceller<>(DynamicTreesRU.location("tree"), RuTreeConfiguration.class);
public static final FeatureCanceller RU_TREE_CANCELLER = new TreeFeatureCanceller<>(DynamicTreesRU.location("tree"), RUTreeConfiguration.class);
public static final FeatureCanceller RU_TREE2_CANCELLER = new TreeFeatureCanceller<>(DynamicTreesRU.location("tree_2"), NoneFeatureConfiguration.class){
@Override
public boolean shouldCancel(ConfiguredFeature<?, ?> configuredFeature, BiomePropertySelectors.NormalFeatureCancellation featureCancellations) {
Expand All @@ -118,14 +118,14 @@ public boolean shouldCancel(ConfiguredFeature<?, ?> configuredFeature, BiomeProp
};
public static final FeatureCanceller TREE_NO_SHROOMS_CANCELLER = new TreeFeatureCanceller<>(DynamicTreesRU.location("tree_no_shrooms"), NoneFeatureConfiguration.class){
private boolean isConfigClass (FeatureConfiguration config){
return config instanceof TreeConfiguration || config instanceof RuTreeConfiguration;
return config instanceof TreeConfiguration || config instanceof RUTreeConfiguration;
}
@Override
public boolean shouldCancel(ConfiguredFeature<?, ?> configuredFeature, BiomePropertySelectors.NormalFeatureCancellation featureCancellations) {
final FeatureConfiguration featureConfig = configuredFeature.config();

if (isConfigClass(featureConfig)) {
if (featureConfig instanceof TreeConfiguration treeConfiguration && !treeConfiguration.decorators.isEmpty() && treeConfiguration.decorators.getFirst() instanceof BlackwoodBioshroom){
if (featureConfig instanceof TreeConfiguration treeConfiguration && !treeConfiguration.decorators.isEmpty() && treeConfiguration.decorators.getFirst() instanceof BlackwoodBioshroomDecorator){
return false;
}
String nameSpace = "";
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/dtteam/dtru/tree/EucalyptusFamily.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.world.level.block.state.BlockState;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;
import net.regions_unexplored.config.RuCommonConfig;
import net.regions_unexplored.config.RuClientConfig;

import java.awt.*;

Expand All @@ -22,9 +22,9 @@ public EucalyptusFamily(ResourceLocation name) {
@OnlyIn(Dist.CLIENT)
public int branchColorMultiplier(BlockState state, BlockAndTintGetter level, BlockPos pos) {
Color rainbow = Color.getHSBColor(
((float)pos.getX() + (float)pos.getY() + (float)pos.getZ()) / RuCommonConfig.EUCALYPTUS_TRANSITION_SIZE.get().floatValue(),
RuCommonConfig.EUCALYPTUS_SATURATION.get().floatValue(),
RuCommonConfig.EUCALYPTUS_BRIGHTNESS.get().floatValue());
((float)pos.getX() + (float)pos.getY() + (float)pos.getZ()) / RuClientConfig.EUCALYPTUS_TRANSITION_SIZE.get().floatValue(),
RuClientConfig.EUCALYPTUS_SATURATION.get().floatValue(),
RuClientConfig.EUCALYPTUS_BRIGHTNESS.get().floatValue());
return rainbow.getRGB();
}
}
Loading