Tag migration
This commit is contained in:
parent
92a392cffe
commit
a390486d5b
76 changed files with 224 additions and 164 deletions
|
@ -27,7 +27,7 @@ public class BYGIntegration extends ModIntegration implements EndBiomeIntegratio
|
|||
public void init() {
|
||||
Block block = Integrations.BYG.getBlock("ivis_phylium");
|
||||
if (block != null) {
|
||||
TagAPI.addTags(block, TagAPI.END_GROUND, TagAPI.GEN_TERRAIN);
|
||||
TagAPI.addTags(block, TagAPI.BLOCK_END_GROUND, TagAPI.BLOCK_GEN_TERRAIN);
|
||||
}
|
||||
BYGBlocks.register();
|
||||
BYGFeatures.register();
|
||||
|
|
|
@ -24,7 +24,7 @@ public class BigEtherTreeFeature extends DefaultFeature {
|
|||
final Random random = featureConfig.random();
|
||||
final BlockPos pos = featureConfig.origin();
|
||||
final WorldGenLevel world = featureConfig.level();
|
||||
if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false;
|
||||
if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false;
|
||||
|
||||
BlockState log = Integrations.BYG.getDefaultState("ether_log");
|
||||
BlockState wood = Integrations.BYG.getDefaultState("ether_wood");
|
||||
|
@ -32,7 +32,7 @@ public class BigEtherTreeFeature extends DefaultFeature {
|
|||
return log;
|
||||
};
|
||||
Function<BlockState, Boolean> replace = (state) -> {
|
||||
return state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial()
|
||||
return state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial()
|
||||
.isReplaceable();
|
||||
};
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class BigEtherTreeFeature extends DefaultFeature {
|
|||
}
|
||||
|
||||
sdf.setReplaceFunction((state) -> {
|
||||
return state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial()
|
||||
return state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial()
|
||||
.isReplaceable();
|
||||
}).addPostProcess((info) -> {
|
||||
if (info.getState().equals(log) && (!info.getStateUp().equals(log) || !info.getStateDown().equals(log))) {
|
||||
|
|
|
@ -38,7 +38,7 @@ public class NightshadeRedwoodTreeFeature extends DefaultFeature {
|
|||
final Random random = featureConfig.random();
|
||||
final BlockPos pos = featureConfig.origin();
|
||||
final WorldGenLevel world = featureConfig.level();
|
||||
if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false;
|
||||
if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false;
|
||||
|
||||
BlockState log = Integrations.BYG.getDefaultState("nightshade_log");
|
||||
BlockState wood = Integrations.BYG.getDefaultState("nightshade_wood");
|
||||
|
@ -49,7 +49,7 @@ public class NightshadeRedwoodTreeFeature extends DefaultFeature {
|
|||
return log;
|
||||
};
|
||||
Function<BlockState, Boolean> replace = (state) -> {
|
||||
return state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial()
|
||||
return state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial()
|
||||
.isReplaceable();
|
||||
};
|
||||
Function<PosInfo, BlockState> post = (info) -> {
|
||||
|
|
|
@ -39,8 +39,8 @@ public class OldBulbisTreeFeature extends DefaultFeature {
|
|||
final Random random = featureConfig.random();
|
||||
final BlockPos pos = featureConfig.origin();
|
||||
final WorldGenLevel world = featureConfig.level();
|
||||
if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false;
|
||||
if (!world.getBlockState(pos.below(4)).is(TagAPI.GEN_TERRAIN)) return false;
|
||||
if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false;
|
||||
if (!world.getBlockState(pos.below(4)).is(TagAPI.BLOCK_GEN_TERRAIN)) return false;
|
||||
|
||||
BlockState stem = Integrations.BYG.getDefaultState("bulbis_stem");
|
||||
BlockState wood = Integrations.BYG.getDefaultState("bulbis_wood");
|
||||
|
@ -48,7 +48,7 @@ public class OldBulbisTreeFeature extends DefaultFeature {
|
|||
BlockState glow = Integrations.BYG.getDefaultState("purple_shroomlight");
|
||||
|
||||
Function<BlockState, Boolean> replacement = (state) -> {
|
||||
if (state.equals(stem) || state.equals(wood) || state.is(TagAPI.END_GROUND) || state.getMaterial()
|
||||
if (state.equals(stem) || state.equals(wood) || state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial()
|
||||
.equals(Material.PLANT)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class OldBulbisTreeFeature extends DefaultFeature {
|
|||
SplineHelper.rotateSpline(branch, angle);
|
||||
SplineHelper.scale(branch, scale);
|
||||
Vector3f last = branch.get(branch.size() - 1);
|
||||
if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.GEN_TERRAIN)) {
|
||||
if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.BLOCK_GEN_TERRAIN)) {
|
||||
SplineHelper.fillSpline(branch, world, wood, pos, replacement);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,12 +72,12 @@ public class REIPlugin implements REIClientPlugin {
|
|||
.filter(EndAnvilBlock.class::isInstance)
|
||||
.collect(Collectors.toList())));
|
||||
anvils.add(0, EntryStacks.of(Blocks.ANVIL));
|
||||
List<EntryStack<?>> furnaces = Lists.newArrayList(EntryIngredients.ofItems(EndBlocks.getModBlocks()
|
||||
List<EntryStack<?>> ITEM_FURNACES = Lists.newArrayList(EntryIngredients.ofItems(EndBlocks.getModBlocks()
|
||||
.stream()
|
||||
.filter(BaseFurnaceBlock.class::isInstance)
|
||||
.collect(Collectors.toList())));
|
||||
EntryStack<?>[] anvilsArray = anvils.toArray(new EntryStack[0]);
|
||||
EntryStack<?>[] furnacesArray = furnaces.toArray(new EntryStack[0]);
|
||||
EntryStack<?>[] ITEM_FURNACESArray = ITEM_FURNACES.toArray(new EntryStack[0]);
|
||||
|
||||
registry.add(
|
||||
new REIAlloyingFuelCategory(),
|
||||
|
@ -93,7 +93,7 @@ public class REIPlugin implements REIClientPlugin {
|
|||
registry.removePlusButton(ALLOYING_FUEL);
|
||||
registry.removePlusButton(SMITHING);
|
||||
|
||||
registry.addWorkstations(DefaultPlugin.SMELTING, furnacesArray);
|
||||
registry.addWorkstations(DefaultPlugin.FUEL, furnacesArray);
|
||||
registry.addWorkstations(DefaultPlugin.SMELTING, ITEM_FURNACESArray);
|
||||
registry.addWorkstations(DefaultPlugin.FUEL, ITEM_FURNACESArray);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue