Compare commits

..
Author SHA1 Message Date
Caedis 56f2ec4e3e Fix NPE when stacking TT slabs (#120) 2026-11-27 22:47:32 -06:00
boubou19andNikolay S. 7d6b1b5844 Fix packets (#114) (#117)
Co-authored-by: Nikolay S. <[email protected]>
2026-11-20 02:08:13 +01:00
boubou19andgorbit99 09c34dac6c Fix talisman of remedium deleting other baubles (#113) (#116)
Co-authored-by: gorbit99 <[email protected]>
2026-11-20 02:05:44 +01:00
UltraProdigy 2ce5306ce8 ci: run build and test on release branches 2026-11-09 00:56:28 -05:00
3 changed files with 16 additions and 31 deletions

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
dependencies {
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.25-GTNH:dev')
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false}
api('com.github.GTNewHorizons:Applied-Energistics-2-NH:1.0.2:api')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-999-GTNH:api')
api('com.github.GTNewHorizons:ThaumicBoots:1.5.13:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:Botania:1.13.39-GTNH:dev') {transitive=false}
@@ -9,8 +9,6 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.registry.GameRegistry;
/**
* Created by pixlepix on 3/31/14.
* <p/>
@@ -99,7 +97,7 @@ public enum EnumOreFrequency {
for (EnumOreFrequency e : getValidOres()) {
randInt -= e.freq;
if (randInt < 0) {
return e.getOre();
return OreDictionary.getOres(e.name).get(0);
}
}
return new ItemStack(Blocks.iron_ore);
@@ -107,17 +105,6 @@ public enum EnumOreFrequency {
public boolean isValid() {
return !Arrays.asList(OreClusterGenerator.blacklist).contains(name) && !OreDictionary.getOres(name).isEmpty()
&& getOre().getItem() instanceof ItemBlock;
}
/// The ore block generated for this name: MaterialLib's when it registers one, since other mods' ore blocks
/// under the same name are copies of it, else the first block registered.
private ItemStack getOre() {
ArrayList<ItemStack> ores = OreDictionary.getOres(name);
for (ItemStack ore : ores) {
GameRegistry.UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor(ore.getItem());
if (id != null && "materiallib".equals(id.modId) && ore.getItem() instanceof ItemBlock) return ore;
}
return ores.get(0);
&& OreDictionary.getOres(name).get(0).getItem() instanceof ItemBlock;
}
}
@@ -116,14 +116,6 @@ public class TTRegistry {
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorSword());
loadSimpleItem(new thaumic.tinkerer.common.item.kami.tool.ItemIchorSwordAdv());
loadSimpleItem(new thaumic.tinkerer.common.item.quartz.ItemDarkQuartz());
for (Item[] itemArrayList : itemRegistry.values()) {
for (Item item : itemArrayList) {
if (!(item instanceof ItemBlock)) {
GameRegistry.registerItem(item, ((ITTinkererItem) item).getItemName());
}
}
}
}
public void init() {
@@ -131,9 +123,13 @@ public class TTRegistry {
for (Item item : itemArrayList) {
registerRecipe((ITTinkererRegisterable) item);
if (!(item instanceof ItemBlock) && ((ITTinkererItem) item).shouldDisplayInTab()
&& FMLCommonHandler.instance().getSide() == Side.CLIENT) {
ModCreativeTab.INSTANCE.addItem(item);
if (!(item instanceof ItemBlock)) {
GameRegistry.registerItem(item, ((ITTinkererItem) item).getItemName());
if (((ITTinkererItem) item).shouldDisplayInTab()
&& FMLCommonHandler.instance().getSide() == Side.CLIENT) {
ModCreativeTab.INSTANCE.addItem(item);
}
}
}
}
@@ -198,13 +194,15 @@ public class TTRegistry {
blockRegistry.put(newBlock.getClass(), blockList);
blockList[0] = newBlock;
// Fill list before registering, ItemBlock constructors read it
int index = 1;
for (Block metaBlock : metaBlocks) {
metaBlock.setBlockName(((ITTinkererBlock) metaBlock).getBlockName());
blockList[index++] = metaBlock;
}
registerBlock(newBlock, ittBlock);
for (Block metaBlock : metaBlocks) {
ITTinkererBlock metaIttBlock = (ITTinkererBlock) metaBlock;
metaBlock.setBlockName(metaIttBlock.getBlockName());
blockList[index++] = metaBlock;
registerBlock(metaBlock, metaIttBlock);
registerBlock(metaBlock, (ITTinkererBlock) metaBlock);
}
Class<? extends ItemBlock> itemBlock = ittBlock.getItemBlock();