1.15.2 - mainly mapping updates. Will be backwards compatible with 1.15.1 and 1.15
This commit is contained in:
parent
a543a562b2
commit
1202a1c588
7 changed files with 23 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,4 +134,9 @@ public abstract class BaseDynamicFluidBakedModel implements BakedModel, FabricBa
|
|||
return ModelItemPropertyOverrideList.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean method_24304() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue