Fixed some ToDos

This commit is contained in:
Frank 2022-12-10 11:03:44 +01:00
parent f615453106
commit 9f8af3085e
8 changed files with 16 additions and 26 deletions

View file

@ -26,7 +26,6 @@ public class EndLotusFlowerBlock extends EndPlantBlock {
private static final VoxelShape SHAPE_COLLISION = Block.box(0, 0, 0, 16, 2, 16);
public EndLotusFlowerBlock() {
//TODO: 1.19 Test if we can remove dynamic shape and offsetType
super(basePlantSettings(15).offsetType(BlockBehaviour.OffsetType.NONE));
}

View file

@ -116,7 +116,6 @@ public class EndStoneSmelter extends BaseBlockWithEntity implements AlloyingReci
@Override
@SuppressWarnings("deprecation")
public int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) {
//TODO
return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
}

View file

@ -52,7 +52,6 @@ public class CubozoaEntity extends AbstractSchoolingFish {
SpawnGroupData data = super.finalizeSpawn(world, difficulty, spawnReason, entityData, entityTag);
if (BiomeAPI.getBiome(world.getBiome(blockPosition())).is(EndBiomes.SULPHUR_SPRINGS)) {
//TODO: 1.19.3 test if this still works
this.entityData.set(VARIANT, (byte) 1);
}

View file

@ -14,42 +14,42 @@ import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfigur
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
public class BYGFeatures {
public static final BCLFeature<OldBulbisTreeFeature, NoneFeatureConfiguration> OLD_BULBIS_TREE = redisterVegetation(
public static final BCLFeature<OldBulbisTreeFeature, NoneFeatureConfiguration> OLD_BULBIS_TREE = registerVegetation(
"old_bulbis_tree",
EndFeatures.inlineBuild("old_bulbis_tree_feature", new OldBulbisTreeFeature()),
1
);
public static final BCLFeature<SinglePlantFeature, SinglePlantFeatureConfig> IVIS_SPROUT = redisterVegetation(
public static final BCLFeature<SinglePlantFeature, SinglePlantFeatureConfig> IVIS_SPROUT = registerVegetation(
"ivis_sprout",
EndFeatures.SINGLE_PLANT_FEATURE,
new SinglePlantFeatureConfig(Integrations.BYG.getBlock("ivis_sprout"), 6, 2),
6
);
public static final BCLFeature<VineFeature, VineFeatureConfig> IVIS_VINE = redisterVegetation(
public static final BCLFeature<VineFeature, VineFeatureConfig> IVIS_VINE = registerVegetation(
"ivis_vine",
EndFeatures.VINE_FEATURE,
new VineFeatureConfig(BYGBlocks.IVIS_VINE, 24),
5
);
public static final BCLFeature<WallPlantFeature, WallPlantFeatureConfig> IVIS_MOSS = redisterVegetation(
public static final BCLFeature<WallPlantFeature, WallPlantFeatureConfig> IVIS_MOSS = registerVegetation(
"ivis_moss",
EndFeatures.WALL_PLANT_FEATURE,
new WallPlantFeatureConfig(BYGBlocks.IVIS_MOSS, 6),
1
);
public static final BCLFeature<WallPlantOnLogFeature, WallPlantFeatureConfig> IVIS_MOSS_WOOD = redisterVegetation(
public static final BCLFeature<WallPlantOnLogFeature, WallPlantFeatureConfig> IVIS_MOSS_WOOD = registerVegetation(
"ivis_moss_wood",
EndFeatures.WALL_PLANT_ON_LOG_FEATURE,
new WallPlantFeatureConfig(BYGBlocks.IVIS_MOSS, 6),
15
);
public static final BCLFeature<WallPlantFeature, WallPlantFeatureConfig> NIGHTSHADE_MOSS = redisterVegetation(
public static final BCLFeature<WallPlantFeature, WallPlantFeatureConfig> NIGHTSHADE_MOSS = registerVegetation(
"nightshade_moss",
EndFeatures.WALL_PLANT_FEATURE,
new WallPlantFeatureConfig(BYGBlocks.NIGHTSHADE_MOSS, 5),
2
);
public static final BCLFeature<WallPlantOnLogFeature, WallPlantFeatureConfig> NIGHTSHADE_MOSS_WOOD = redisterVegetation(
public static final BCLFeature<WallPlantOnLogFeature, WallPlantFeatureConfig> NIGHTSHADE_MOSS_WOOD = registerVegetation(
"nightshade_moss_wood",
EndFeatures.WALL_PLANT_ON_LOG_FEATURE,
new WallPlantFeatureConfig(BYGBlocks.NIGHTSHADE_MOSS, 5),
@ -62,7 +62,7 @@ public class BYGFeatures {
new NightshadeRedwoodTreeFeature()
);
public static final BCLFeature<NightshadeRedwoodTreeFeature, NoneFeatureConfiguration> NIGHTSHADE_REDWOOD_TREE = redisterVegetation(
public static final BCLFeature<NightshadeRedwoodTreeFeature, NoneFeatureConfiguration> NIGHTSHADE_REDWOOD_TREE = registerVegetation(
"nightshade_redwood_tree",
NIGHTSHADE_REDWOOD_TREE_FEATURE,
1
@ -73,7 +73,7 @@ public class BYGFeatures {
new BigEtherTreeFeature()
);
public static final BCLFeature<BigEtherTreeFeature, NoneFeatureConfiguration> BIG_ETHER_TREE = redisterVegetation(
public static final BCLFeature<BigEtherTreeFeature, NoneFeatureConfiguration> BIG_ETHER_TREE = registerVegetation(
"big_ether_tree",
BIG_ETHER_TREE_FEATURE,
1
@ -82,15 +82,15 @@ public class BYGFeatures {
public static void register() {
}
private static <F extends Feature<NoneFeatureConfiguration>> BCLFeature<F, NoneFeatureConfiguration> redisterVegetation(
private static <F extends Feature<NoneFeatureConfiguration>> BCLFeature<F, NoneFeatureConfiguration> registerVegetation(
String name,
F feature,
int density
) {
return redisterVegetation(name, feature, NoneFeatureConfiguration.NONE, density);
return registerVegetation(name, feature, NoneFeatureConfiguration.NONE, density);
}
private static <F extends Feature<FC>, FC extends FeatureConfiguration> BCLFeature<F, FC> redisterVegetation(
private static <F extends Feature<FC>, FC extends FeatureConfiguration> BCLFeature<F, FC> registerVegetation(
String name,
F feature,
FC config,

View file

@ -12,9 +12,9 @@ import org.spongepowered.asm.mixin.injection.ModifyArg;
@Mixin(ModelBakery.class)
public abstract class ModelLoaderMixin {
//TODO: 1.19.3 validate that alternative chorus model is loaded
@ModifyArg(method = "loadModel", at = @At(value = "INVOKE", target = "Lnet/minecraft/resources/FileToIdConverter;idToFile(Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/resources/ResourceLocation;"))
public ResourceLocation be_switchModelOnLoad(ResourceLocation loc) {
//this should allways be a block state, as it is supplied a BLOCKSTATE_LISTER
if (GeneratorOptions.changeChorusPlant() && be_changeModel(loc)) {
String path = loc.getPath().replace("chorus", "custom_chorus");
return BetterEnd.makeID(path);
@ -25,8 +25,7 @@ public abstract class ModelLoaderMixin {
private boolean be_changeModel(ResourceLocation id) {
if (id.getNamespace().equals("minecraft")) {
if (id.getPath().contains("chorus") && !id.getPath().contains("custom_")) {
return true || id.getPath().startsWith("blockstates/");
return true;
}
return false;
}

View file

@ -91,7 +91,6 @@ public abstract class MusicTrackerMixin {
}
private boolean be_shouldChangeSound(Music musicSound) {
//TODO: 1.19.3 do we need this?
return currentMusic != null && !musicSound
.getEvent()
.value()

View file

@ -30,7 +30,6 @@ public class InfusionParticleType extends ParticleType<InfusionParticleType> imp
StringReader stringReader
) throws CommandSyntaxException {
stringReader.expect(' ');
//TODO: 1.19.3 check if this is the correct way to gte the HolderLookup, or if PaintedMountainPiece is correct
ItemParser.ItemResult itemResult = ItemParser.parseForItem(
BuiltInRegistries.ITEM.asLookup(),
stringReader

View file

@ -3,13 +3,12 @@ package org.betterx.betterend.world.structures.piece;
import org.betterx.bclib.util.MHelper;
import org.betterx.betterend.registry.EndStructures;
import org.betterx.betterend.util.GlobalState;
import org.betterx.worlds.together.world.event.WorldBootstrap;
import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockPos.MutableBlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.registries.Registries;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.NbtUtils;
@ -59,10 +58,7 @@ public class PaintedMountainPiece extends MountainPiece {
@Override
protected void fromNbt(CompoundTag tag) {
super.fromNbt(tag);
//TODO: 1.19.3 check if this is the correct way to gte the HolderLookup
final HolderLookup<Block> blockLookup = WorldBootstrap.getLastRegistryAccess()
.lookup(Registries.BLOCK)
.orElseThrow();
final HolderLookup<Block> blockLookup = BuiltInRegistries.BLOCK.asLookup();
ListTag slise = tag.getList("slises", 10);
slices = new BlockState[slise.size()];
for (int i = 0; i < slices.length; i++) {