mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-10-26 14:24:22 +00:00
Tweak mossy apothecary break texture, fix lexicon crash again
This commit is contained in:
1 parent
2ab491867e
commit
512884729e
5 files changed
+15
-13
No files matched your search
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.api.wiki;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -23,16 +24,16 @@ public interface IWikiProvider {
|
||||
/**
|
||||
* Gets the name of the block being looked at for display.
|
||||
*/
|
||||
public String getBlockName(World world, MovingObjectPosition pos);
|
||||
public String getBlockName(World world, MovingObjectPosition pos, EntityPlayer player);
|
||||
|
||||
/**
|
||||
* Gets the URL to open when the block is clicked.
|
||||
*/
|
||||
public String getWikiURL(World world, MovingObjectPosition pos);
|
||||
public String getWikiURL(World world, MovingObjectPosition pos, EntityPlayer player);
|
||||
|
||||
/**
|
||||
* Gets the name of the wiki for display.
|
||||
*/
|
||||
public String getWikiName(World world, MovingObjectPosition pos);
|
||||
public String getWikiName(World world, MovingObjectPosition pos, EntityPlayer player);
|
||||
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.api.wiki;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@@ -46,14 +47,14 @@ public class SimpleWikiProvider implements IWikiProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName(World world, MovingObjectPosition pos) {
|
||||
public String getBlockName(World world, MovingObjectPosition pos, EntityPlayer player) {
|
||||
BlockPos bPos = pos.getBlockPos();
|
||||
|
||||
Block block = world.getBlockState(bPos).getBlock();
|
||||
if(block == null)
|
||||
return null;
|
||||
|
||||
ItemStack stack = block.getPickBlock(pos, world, bPos, null);
|
||||
ItemStack stack = block.getPickBlock(pos, world, bPos, player);
|
||||
|
||||
if(stack == null || stack.getItem() == null)
|
||||
stack = new ItemStack(block, 1, block.getDamageValue(world, bPos));
|
||||
@@ -69,8 +70,8 @@ public class SimpleWikiProvider implements IWikiProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getWikiURL(World world, MovingObjectPosition pos) {
|
||||
String name = getBlockName(world, pos);
|
||||
public String getWikiURL(World world, MovingObjectPosition pos, EntityPlayer player) {
|
||||
String name = getBlockName(world, pos, player);
|
||||
if(name == null)
|
||||
return null;
|
||||
|
||||
@@ -82,7 +83,7 @@ public class SimpleWikiProvider implements IWikiProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getWikiName(World world, MovingObjectPosition pos) {
|
||||
public String getWikiName(World world, MovingObjectPosition pos, EntityPlayer player) {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@@ -363,10 +363,10 @@ public final class HUDHandler {
|
||||
profiler.startSection("wikiLookup");
|
||||
if(!block.isAir(mc.theWorld, pos.getBlockPos()) && !(block instanceof BlockLiquid)) {
|
||||
IWikiProvider provider = WikiHooks.getWikiFor(block);
|
||||
String url = provider.getWikiURL(mc.theWorld, pos);
|
||||
String url = provider.getWikiURL(mc.theWorld, pos, mc.thePlayer);
|
||||
if(url != null && !url.isEmpty()) {
|
||||
String name = provider.getBlockName(mc.theWorld, pos);
|
||||
String wikiName = provider.getWikiName(mc.theWorld, pos);
|
||||
String name = provider.getBlockName(mc.theWorld, pos, mc.thePlayer);
|
||||
String wikiName = provider.getWikiName(mc.theWorld, pos, mc.thePlayer);
|
||||
drawStr = name + " @ " + EnumChatFormatting.AQUA + wikiName;
|
||||
draw = true;
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ public class ClientProxy extends CommonProxy {
|
||||
@Override
|
||||
public boolean openWikiPage(World world, Block block, MovingObjectPosition pos) {
|
||||
IWikiProvider wiki = WikiHooks.getWikiFor(block);
|
||||
String url = wiki.getWikiURL(world, pos);
|
||||
String url = wiki.getWikiURL(world, pos, Minecraft.getMinecraft().thePlayer);
|
||||
if(url != null && !url.isEmpty()) {
|
||||
try {
|
||||
Desktop.getDesktop().browse(new URI(url));
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
"kelkbase2top": "botania:model/altar/mossy/kelkBase2_top",
|
||||
"kelkbase2bottom": "botania:model/altar/mossy/kelkBase2_bottom",
|
||||
"kelkwall": "botania:model/altar/mossy/kelkWall",
|
||||
"particle": "minecraft:blocks/cobblestone"
|
||||
"particle": "minecraft:blocks/cobblestone_mossy"
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user