1.15.2 - mainly mapping updates. Will be backwards compatible with 1.15.1 and 1.15

This commit is contained in:
modmuss50 2020-01-15 12:07:52 +00:00
parent a543a562b2
commit 1202a1c588
7 changed files with 23 additions and 12 deletions

View file

@ -61,12 +61,12 @@ license {
group = 'TechReborn'
dependencies {
minecraft "com.mojang:minecraft:1.15.1"
mappings "net.fabricmc:yarn:1.15.1+build.24:v2"
modImplementation "net.fabricmc:fabric-loader:0.7.3+build.176"
minecraft "com.mojang:minecraft:1.15.2-pre1"
mappings "net.fabricmc:yarn:1.15.2-pre1+build.1:v2"
modImplementation "net.fabricmc:fabric-loader:0.7.4+build.177"
//Fabric api
modImplementation "net.fabricmc.fabric-api:fabric-api:0.4.27+build.286-1.15"
modImplementation "net.fabricmc.fabric-api:fabric-api:0.4.28+build.288-1.15"
optionalDependency ("me.shedaniel:RoughlyEnoughItems:3.2.31")
optionalDependency ('io.github.cottonmc:LibCD:2.0.1+1.15')

View file

@ -73,7 +73,7 @@ public class DataDrivenBEProvider extends BlockEntityType<DataDrivenBEProvider.D
}
Identifier id = new Identifier(JsonHelper.getString(jsonObject, "name"));
DataDrivenBEProvider provider = new DataDrivenBEProvider(block, jsonObject);
Registry.register(Registry.BLOCK_ENTITY, id, provider);
Registry.register(Registry.BLOCK_ENTITY_TYPE, id, provider);
return provider;
}

View file

@ -134,4 +134,9 @@ public abstract class BaseDynamicFluidBakedModel implements BakedModel, FabricBa
return ModelItemPropertyOverrideList.EMPTY;
}
@Override
public boolean method_24304() {
return false;
}
}

View file

@ -161,7 +161,7 @@ public class TRBlockEntities {
public static <T extends BlockEntity> BlockEntityType<T> register(String id, BlockEntityType.Builder<T> builder) {
BlockEntityType<T> blockEntityType = builder.build(null);
Registry.register(Registry.BLOCK_ENTITY, new Identifier(id), blockEntityType);
Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(id), blockEntityType);
TRBlockEntities.TYPES.add(blockEntityType);
return blockEntityType;
}

View file

@ -117,7 +117,7 @@ public class FrequencyTransmitterItem extends Item {
tooltip.add(new LiteralText(Formatting.GRAY + "X: " + Formatting.GOLD + x));
tooltip.add(new LiteralText(Formatting.GRAY + "Y: " + Formatting.GOLD + y));
tooltip.add(new LiteralText(Formatting.GRAY + "Z: " + Formatting.GOLD + z));
tooltip.add(new LiteralText(Formatting.DARK_GRAY + getDimName(Registry.DIMENSION.get(dim)).toString()));
tooltip.add(new LiteralText(Formatting.DARK_GRAY + getDimName(Registry.DIMENSION_TYPE.get(dim)).toString()));
} else {
tooltip.add(new LiteralText(Formatting.GRAY + StringUtils.t("techreborn.message.noCoordsSet")));
@ -125,7 +125,7 @@ public class FrequencyTransmitterItem extends Item {
}
private static Identifier getDimName(DimensionType type){
return Registry.DIMENSION.getId(type);
return Registry.DIMENSION_TYPE.getId(type);
}
public static class StackInfoFreqTransmitter extends StackInfoElement {
@ -144,7 +144,7 @@ public class FrequencyTransmitterItem extends Item {
int coordY = stack.getTag().getInt("y");
int coordZ = stack.getTag().getInt("z");
int coordDim = stack.getTag().getInt("dim");
text = grey + "X: " + gold + coordX + grey + " Y: " + gold + coordY + grey + " Z: " + gold + coordZ + grey + " Dim: " + gold + getDimName(Registry.DIMENSION.get(coordDim)).toString() + " (" + coordDim + ")";
text = grey + "X: " + gold + coordX + grey + " Y: " + gold + coordY + grey + " Z: " + gold + coordZ + grey + " Dim: " + gold + getDimName(Registry.DIMENSION_TYPE.get(coordDim)).toString() + " (" + coordDim + ")";
} else {
text = grey + StringUtils.t("techreborn.message.noCoordsSet");
}

View file

@ -32,10 +32,16 @@ import java.util.Random;
public class RubberSaplingGenerator extends SaplingGenerator {
//TODO remove with 1.16, backwards compat for 1.15/1.15.1
@Nullable
@Override
protected ConfiguredFeature<BranchedTreeFeatureConfig, ?> createTreeFeature(Random random) {
return WorldGenerator.RUBBER_TREE.configure(WorldGenerator.RUBBER_TREE_CONFIG);
return createTreeFeature(random, false);
}
//1.15.2 method
@Nullable
@Override
protected ConfiguredFeature<BranchedTreeFeatureConfig, ?> createTreeFeature(Random random, boolean bl) {
return WorldGenerator.RUBBER_TREE.configure(WorldGenerator.RUBBER_TREE_CONFIG);
}
}

View file

@ -75,7 +75,7 @@ public class WorldGenerator {
}
private static void setupTrees() {
RUBBER_TREE = Registry.register(Registry.FEATURE, new Identifier("techreborn:rubber_tree"), new RubberTreeFeature(BranchedTreeFeatureConfig::deserialize2));
RUBBER_TREE = Registry.register(Registry.FEATURE, new Identifier("techreborn:rubber_tree"), new RubberTreeFeature(BranchedTreeFeatureConfig::deserialize));
WeightedStateProvider logProvider = new WeightedStateProvider();
logProvider.addState(TRContent.RUBBER_LOG.getDefaultState(), 10);