mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-25 14:34:36 +00:00
Merge master
This commit is contained in:
commit
eaaa55fdb0
254 files changed
+8593
-1893
No files matched your search
@@ -217,33 +217,19 @@ public final class BotaniaAPI {
|
||||
addOreWeightNether("oreOnyx", 500); // SimpleOres 2
|
||||
addOreWeightNether("oreHaditeCoal", 500); // Hadite
|
||||
|
||||
registerModWiki("Minecraft", new SimpleWikiProvider("Minecraft Wiki", "http://minecraft.gamepedia.com/%s"));
|
||||
registerModWiki("minecraft", new SimpleWikiProvider("Minecraft Wiki", "https://minecraft.gamepedia.com/%s"));
|
||||
|
||||
IWikiProvider technicWiki = new SimpleWikiProvider("Technic Wiki", "http://wiki.technicpack.net/%s");
|
||||
IWikiProvider mekanismWiki = new SimpleWikiProvider("Mekanism Wiki", "http://wiki.aidancbrady.com/wiki/%s");
|
||||
IWikiProvider buildcraftWiki = new SimpleWikiProvider("BuildCraft Wiki", "http://www.mod-buildcraft.com/wiki/doku.php?id=%s");
|
||||
|
||||
registerModWiki("Mekanism", mekanismWiki);
|
||||
registerModWiki("MekanismGenerators", mekanismWiki);
|
||||
registerModWiki("MekanismTools", mekanismWiki);
|
||||
registerModWiki("EnderIO", new SimpleWikiProvider("EnderIO Wiki", "http://wiki.enderio.com/%s"));
|
||||
registerModWiki("TropiCraft", new SimpleWikiProvider("Tropicraft Wiki", "http://wiki.tropicraft.net/wiki/%s"));
|
||||
registerModWiki("RandomThings", new SimpleWikiProvider("Random Things Wiki", "http://randomthingsminecraftmod.wikispaces.com/%s"));
|
||||
registerModWiki("Witchery", new SimpleWikiProvider("Witchery Wiki", "https://sites.google.com/site/witcherymod/%s", "-", true));
|
||||
registerModWiki("AppliedEnergistics2", new SimpleWikiProvider("AE2 Wiki", "http://ae-mod.info/%s"));
|
||||
registerModWiki("BigReactors", technicWiki);
|
||||
registerModWiki("BuildCraft|Core", buildcraftWiki);
|
||||
registerModWiki("BuildCraft|Builders", buildcraftWiki);
|
||||
registerModWiki("BuildCraft|Energy", buildcraftWiki);
|
||||
registerModWiki("BuildCraft|Factory", buildcraftWiki);
|
||||
registerModWiki("BuildCraft|Silicon", buildcraftWiki);
|
||||
registerModWiki("BuildCraft|Transport", buildcraftWiki);
|
||||
registerModWiki("ArsMagica2", new SimpleWikiProvider("ArsMagica2 Wiki", "http://wiki.arsmagicamod.com/wiki/%s"));
|
||||
registerModWiki("PneumaticCraft", new SimpleWikiProvider("PneumaticCraft Wiki", "http://www.minemaarten.com/wikis/pneumaticcraft-wiki/pneumaticcraft-wiki-%s"));
|
||||
registerModWiki("StevesCarts2", new SimpleWikiProvider("Steve's Carts Wiki", "http://stevescarts2.wikispaces.com/%s"));
|
||||
registerModWiki("GanysSurface", new SimpleWikiProvider("Gany's Surface Wiki", "http://ganys-surface.wikia.com/wiki/%s"));
|
||||
registerModWiki("GanysNether", new SimpleWikiProvider("Gany's Nether Wiki", "http://ganys-nether.wikia.com/wiki/%s"));
|
||||
registerModWiki("GanysEnd", new SimpleWikiProvider("Gany's End Wiki", "http://ganys-end.wikia.com/wiki/%s"));
|
||||
registerModWiki("mekanism", mekanismWiki);
|
||||
registerModWiki("mekanismgenerators", mekanismWiki);
|
||||
registerModWiki("mekanismtools", mekanismWiki);
|
||||
registerModWiki("enderio", new SimpleWikiProvider("EnderIO Wiki", "http://wiki.enderio.com/%s"));
|
||||
registerModWiki("tropicraft", new SimpleWikiProvider("Tropicraft Wiki", "http://wiki.tropicraft.net/wiki/%s"));
|
||||
registerModWiki("randomthings", new SimpleWikiProvider("Random Things Wiki", "https://lumien.net/rtwiki/blocks/%s/", "-", true));
|
||||
registerModWiki("appliedenergistics2", new SimpleWikiProvider("AE2 Wiki", "http://ae-mod.info/%s"));
|
||||
registerModWiki("bigreactors", technicWiki);
|
||||
|
||||
registerPaintableBlock(Blocks.STAINED_GLASS, BlockStainedGlass.COLOR);
|
||||
registerPaintableBlock(Blocks.STAINED_GLASS_PANE, BlockStainedGlassPane.COLOR);
|
||||
@@ -673,11 +659,11 @@ public final class BotaniaAPI {
|
||||
if(stack.isEmpty())
|
||||
return "";
|
||||
|
||||
return "i_" + stack.getItem().getUnlocalizedName() + "@" + stack.getItemDamage();
|
||||
return "i_" + stack.getItem().getTranslationKey() + "@" + stack.getItemDamage();
|
||||
}
|
||||
|
||||
private static String getMagnetKey(Block block, int meta) {
|
||||
return "bm_" + block.getUnlocalizedName() + "@" + meta;
|
||||
return "bm_" + block.getTranslationKey() + "@" + meta;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public final class BotaniaAPIClient {
|
||||
* @param model A path to a blockstate json and variant to be used the block. The item model will be drawn from the same blockstate json, from variant "inventory"
|
||||
*/
|
||||
public static void registerSubtileModel(ResourceLocation subTileName, ModelResourceLocation model) {
|
||||
registerSubtileModel(subTileName, model, new ModelResourceLocation(model.getResourceDomain() + ":" + model.getResourcePath(), "inventory"));
|
||||
registerSubtileModel(subTileName, model, new ModelResourceLocation(model.getNamespace() + ":" + model.getPath(), "inventory"));
|
||||
}
|
||||
|
||||
// Convenience overloads for the above two calls
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
@@ -297,4 +298,13 @@ public final class CorporeaHelper {
|
||||
public static String stripControlCodes(String str) {
|
||||
return patternControlCode.matcher(str).replaceAll("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the comparator strength for a corporea request that corporea crystal cubes and retainers use, following the usual "each step up requires double the items" formula.
|
||||
*/
|
||||
public static int signalStrengthForRequestSize(int requestSize) {
|
||||
if(requestSize <= 0) return 0;
|
||||
else if (requestSize >= 16384) return 15;
|
||||
else return Math.min(15, MathHelper.log2(requestSize) + 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* This class was created by <quaternary>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
*/
|
||||
package vazkii.botania.api.corporea;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* CorporeaIndexRequestEvent is fired when a player attempts to request an item from a corporea index.
|
||||
* If the event is cancelled, the request will not be performed.
|
||||
* */
|
||||
@Cancelable
|
||||
public class CorporeaIndexRequestEvent extends Event {
|
||||
public final EntityPlayerMP requester;
|
||||
public String request;
|
||||
public int requestCount;
|
||||
public ICorporeaSpark indexSpark;
|
||||
|
||||
public CorporeaIndexRequestEvent(EntityPlayerMP requester, String request, int requestCount, ICorporeaSpark indexSpark) {
|
||||
this.requester = requester;
|
||||
this.request = request;
|
||||
this.requestCount = requestCount;
|
||||
this.indexSpark = indexSpark;
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public final class LexiconRecipeMappings {
|
||||
if(stack.hasTagCompound() && stack.getItem() instanceof IRecipeKeyProvider)
|
||||
return ((IRecipeKeyProvider) stack.getItem()).getKey(stack);
|
||||
|
||||
return stack.getUnlocalizedName() + (forceIgnore || ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
|
||||
return stack.getTranslationKey() + (forceIgnore || ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
|
||||
}
|
||||
|
||||
public static boolean ignoreMeta(ItemStack stack) {
|
||||
|
||||
@@ -299,7 +299,7 @@ public final class ManaItemHandler {
|
||||
* @return The amount of mana received from the request.
|
||||
*/
|
||||
public static int requestManaForTool(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
|
||||
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player));
|
||||
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player, stack));
|
||||
int cost = (int) (manaToGet * multiplier);
|
||||
return (int) (requestMana(stack, player, cost, remove) / multiplier);
|
||||
}
|
||||
@@ -313,7 +313,7 @@ public final class ManaItemHandler {
|
||||
* @return If the request was succesful.
|
||||
*/
|
||||
public static boolean requestManaExactForTool(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
|
||||
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player));
|
||||
float multiplier = Math.max(0F, 1F - getFullDiscountForTools(player, stack));
|
||||
int cost = (int) (manaToGet * multiplier);
|
||||
return requestManaExact(stack, player, cost, remove);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@API(owner = "botania", apiVersion = "89", provides = "BotaniaAPI")
|
||||
@API(owner = "botania", apiVersion = "92", provides = "BotaniaAPI")
|
||||
package vazkii.botania.api;
|
||||
import net.minecraftforge.fml.common.API;
|
||||
|
||||
@@ -14,12 +14,17 @@ import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.item.IPetalApothecary;
|
||||
|
||||
/**
|
||||
* Have an Item implement this to allow it to be used in the Petal Apothecary.
|
||||
* An Item or Block that implements this interface can have a special particle color in the Petal Apothecary.
|
||||
* TODO (breaking change): Rename to something more like "ISpecialApothecary", since now all items can go in the Apothecary
|
||||
*/
|
||||
public interface IFlowerComponent {
|
||||
|
||||
public boolean canFit(ItemStack stack, IPetalApothecary apothecary);
|
||||
|
||||
//TODO remove 1.13, unused, all items can go in the Petal Apothecary
|
||||
@Deprecated
|
||||
public default boolean canFit(ItemStack stack, IPetalApothecary apothecary) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getParticleColor(ItemStack stack);
|
||||
|
||||
}
|
||||
@@ -55,14 +55,9 @@ public class RecipeBrew {
|
||||
for(int j = 0; j < inputsMissing.size(); j++) {
|
||||
Object input = inputsMissing.get(j);
|
||||
if(input instanceof String) {
|
||||
List<ItemStack> validStacks = OreDictionary.getOres((String) input);
|
||||
boolean found = false;
|
||||
for(ItemStack ostack : validStacks) {
|
||||
ItemStack cstack = ostack.copy();
|
||||
if(cstack.getItemDamage() == Short.MAX_VALUE)
|
||||
cstack.setItemDamage(stack.getItemDamage());
|
||||
|
||||
if(stack.isItemEqual(cstack)) {
|
||||
for(ItemStack ostack : OreDictionary.getOres((String) input, false)) {
|
||||
if(OreDictionary.itemMatches(ostack, stack, false)) {
|
||||
oredictIndex = j;
|
||||
found = true;
|
||||
break;
|
||||
|
||||
@@ -44,11 +44,7 @@ public class RecipeElvenTrade {
|
||||
List<ItemStack> validStacks = OreDictionary.getOres((String) input);
|
||||
boolean found = false;
|
||||
for(ItemStack ostack : validStacks) {
|
||||
ItemStack cstack = ostack.copy();
|
||||
if(cstack.getItemDamage() == Short.MAX_VALUE)
|
||||
cstack.setItemDamage(stack.getItemDamage());
|
||||
|
||||
if(stack.isItemEqual(cstack)) {
|
||||
if(OreDictionary.itemMatches(ostack, stack, false)) {
|
||||
if(!stacksToRemove.contains(stack))
|
||||
stacksToRemove.add(stack);
|
||||
oredictIndex = j;
|
||||
|
||||
@@ -35,22 +35,12 @@ public class RecipeManaInfusion {
|
||||
|
||||
public boolean matches(ItemStack stack) {
|
||||
if(input instanceof ItemStack) {
|
||||
ItemStack inputCopy = ((ItemStack) input).copy();
|
||||
if(inputCopy.getItemDamage() == Short.MAX_VALUE)
|
||||
inputCopy.setItemDamage(stack.getItemDamage());
|
||||
|
||||
return stack.isItemEqual(inputCopy);
|
||||
return OreDictionary.itemMatches((ItemStack) input, stack, false);
|
||||
}
|
||||
|
||||
if(input instanceof String) {
|
||||
List<ItemStack> validStacks = OreDictionary.getOres((String) input);
|
||||
|
||||
for(ItemStack ostack : validStacks) {
|
||||
ItemStack cstack = ostack.copy();
|
||||
if(cstack.getItemDamage() == Short.MAX_VALUE)
|
||||
cstack.setItemDamage(stack.getItemDamage());
|
||||
|
||||
if(stack.isItemEqual(cstack))
|
||||
for(ItemStack ostack : OreDictionary.getOres((String) input, false)) {
|
||||
if(OreDictionary.itemMatches(ostack, stack, false))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ package vazkii.botania.api.recipe;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
@@ -49,14 +50,9 @@ public class RecipePetals {
|
||||
for(int j = 0; j < inputsMissing.size(); j++) {
|
||||
Object input = inputsMissing.get(j);
|
||||
if(input instanceof String) {
|
||||
List<ItemStack> validStacks = OreDictionary.getOres((String) input);
|
||||
boolean found = false;
|
||||
for(ItemStack ostack : validStacks) {
|
||||
ItemStack cstack = ostack.copy();
|
||||
if(cstack.getItemDamage() == Short.MAX_VALUE)
|
||||
cstack.setItemDamage(stack.getItemDamage());
|
||||
|
||||
if(stack.isItemEqual(cstack)) {
|
||||
for(ItemStack ostack : OreDictionary.getOres((String) input, false)) {
|
||||
if(OreDictionary.itemMatches(ostack, stack, false)) {
|
||||
oredictIndex = j;
|
||||
found = true;
|
||||
break;
|
||||
@@ -66,7 +62,7 @@ public class RecipePetals {
|
||||
|
||||
if(found)
|
||||
break;
|
||||
} else if(input instanceof ItemStack && simpleAreStacksEqual((ItemStack) input, stack)) {
|
||||
} else if(input instanceof ItemStack && compareStacks((ItemStack) input, stack)) {
|
||||
stackIndex = j;
|
||||
break;
|
||||
}
|
||||
@@ -82,8 +78,20 @@ public class RecipePetals {
|
||||
return inputsMissing.isEmpty();
|
||||
}
|
||||
|
||||
private boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) {
|
||||
return stack.getItem() == stack2.getItem() && stack.getItemDamage() == stack2.getItemDamage();
|
||||
private boolean compareStacks(ItemStack recipe, ItemStack supplied) {
|
||||
if(recipe.getItem() == supplied.getItem() && recipe.getItemDamage() == supplied.getItemDamage()) {
|
||||
//check that the user supplied nbt tag is a superset of the recipe item nbt tag
|
||||
//if the recipe doesn't have an NBT tag, the user supplied one doesn't matter, it is a superset
|
||||
if(!recipe.hasTagCompound()) return true;
|
||||
//if the recipe does have an NBT tag but the user supplied doesn't, also no way it's a superset
|
||||
if(!supplied.hasTagCompound()) return false;
|
||||
|
||||
NBTTagCompound mergedNBT = supplied.getTagCompound().copy();
|
||||
mergedNBT.merge(recipe.getTagCompound());
|
||||
return supplied.getTagCompound().equals(mergedNBT);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<Object> getInputs() {
|
||||
|
||||
@@ -26,7 +26,6 @@ import java.util.Map;
|
||||
public class RecipePureDaisy {
|
||||
|
||||
public static final int DEFAULT_TIME = 150;
|
||||
private static final Map<String, List<ItemStack>> oreMap = new HashMap<>();
|
||||
|
||||
private final Object input;
|
||||
private final IBlockState outputState;
|
||||
@@ -64,21 +63,10 @@ public class RecipePureDaisy {
|
||||
if(stack.isEmpty())
|
||||
return false;
|
||||
|
||||
List<ItemStack> ores;
|
||||
if(oreMap.containsKey(entry))
|
||||
ores = oreMap.get(entry);
|
||||
else {
|
||||
ores = OreDictionary.getOres(entry);
|
||||
oreMap.put(entry, ores);
|
||||
}
|
||||
|
||||
for(ItemStack ostack : ores) {
|
||||
ItemStack cstack = ostack.copy();
|
||||
if(cstack.getItemDamage() == Short.MAX_VALUE)
|
||||
cstack.setItemDamage(stack.getItemDamage());
|
||||
|
||||
if(stack.isItemEqual(cstack))
|
||||
for(ItemStack ostack : OreDictionary.getOres(entry, false)) {
|
||||
if(OreDictionary.itemMatches(ostack, stack, false)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -38,6 +39,7 @@ import java.util.List;
|
||||
* a no parameter constructor.
|
||||
*/
|
||||
public class SubTileEntity {
|
||||
public static final ResourceLocation DING_SOUND_EVENT = new ResourceLocation("botania", "ding");
|
||||
|
||||
protected TileEntity supertile;
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.internal.IManaNetwork;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
import vazkii.botania.common.core.handler.ModSounds;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
@@ -137,7 +137,9 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
return false;
|
||||
|
||||
knownMana = mana;
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.ding, SoundCategory.PLAYERS, 0.1F, 1F);
|
||||
SoundEvent evt = ForgeRegistries.SOUND_EVENTS.getValue(DING_SOUND_EVENT);
|
||||
if(evt != null)
|
||||
player.playSound(evt, 0.1F, 1F);
|
||||
|
||||
return super.onWanded(player, wand);
|
||||
}
|
||||
|
||||
@@ -22,15 +22,16 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.internal.IManaNetwork;
|
||||
import vazkii.botania.api.mana.IManaCollector;
|
||||
import vazkii.botania.common.core.handler.ModSounds;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.List;
|
||||
@@ -94,8 +95,13 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
if(supertile.getWorld().isRemote) {
|
||||
double particleChance = 1F - (double) mana / (double) getMaxMana() / 3.5F;
|
||||
Color color = new Color(getColor());
|
||||
if(Math.random() > particleChance)
|
||||
BotaniaAPI.internalHandler.sparkleFX(supertile.getWorld(), supertile.getPos().getX() + 0.3 + Math.random() * 0.5, supertile.getPos().getY() + 0.5 + Math.random() * 0.5, supertile.getPos().getZ() + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5);
|
||||
if(Math.random() > particleChance) {
|
||||
Vec3d offset = getWorld().getBlockState(getPos()).getOffset(getWorld(), getPos());
|
||||
double x = getPos().getX() + offset.x;
|
||||
double y = getPos().getY() + offset.y;
|
||||
double z = getPos().getZ() + offset.z;
|
||||
BotaniaAPI.internalHandler.sparkleFX(supertile.getWorld(), x + 0.3 + Math.random() * 0.5, y + 0.5 + Math.random() * 0.5, z + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5);
|
||||
}
|
||||
}
|
||||
|
||||
boolean passive = isPassiveFlower();
|
||||
@@ -224,7 +230,9 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
sync();
|
||||
|
||||
knownMana = mana;
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.ding, SoundCategory.PLAYERS, 0.1F, 1F);
|
||||
SoundEvent evt = ForgeRegistries.SOUND_EVENTS.getValue(DING_SOUND_EVENT);
|
||||
if(evt != null)
|
||||
player.playSound(evt, 0.1F, 1F);
|
||||
|
||||
return super.onWanded(player, wand);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ import java.util.Map;
|
||||
|
||||
public class WikiHooks {
|
||||
|
||||
private static final IWikiProvider FALLBACK_PROVIDER = new SimpleWikiProvider("FTB Wiki", "http://ftb.gamepedia.com/%s");
|
||||
private static final IWikiProvider FALLBACK_PROVIDER = new SimpleWikiProvider("FTB Wiki", "https://ftb.gamepedia.com/%s");
|
||||
|
||||
private static final Map<String, IWikiProvider> modWikis = new HashMap<>();
|
||||
|
||||
public static IWikiProvider getWikiFor(Block block) {
|
||||
ResourceLocation mod = Block.REGISTRY.getNameForObject(block);
|
||||
return getWikiFor(mod == null ? "" : mod.getResourceDomain().toLowerCase());
|
||||
return getWikiFor(mod == null ? "" : mod.getNamespace().toLowerCase());
|
||||
}
|
||||
|
||||
public static IWikiProvider getWikiFor(String mod) {
|
||||
|
||||
Reference in new issue
Block a user