Skip to content

Commit

Permalink
InfusionStabiliser update (#77)
Browse files Browse the repository at this point in the history
* InfusionStabiliser update

* Undo BlockTFFireflyJar.java InfusionStabiliser
  • Loading branch information
zhehedream authored Jun 27, 2024
1 parent 7be0500 commit e9b7151
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/main/java/twilightforest/block/BlockTFTrophy.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumcraft.api.crafting.IInfusionStabiliser;
import twilightforest.item.TFItems;
import twilightforest.tileentity.TileEntityTFTrophy;

/**
* Head trophy similar to (and based partially on) BlockSkull
*
*/
public class BlockTFTrophy extends BlockContainer {
@Optional.Interface(iface = "thaumcraft.api.crafting.IInfusionStabiliser", modid = "Thaumcraft")
public class BlockTFTrophy extends BlockContainer implements IInfusionStabiliser {

public BlockTFTrophy() {
super(Material.circuits);
Expand Down Expand Up @@ -212,4 +215,9 @@ public void registerBlockIcons(IIconRegister par1IconRegister) {
// don't load anything
}

@Override
public boolean canStabaliseInfusion(World world, int x, int y, int z) {
return true;
}

}
10 changes: 9 additions & 1 deletion src/main/java/twilightforest/block/BlockTFTrophyPedestal.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumcraft.api.crafting.IInfusionStabiliser;
import twilightforest.TFAchievementPage;
import twilightforest.TwilightForestMod;
import twilightforest.item.TFItems;

public class BlockTFTrophyPedestal extends Block {
@Optional.Interface(iface = "thaumcraft.api.crafting.IInfusionStabiliser", modid = "Thaumcraft")
public class BlockTFTrophyPedestal extends Block implements IInfusionStabiliser {

private IIcon sprTopActive;
private IIcon sprTop;
Expand Down Expand Up @@ -363,4 +366,9 @@ public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World
}
}

@Override
public boolean canStabaliseInfusion(World world, int x, int y, int z) {
return true;
}

}

0 comments on commit e9b7151

Please sign in to comment.