Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Jan 27, 2025
2 parents 02a229b + d3e1187 commit 41847e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Add your dependencies here

dependencies {
api("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.99:dev")
api("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.101:dev")
api("com.github.GTNewHorizons:Yamcl:0.6.0:dev")
api("com.github.GTNewHorizons:Baubles:1.0.4:dev")

implementation("com.github.GTNewHorizons:GTNHLib:0.6.5:dev")
implementation("com.github.GTNewHorizons:GTNHLib:0.6.6:dev")

compileOnly("com.github.GTNewHorizons:AkashicTome:1.2.0:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Avaritia:1.59:dev") { transitive = false }
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/com/dreammaster/tinkersConstruct/TiCoLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,19 @@ private static void registerAluminumBrassPosteaTransformers() {
private static void convertAluminumBrassBlock() {
String targetBlock = "TConstruct:MetalBlock";
ItemStack brassBlock = GTOreDictUnificator.get(OrePrefixes.block, Materials.Brass, 1L);
int brassBlockId = Item.getIdFromItem(brassBlock.getItem());
int brassBlockMeta = Items.feather.getDamage(brassBlock);
BlockReplacementManager.addBlockReplacement(targetBlock, (blockConversionInfoOld, world) -> {
if (blockConversionInfoOld.metadata == 7) {
BlockConversionInfo blockConversionInfoNew = new BlockConversionInfo();
blockConversionInfoNew.blockID = brassBlockId;
blockConversionInfoNew.blockID = Item.getIdFromItem(brassBlock.getItem());
blockConversionInfoNew.metadata = brassBlockMeta;
return blockConversionInfoNew;
}
return null;
});
ItemStackReplacementManager.addItemReplacement(targetBlock, tag -> {
if (tag.getShort("Damage") == 7) {
tag.setShort("id", (short) brassBlockId);
tag.setShort("id", (short) Item.getIdFromItem(brassBlock.getItem()));
tag.setShort("Damage", (short) brassBlockMeta);
return tag;
}
Expand Down Expand Up @@ -156,15 +155,14 @@ private static void convertAluminumBrassSingularity() {

private static void registerGravelOrePosteaTransformers() {
String targetBlock = "TConstruct:GravelOre";
int zincGravelOreId = Block.getIdFromBlock(NHItems.ZINC_GRAVEL_ORE);
BlockReplacementManager.addBlockReplacement(targetBlock, (blockConversionInfoOld, world) -> {
BlockConversionInfo blockConversionInfoNew = new BlockConversionInfo();
blockConversionInfoNew.blockID = zincGravelOreId;
blockConversionInfoNew.blockID = Block.getIdFromBlock(NHItems.ZINC_GRAVEL_ORE);
blockConversionInfoNew.metadata = 0;
return blockConversionInfoNew;
});
ItemStackReplacementManager.addItemReplacement(targetBlock, tag -> {
tag.setShort("id", (short) zincGravelOreId);
tag.setShort("id", (short) Block.getIdFromBlock(NHItems.ZINC_GRAVEL_ORE));
tag.setShort("Damage", (short) 0);
return tag;
});
Expand Down

0 comments on commit 41847e8

Please sign in to comment.