mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-16 10:34:40 +00:00
Update forge/mappings/thaumcraft
This commit is contained in:
1 parent
5393a5202a
commit
fb8ebd8ca7
113 files changed
+179
-185
No files matched your search
+1
-1
@@ -94,7 +94,7 @@ dependencies {
|
||||
deobfCompile "com.mod-buildcraft:buildcraft-api:7.99.17"
|
||||
deobfCompile "com.azanor.baubles:Baubles:1.12-1.5.2"
|
||||
deobfCompile "mezz.jei:jei_1.12.2:4.13.1.220"
|
||||
deobfCompile "thaumcraft:Thaumcraft:1.12.2:6.1.BETA21"
|
||||
deobfCompile "thaumcraft:Thaumcraft:1.12.2:6.1.BETA26"
|
||||
|
||||
//and a bit more for SCP
|
||||
sshAntTask "org.apache.ant:ant-jsch:1.7.1", "jsch:jsch:0.1.29"
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
#Fri Nov 30 05:12:11 GMT 2018
|
||||
mod_name=Botania
|
||||
cf_meta_version=1.12.2
|
||||
forge_version=14.23.4.2705
|
||||
forge_version=14.23.5.2768
|
||||
dir_repo=./
|
||||
mc_mappings=snapshot_20171217
|
||||
mc_mappings=stable_39
|
||||
version=r1.10
|
||||
dir_output=../Build Output/Botania/
|
||||
mc_version=1.12.2
|
||||
|
||||
@@ -660,11 +660,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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -56,7 +56,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(String 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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -24,7 +24,7 @@ public class WikiHooks {
|
||||
|
||||
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) {
|
||||
|
||||
@@ -85,7 +85,7 @@ public final class HUDHandler {
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public static void onDrawScreenPre(RenderGameOverlayEvent.Pre event) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Profiler profiler = mc.mcProfiler;
|
||||
Profiler profiler = mc.profiler;
|
||||
|
||||
if(event.getType() == ElementType.HEALTH) {
|
||||
profiler.startSection("botania-hud");
|
||||
@@ -117,7 +117,7 @@ public final class HUDHandler {
|
||||
@SubscribeEvent
|
||||
public static void onDrawScreenPost(RenderGameOverlayEvent.Post event) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Profiler profiler = mc.mcProfiler;
|
||||
Profiler profiler = mc.profiler;
|
||||
ItemStack main = mc.player.getHeldItemMainhand();
|
||||
ItemStack offhand = mc.player.getHeldItemOffhand();
|
||||
|
||||
@@ -262,7 +262,7 @@ public final class HUDHandler {
|
||||
|
||||
private static void renderWandModeDisplay(ItemStack stack, ScaledResolution res) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Profiler profiler = mc.mcProfiler;
|
||||
Profiler profiler = mc.profiler;
|
||||
|
||||
profiler.startSection("wandMode");
|
||||
int ticks = mc.ingameGUI.remainingHighlightTicks;
|
||||
@@ -314,7 +314,7 @@ public final class HUDHandler {
|
||||
|
||||
private static void renderPoolRecipeHUD(ScaledResolution res, TilePool tile, ItemStack stack) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Profiler profiler = mc.mcProfiler;
|
||||
Profiler profiler = mc.profiler;
|
||||
|
||||
profiler.startSection("poolRecipe");
|
||||
RecipeManaInfusion recipe = TilePool.getMatchingRecipe(stack, tile.getWorld().getBlockState(tile.getPos().down()));
|
||||
@@ -346,7 +346,7 @@ public final class HUDHandler {
|
||||
|
||||
private static void renderCrystalCubeHUD(ScaledResolution res, TileCorporeaCrystalCube tile) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Profiler profiler = mc.mcProfiler;
|
||||
Profiler profiler = mc.profiler;
|
||||
|
||||
profiler.startSection("crystalCube");
|
||||
ItemStack target = tile.getRequestTarget();
|
||||
@@ -373,7 +373,7 @@ public final class HUDHandler {
|
||||
private static void drawLexiconHUD(ItemStack stack, IBlockState state, RayTraceResult pos, ScaledResolution res) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Block block = state.getBlock();
|
||||
Profiler profiler = mc.mcProfiler;
|
||||
Profiler profiler = mc.profiler;
|
||||
|
||||
profiler.startSection("lexicon");
|
||||
FontRenderer font = mc.fontRenderer;
|
||||
|
||||
@@ -111,7 +111,7 @@ public final class ItemsRemainingRenderHandler {
|
||||
int count = 0;
|
||||
for(int i = 0; i < player.inventory.getSizeInventory(); i++) {
|
||||
ItemStack stack = player.inventory.getStackInSlot(i);
|
||||
if(!stack.isEmpty() && pattern.matcher(stack.getUnlocalizedName()).find())
|
||||
if(!stack.isEmpty() && pattern.matcher(stack.getTranslationKey()).find())
|
||||
count += stack.getCount();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class LightningHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onRenderWorldLast(RenderWorldLastEvent event) {
|
||||
Profiler profiler = Minecraft.getMinecraft().mcProfiler;
|
||||
Profiler profiler = Minecraft.getMinecraft().profiler;
|
||||
|
||||
profiler.startSection("botania-particles");
|
||||
ParticleRenderDispatcher.dispatch();
|
||||
|
||||
@@ -136,7 +136,7 @@ public final class ModelHandler {
|
||||
}
|
||||
|
||||
public static void registerItemAllMeta(Item item, int range) {
|
||||
registerItemMetas(item, range, i -> item.getRegistryName().getResourcePath());
|
||||
registerItemMetas(item, range, i -> item.getRegistryName().getPath());
|
||||
}
|
||||
|
||||
public static void registerItemAppendMeta(Item item, int maxExclusive, String loc) {
|
||||
|
||||
@@ -106,9 +106,9 @@ public final class RedStringRenderer {
|
||||
double freq = 20;
|
||||
double ampl = (0.15 * (Math.sin(l * 2F) * 0.5 + 0.5) + 0.1) * sizeAlpha;
|
||||
double randMul = 0.05;
|
||||
double x = xpos + Math.sin(l * freq) * ampl * Math.abs(Math.abs(dir.getFrontOffsetX()) - 1) + rand * randMul;
|
||||
double y = ypos + Math.cos(l * freq) * ampl * Math.abs(Math.abs(dir.getFrontOffsetY()) - 1) + rand * randMul;
|
||||
double z = zpos + (dir.getFrontOffsetY() == 0 ? Math.sin(l * freq) : Math.cos(l * freq)) * ampl * Math.abs(Math.abs(dir.getFrontOffsetZ()) - 1) + rand * randMul;
|
||||
double x = xpos + Math.sin(l * freq) * ampl * Math.abs(Math.abs(dir.getXOffset()) - 1) + rand * randMul;
|
||||
double y = ypos + Math.cos(l * freq) * ampl * Math.abs(Math.abs(dir.getYOffset()) - 1) + rand * randMul;
|
||||
double z = zpos + (dir.getYOffset() == 0 ? Math.sin(l * freq) : Math.cos(l * freq)) * ampl * Math.abs(Math.abs(dir.getZOffset()) - 1) + rand * randMul;
|
||||
|
||||
tess.getBuffer().pos(x, y, z).endVertex();
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public class ClientProxy implements IProxy {
|
||||
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
PersistentVariableHelper.setCacheFile(new File(Minecraft.getMinecraft().mcDataDir, "BotaniaVars.dat"));
|
||||
PersistentVariableHelper.setCacheFile(new File(Minecraft.getMinecraft().gameDir, "BotaniaVars.dat"));
|
||||
try {
|
||||
PersistentVariableHelper.load();
|
||||
PersistentVariableHelper.save();
|
||||
|
||||
@@ -30,7 +30,7 @@ public final class ParticleRenderDispatcher {
|
||||
public static void dispatch() {
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
|
||||
Profiler profiler = Minecraft.getMinecraft().mcProfiler;
|
||||
Profiler profiler = Minecraft.getMinecraft().profiler;
|
||||
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GlStateManager.depthMask(false);
|
||||
|
||||
@@ -134,10 +134,10 @@ public class SpecialFlowerModel implements IModel {
|
||||
|
||||
@Override
|
||||
public boolean accepts(ResourceLocation modelLocation) {
|
||||
return modelLocation.getResourceDomain().equals("botania_special") && (
|
||||
modelLocation.getResourcePath().equals("specialflower") ||
|
||||
modelLocation.getResourcePath().equals("models/block/specialflower") ||
|
||||
modelLocation.getResourcePath().equals("models/item/specialflower"));
|
||||
return modelLocation.getNamespace().equals("botania_special") && (
|
||||
modelLocation.getPath().equals("specialflower") ||
|
||||
modelLocation.getPath().equals("models/block/specialflower") ||
|
||||
modelLocation.getPath().equals("models/item/specialflower"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,7 @@ public class RenderTileGaiaHead extends TileEntitySkullRenderer {
|
||||
|
||||
// Null-safe copy of super
|
||||
renderSkull((float)x, (float)y, (float)z,
|
||||
skull == null ? EnumFacing.NORTH : EnumFacing.getFront(skull.getBlockMetadata() & 7),
|
||||
skull == null ? EnumFacing.NORTH : EnumFacing.byIndex(skull.getBlockMetadata() & 7),
|
||||
skull == null ? 0 : skull.getSkullRotation() * 360 / 16.0F,
|
||||
3, null, digProgress, partialTicks);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public class BlockAltar extends BlockMod implements ILexiconable {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class BlockAltar extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity) {
|
||||
public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity entity) {
|
||||
if(!world.isRemote && entity instanceof EntityItem) {
|
||||
TileAltar tile = (TileAltar) world.getTileEntity(pos);
|
||||
if(tile.collideEntityItem((EntityItem) entity))
|
||||
|
||||
@@ -151,12 +151,12 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockDestroyedByPlayer(World world, BlockPos pos, IBlockState state) {
|
||||
public void onPlayerDestroy(World world, BlockPos pos, IBlockState state) {
|
||||
// TE is already gone so best we can do is just notify everyone
|
||||
for(EnumFacing side : EnumFacing.VALUES) {
|
||||
world.notifyNeighborsOfStateChange(pos.offset(side), this, false);
|
||||
}
|
||||
super.onBlockDestroyedByPlayer(world, pos, state);
|
||||
super.onPlayerDestroy(world, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -83,7 +83,7 @@ public class BlockAvatar extends BlockMod implements ILexiconable {
|
||||
if (meta < 2 || meta > 5) {
|
||||
meta = 2;
|
||||
}
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.getFront(meta));
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.byIndex(meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -72,7 +72,7 @@ public class BlockBifrostPerm extends BlockMod implements ILexiconable {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class BlockCacophonium extends BlockMod {
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(pos) > 0 || world.isBlockIndirectlyGettingPowered(pos.up()) > 0;
|
||||
boolean power = world.getRedstonePowerFromNeighbors(pos) > 0 || world.getRedstonePowerFromNeighbors(pos.up()) > 0;
|
||||
boolean powered = state.getValue(BotaniaStateProps.POWERED);
|
||||
|
||||
if(power && !powered) {
|
||||
|
||||
@@ -73,7 +73,7 @@ public class BlockCocoon extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity e) {
|
||||
public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity e) {
|
||||
if(!world.isRemote && e instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) e;
|
||||
ItemStack stack = item.getItem();
|
||||
@@ -87,8 +87,6 @@ public class BlockCocoon extends BlockMod implements ILexiconable {
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing s, float xs, float ys, float zs) {
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
Item item = stack.getItem();
|
||||
|
||||
return addStack(world, pos, stack, player.capabilities.isCreativeMode);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable {
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.getHorizontal(meta));
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.byHorizontalIndex(meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public class BlockGaiaHead extends BlockSkull implements IModelRegister {
|
||||
|
||||
public BlockGaiaHead() {
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.GAIA_HEAD));
|
||||
setUnlocalizedName(LibBlockNames.GAIA_HEAD);
|
||||
setTranslationKey(LibBlockNames.GAIA_HEAD);
|
||||
setHardness(1.0F);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class BlockGhostRail extends BlockRailBase implements ILexiconable, IMode
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.RAIL_DIRECTION, EnumRailDirection.NORTH_SOUTH));
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.GHOST_RAIL));
|
||||
setUnlocalizedName(LibBlockNames.GHOST_RAIL);
|
||||
setTranslationKey(LibBlockNames.GHOST_RAIL);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -66,7 +66,7 @@ public class BlockIncensePlate extends BlockMod implements ILexiconable {
|
||||
if (meta < 2 || meta > 5) {
|
||||
meta = 2;
|
||||
}
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.getFront(meta));
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.byIndex(meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -89,7 +89,7 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(pos) > 0|| world.isBlockIndirectlyGettingPowered(pos.up()) > 0;
|
||||
boolean power = world.getRedstonePowerFromNeighbors(pos) > 0|| world.getRedstonePowerFromNeighbors(pos.up()) > 0;
|
||||
boolean powered = state.getValue(BotaniaStateProps.POWERED);
|
||||
|
||||
if(power && !powered) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public abstract class BlockMod extends Block implements IModelRegister {
|
||||
|
||||
public BlockMod(Material par2Material, String name) {
|
||||
super(par2Material);
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
if(registerInCreative())
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class BlockModDoubleFlower extends BlockDoublePlant implements I
|
||||
String name = LibBlockNames.DOUBLE_FLOWER + (second ? 2 : 1);
|
||||
setDefaultState(pickDefaultState());
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
setHardness(0F);
|
||||
setTickRandomly(false);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class BlockModFlower extends BlockFlower implements ILexiconable, IGrowab
|
||||
}
|
||||
|
||||
protected BlockModFlower(String name) {
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.COLOR, EnumDyeColor.WHITE).withProperty(type, EnumFlowerType.POPPY));
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setHardness(0F);
|
||||
|
||||
@@ -221,7 +221,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
|
||||
world.setBlockState(pos.offset(dir), ModBlocks.pistonRelay.getDefaultState());
|
||||
else if(!world.isRemote) {
|
||||
ItemStack stack = new ItemStack(ModBlocks.pistonRelay);
|
||||
world.spawnEntity(new EntityItem(world, x + dir.getFrontOffsetX(), y + dir.getFrontOffsetY(), z + dir.getFrontOffsetZ(), stack));
|
||||
world.spawnEntity(new EntityItem(world, x + dir.getXOffset(), y + dir.getYOffset(), z + dir.getZOffset(), stack));
|
||||
}
|
||||
checkedCoords.add(s);
|
||||
newPos = new DimWithPos(world.provider.getDimension(), pos.offset(dir));
|
||||
@@ -237,7 +237,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
|
||||
TileEntity tile = world.getTileEntity(pos2);
|
||||
Material mat = srcState.getMaterial();
|
||||
|
||||
if(!sticky && tile == null && mat.getMobilityFlag() == EnumPushReaction.NORMAL && srcState.getBlockHardness(world, pos2) != -1 && !srcState.getBlock().isAir(srcState, world, pos2)) {
|
||||
if(!sticky && tile == null && mat.getPushReaction() == EnumPushReaction.NORMAL && srcState.getBlockHardness(world, pos2) != -1 && !srcState.getBlock().isAir(srcState, world, pos2)) {
|
||||
Material destMat = world.getBlockState(pos2.offset(dir)).getMaterial();
|
||||
if(world.isAirBlock(pos2.offset(dir)) || destMat.isReplaceable()) {
|
||||
world.setBlockState(pos2, Blocks.AIR.getDefaultState());
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BlockSolidVines extends BlockVine implements ILexiconable {
|
||||
|
||||
public BlockSolidVines() {
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.SOLID_VINE));
|
||||
setUnlocalizedName(LibBlockNames.SOLID_VINE);
|
||||
setTranslationKey(LibBlockNames.SOLID_VINE);
|
||||
setHardness(0.5F);
|
||||
setSoundType(SoundType.PLANT);
|
||||
setCreativeTab(null);
|
||||
|
||||
@@ -90,7 +90,7 @@ public class BlockSparkChanger extends BlockMod implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(pos) > 0 || world.isBlockIndirectlyGettingPowered(pos.up()) > 0;
|
||||
boolean power = world.getRedstonePowerFromNeighbors(pos) > 0 || world.getRedstonePowerFromNeighbors(pos.up()) > 0;
|
||||
boolean powered = state.getValue(BotaniaStateProps.POWERED);
|
||||
|
||||
if(power && !powered) {
|
||||
|
||||
@@ -121,7 +121,7 @@ public class BlockSpecialFlower extends BlockFlower implements ISpecialFlower, I
|
||||
protected BlockSpecialFlower() {
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.COLOR, EnumDyeColor.WHITE).withProperty(type, EnumFlowerType.POPPY));
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.SPECIAL_FLOWER));
|
||||
setUnlocalizedName(LibBlockNames.SPECIAL_FLOWER);
|
||||
setTranslationKey(LibBlockNames.SPECIAL_FLOWER);
|
||||
setHardness(0.1F);
|
||||
setSoundType(SoundType.PLANT);
|
||||
setTickRandomly(false);
|
||||
|
||||
@@ -54,7 +54,7 @@ public class BlockTeruTeruBozu extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity e) {
|
||||
public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity e) {
|
||||
if(!world.isRemote && e instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) e;
|
||||
ItemStack stack = item.getItem();
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BlockCorporeaFunnel extends BlockCorporeaBase implements ILexiconab
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(pos) > 0 || world.isBlockIndirectlyGettingPowered(pos.up()) > 0;
|
||||
boolean power = world.getRedstonePowerFromNeighbors(pos) > 0 || world.getRedstonePowerFromNeighbors(pos.up()) > 0;
|
||||
boolean powered = state.getValue(BotaniaStateProps.POWERED);
|
||||
|
||||
if(power && !powered) {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class BlockCorporeaRetainer extends BlockMod implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(pos) > 0 || world.isBlockIndirectlyGettingPowered(pos.up()) > 0;
|
||||
boolean power = world.getRedstonePowerFromNeighbors(pos) > 0 || world.getRedstonePowerFromNeighbors(pos.up()) > 0;
|
||||
boolean powered = state.getValue(BotaniaStateProps.POWERED);
|
||||
|
||||
if(power && !powered) {
|
||||
|
||||
@@ -92,8 +92,9 @@ public class BlockFloatingFlower extends BlockMod implements ILexiconable, IInfu
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class BlockManaGlass extends BlockMod implements ILexiconable {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class BlockModMushroom extends BlockMushroom implements IInfusionStabilis
|
||||
|
||||
public BlockModMushroom() {
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.MUSHROOM));
|
||||
setUnlocalizedName(LibBlockNames.MUSHROOM);
|
||||
setTranslationKey(LibBlockNames.MUSHROOM);
|
||||
setLightLevel(0.2F);
|
||||
setHardness(0F);
|
||||
setSoundType(SoundType.PLANT);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BlockStarfield extends BlockMod implements ILexiconable {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class BlockAlfglassPane extends BlockModPane {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class BlockBifrostPane extends BlockModPane {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class BlockManaglassPane extends BlockModPane {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nonnull
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ public class BlockModPane extends BlockPane implements IModelRegister {
|
||||
public BlockModPane(Block source) {
|
||||
super(Material.GLASS, false);
|
||||
// Backward compat don't kill me
|
||||
String name = source.getUnlocalizedName().replaceAll("tile.", "") + "Pane";
|
||||
String name = source.getTranslationKey().replaceAll("tile.", "") + "Pane";
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setHardness(0.3F);
|
||||
setSoundType(SoundType.GLASS);
|
||||
|
||||
@@ -7,7 +7,7 @@ public abstract class BlockLivingSlab extends BlockModSlab {
|
||||
final IBlockState sourceState;
|
||||
|
||||
public BlockLivingSlab(boolean full, IBlockState state) {
|
||||
super(full, state.getMaterial(), state.getBlock().getUnlocalizedName().replaceAll("tile.", "") + state.getBlock().getMetaFromState(state) + "Slab" + (full ? "Full" : ""));
|
||||
super(full, state.getMaterial(), state.getBlock().getTranslationKey().replaceAll("tile.", "") + state.getBlock().getMetaFromState(state) + "Slab" + (full ? "Full" : ""));
|
||||
setSoundType(state.getBlock().getSoundType());
|
||||
sourceState = state;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public abstract class BlockModSlab extends BlockSlab implements ILexiconable, IM
|
||||
public BlockModSlab(boolean full, Material mat, String name) {
|
||||
super(mat);
|
||||
this.name = name;
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
doubleSlab = full;
|
||||
if(!full) {
|
||||
@@ -101,7 +101,7 @@ public abstract class BlockModSlab extends BlockSlab implements ILexiconable, IM
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(int i) {
|
||||
public String getTranslationKey(int i) {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.block.state.IBlockState;
|
||||
public class BlockLivingStairs extends BlockModStairs {
|
||||
|
||||
public BlockLivingStairs(IBlockState state) {
|
||||
super(state, state.getBlock().getUnlocalizedName().replaceAll("tile.", "") + state.getBlock().getMetaFromState(state) + "Stairs");
|
||||
super(state, state.getBlock().getTranslationKey().replaceAll("tile.", "") + state.getBlock().getMetaFromState(state) + "Stairs");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,7 +24,7 @@ public class BlockModStairs extends BlockStairs implements ILexiconable, IModelR
|
||||
public BlockModStairs(IBlockState state, String name) {
|
||||
super(state);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
useNeighborBrightness = true;
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ public abstract class BlockModWall extends BlockWall implements ILexiconable, IM
|
||||
public BlockModWall(Block block, int meta) {
|
||||
super(block);
|
||||
// For backward compat don't kill me
|
||||
String name = block.getUnlocalizedName().replaceAll("tile.", "") + meta + "Wall";
|
||||
String name = block.getTranslationKey().replaceAll("tile.", "") + meta + "Wall";
|
||||
setRegistryName(name);
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
setDefaultState(pickDefaultState());
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ public class BehaviourPoolMinecart extends BehaviorDefaultDispenseItem {
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack) {
|
||||
World world = source.getWorld();
|
||||
EnumFacing enumfacing = world.getBlockState(source.getBlockPos()).getValue(BlockDispenser.FACING);
|
||||
double d0 = source.getX() + enumfacing.getFrontOffsetX() * 1.125F;
|
||||
double d1 = source.getY() + enumfacing.getFrontOffsetY() * 1.125F;
|
||||
double d2 = source.getZ() + enumfacing.getFrontOffsetZ() * 1.125F;
|
||||
double d0 = source.getX() + enumfacing.getXOffset() * 1.125F;
|
||||
double d1 = source.getY() + enumfacing.getYOffset() * 1.125F;
|
||||
double d2 = source.getZ() + enumfacing.getZOffset() * 1.125F;
|
||||
BlockPos pos = source.getBlockPos().offset(enumfacing);
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
double d3;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class BlockBellows extends BlockMod implements ILexiconable {
|
||||
if (meta < 2 || meta > 5) {
|
||||
meta = 2;
|
||||
}
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.getFront(meta));
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.byIndex(meta));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -154,10 +154,10 @@ public class BlockPool extends BlockMod implements IWandHUD, IWandable, ILexicon
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity par5Entity) {
|
||||
if(par5Entity instanceof EntityItem) {
|
||||
public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity entity) {
|
||||
if(entity instanceof EntityItem) {
|
||||
TilePool tile = (TilePool) world.getTileEntity(pos);
|
||||
if(tile.collideEntityItem((EntityItem) par5Entity))
|
||||
if(tile.collideEntityItem((EntityItem) entity))
|
||||
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(world, pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class BlockPrism extends BlockMod implements IManaTrigger, ILexiconable,
|
||||
@Nonnull
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ public class BlockPrism extends BlockMod implements IManaTrigger, ILexiconable,
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(pos) > 0 || world.isBlockIndirectlyGettingPowered(pos.up()) > 0;
|
||||
boolean power = world.getRedstonePowerFromNeighbors(pos) > 0 || world.getRedstonePowerFromNeighbors(pos.up()) > 0;
|
||||
boolean powered = state.getValue(BotaniaStateProps.POWERED);
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class BlockPump extends BlockMod implements ILexiconable {
|
||||
if (meta < 2 || meta > 5) {
|
||||
meta = 2;
|
||||
}
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.getFront(meta));
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.byIndex(meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -60,7 +60,7 @@ public abstract class BlockRedString extends BlockMod implements ILexiconable {
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getDefaultState().withProperty(BotaniaStateProps.FACING, EnumFacing.getFront(meta));
|
||||
return getDefaultState().withProperty(BotaniaStateProps.FACING, EnumFacing.byIndex(meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,13 +56,13 @@ public class BlockRedStringDispenser extends BlockRedString {
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
boolean powered = (meta & 8) != 0;
|
||||
meta &= -9;
|
||||
EnumFacing facing = EnumFacing.getFront(meta);
|
||||
EnumFacing facing = EnumFacing.byIndex(meta);
|
||||
return getDefaultState().withProperty(BotaniaStateProps.FACING, facing).withProperty(BotaniaStateProps.POWERED, powered);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(pos) > 0 || world.isBlockIndirectlyGettingPowered(pos.up()) > 0;
|
||||
boolean power = world.getRedstonePowerFromNeighbors(pos) > 0 || world.getRedstonePowerFromNeighbors(pos.up()) > 0;
|
||||
boolean powered = state.getValue(BotaniaStateProps.POWERED);
|
||||
|
||||
if(power && !powered) {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class BlockRedStringInterceptor extends BlockRedString {
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
boolean powered = (meta & 8) != 0;
|
||||
meta &= -9;
|
||||
EnumFacing facing = EnumFacing.getFront(meta);
|
||||
EnumFacing facing = EnumFacing.byIndex(meta);
|
||||
return getDefaultState().withProperty(BotaniaStateProps.FACING, facing).withProperty(BotaniaStateProps.POWERED, powered);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
super.onUpdate();
|
||||
|
||||
if(supertile.getWorld().rand.nextInt(4) == 0)
|
||||
Botania.proxy.wispFX(supertile.getPos().getX() + Math.random(), supertile.getPos().getY() + Math.random(), supertile.getPos().getZ() + Math.random(), 0.05F, 0.05F, 0.05F, 0.25F + (float) Math.random() * 0.15F, orientation.getFrontOffsetX() * 0.1F, orientation.getFrontOffsetY() * 0.1F, orientation.getFrontOffsetZ() * 0.1F);
|
||||
Botania.proxy.wispFX(supertile.getPos().getX() + Math.random(), supertile.getPos().getY() + Math.random(), supertile.getPos().getZ() + Math.random(), 0.05F, 0.05F, 0.05F, 0.25F + (float) Math.random() * 0.15F, orientation.getXOffset() * 0.1F, orientation.getYOffset() * 0.1F, orientation.getZOffset() * 0.1F);
|
||||
|
||||
if(windTicks == 0 && mana > 0) {
|
||||
windTicks = 20;
|
||||
@@ -56,9 +56,9 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
int slowdown = getSlowdownFactor();
|
||||
for(EntityItem item : items) {
|
||||
if(!item.isDead && item.age >= slowdown) {
|
||||
item.motionX += orientation.getFrontOffsetX() * 0.05;
|
||||
item.motionY += orientation.getFrontOffsetY() * 0.05;
|
||||
item.motionZ += orientation.getFrontOffsetZ() * 0.05;
|
||||
item.motionX += orientation.getXOffset() * 0.05;
|
||||
item.motionY += orientation.getYOffset() * 0.05;
|
||||
item.motionZ += orientation.getZOffset() * 0.05;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,7 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
public void readFromPacketNBT(NBTTagCompound cmp) {
|
||||
super.readFromPacketNBT(cmp);
|
||||
|
||||
orientation = EnumFacing.getFront(cmp.getInteger(TAG_ORIENTATION) + 2); // retain compat with 1.7 saves
|
||||
orientation = EnumFacing.byIndex(cmp.getInteger(TAG_ORIENTATION) + 2); // retain compat with 1.7 saves
|
||||
windTicks = cmp.getInteger(TAG_WIND_TICKS);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
|
||||
if(getWorld().isRemote) {
|
||||
if(burnTime > 0 && supertile.getWorld().rand.nextInt(10) == 0) {
|
||||
Vec3d offset = getWorld().getBlockState(getPos()).getOffset(getWorld(), getPos()).addVector(0.4, 0.7, 0.4);
|
||||
Vec3d offset = getWorld().getBlockState(getPos()).getOffset(getWorld(), getPos()).add(0.4, 0.7, 0.4);
|
||||
supertile.getWorld().spawnParticle(EnumParticleTypes.FLAME, supertile.getPos().getX() + offset.x + Math.random() * 0.2, supertile.getPos().getY() + offset.y, supertile.getPos().getZ() + offset.z + Math.random() * 0.2, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
return;
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class SubTileGourmaryllis extends SubTileGenerating {
|
||||
} else if(cooldown % munchInterval == 0) {
|
||||
getWorld().playSound(null, supertile.getPos(), SoundEvents.ENTITY_GENERIC_EAT, SoundCategory.BLOCKS, 0.5f, 1);
|
||||
|
||||
Vec3d offset = getWorld().getBlockState(getPos()).getOffset(getWorld(), getPos()).addVector(0.4, 0.6, 0.4);
|
||||
Vec3d offset = getWorld().getBlockState(getPos()).getOffset(getWorld(), getPos()).add(0.4, 0.6, 0.4);
|
||||
|
||||
((WorldServer) supertile.getWorld()).spawnParticle(EnumParticleTypes.ITEM_CRACK, supertile.getPos().getX()+offset.x, supertile.getPos().getY()+offset.y, supertile.getPos().getZ()+offset.z, 10, 0.1D, 0.1D, 0.1D, 0.03D, Item.getIdFromItem(lastFood.getItem()), lastFood.getItemDamage());
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class SubTileNarslimmus extends SubTileGenerating {
|
||||
}
|
||||
|
||||
public static boolean isSlimeChunk(World world, int x, int z) {
|
||||
Chunk chunk = world.getChunkFromBlockCoords(new BlockPos(x, 0, z));
|
||||
Chunk chunk = world.getChunk(new BlockPos(x, 0, z));
|
||||
return chunk.getRandomWithSeed(987234911L).nextInt(10) == 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary,
|
||||
return true;
|
||||
}
|
||||
|
||||
if(SEED_PATTERN.matcher(stack.getUnlocalizedName()).find()) {
|
||||
if(SEED_PATTERN.matcher(stack.getTranslationKey()).find()) {
|
||||
for(RecipePetals recipe : BotaniaAPI.petalRecipes) {
|
||||
if(recipe.matches(itemHandler)) {
|
||||
saveLastRecipe();
|
||||
|
||||
@@ -395,7 +395,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHUD(Minecraft mc, ScaledResolution res) {
|
||||
ItemStack pool = new ItemStack(ModBlocks.pool, 1, world.getBlockState(getPos()).getValue(BotaniaStateProps.POOL_VARIANT).ordinal());
|
||||
String name = I18n.format(pool.getUnlocalizedName().replaceAll("tile.", "tile." + LibResources.PREFIX_MOD) + ".name");
|
||||
String name = I18n.format(pool.getTranslationKey().replaceAll("tile.", "tile." + LibResources.PREFIX_MOD) + ".name");
|
||||
int color = 0x4444FF;
|
||||
HUDHandler.drawSimpleManaHUD(color, knownMana, manaCap, name, res);
|
||||
|
||||
|
||||
@@ -566,13 +566,13 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
if(playerIn instanceof net.minecraft.entity.player.EntityPlayerMP) {
|
||||
d3 = ((net.minecraft.entity.player.EntityPlayerMP) playerIn).interactionManager.getBlockReachDistance();
|
||||
}
|
||||
Vec3d vec3d1 = vec3d.addVector((double) f6 * d3, (double) f5 * d3, (double) f7 * d3);
|
||||
Vec3d vec3d1 = vec3d.add((double) f6 * d3, (double) f5 * d3, (double) f7 * d3);
|
||||
return worldIn.rayTraceBlocks(vec3d, vec3d1, useLiquids, !useLiquids, false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHUD(Minecraft mc, ScaledResolution res) {
|
||||
String name = I18n.format(new ItemStack(ModBlocks.spreader, 1, world.getBlockState(getPos()).getValue(BotaniaStateProps.SPREADER_VARIANT).ordinal()).getUnlocalizedName().replaceAll("tile.", "tile." + LibResources.PREFIX_MOD) + ".name");
|
||||
String name = I18n.format(new ItemStack(ModBlocks.spreader, 1, world.getBlockState(getPos()).getValue(BotaniaStateProps.SPREADER_VARIANT).ordinal()).getTranslationKey().replaceAll("tile.", "tile." + LibResources.PREFIX_MOD) + ".name");
|
||||
int color = isRedstone() ? 0xFF0000 : isDreamwood() ? 0xFF00AE : 0x00FF00;
|
||||
HUDHandler.drawSimpleManaHUD(color, knownMana, getMaxMana(), name, res);
|
||||
|
||||
|
||||
@@ -38,15 +38,10 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
public ItemStack createIcon() {
|
||||
return new ItemStack(ModItems.lexicon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getTabIconItem() {
|
||||
return getIconItemStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSearchBar() {
|
||||
return true;
|
||||
|
||||
@@ -142,7 +142,7 @@ public class EntityThornChakram extends EntityThrowable {
|
||||
if(bounces < MAX_BOUNCES) {
|
||||
Vector3 currentMovementVec = new Vector3(motionX, motionY, motionZ);
|
||||
EnumFacing dir = pos.sideHit;
|
||||
Vector3 normalVector = new Vector3(dir.getFrontOffsetX(), dir.getFrontOffsetY(), dir.getFrontOffsetZ()).normalize();
|
||||
Vector3 normalVector = new Vector3(dir.getXOffset(), dir.getYOffset(), dir.getZOffset()).normalize();
|
||||
Vector3 movementVec = normalVector.multiply(-2 * currentMovementVec.dotProduct(normalVector)).add(currentMovementVec);
|
||||
|
||||
motionX = movementVec.x;
|
||||
|
||||
@@ -37,8 +37,8 @@ public class Item16Colors extends ItemMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return getUnlocalizedNameLazy(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return getUnlocalizedNameLazy(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -47,8 +47,8 @@ public class Item16Colors extends ItemMod {
|
||||
ModelHandler.registerItemAllMeta(this, EnumDyeColor.values().length);
|
||||
}
|
||||
|
||||
String getUnlocalizedNameLazy(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack);
|
||||
String getUnlocalizedNameLazy(ItemStack stack) {
|
||||
return super.getTranslationKey(stack);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -55,8 +55,8 @@ public class ItemAncientWill extends ItemMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -215,9 +215,9 @@ public class ItemAstrolabe extends ItemMod {
|
||||
for(int x = -xOff; x < xOff + 1; x++)
|
||||
for(int y = 0; y < yOff * 2 + 1; y++) {
|
||||
for(int z = -zOff; z < zOff + 1; z++) {
|
||||
int xp = pos.getX() + x + dir.getFrontOffsetX();
|
||||
int yp = pos.getY() + y + dir.getFrontOffsetY();
|
||||
int zp = pos.getZ() + z + dir.getFrontOffsetZ();
|
||||
int xp = pos.getX() + x + dir.getXOffset();
|
||||
int yp = pos.getY() + y + dir.getYOffset();
|
||||
int zp = pos.getZ() + z + dir.getZOffset();
|
||||
|
||||
BlockPos newPos = new BlockPos(xp, yp, zp);
|
||||
IBlockState state1 = player.world.getBlockState(newPos);
|
||||
|
||||
@@ -227,7 +227,7 @@ public class ItemBlackHoleTalisman extends ItemMod implements IBlockProvider {
|
||||
Block block = getBlock(par1ItemStack);
|
||||
if(block != null) {
|
||||
int count = getBlockCount(par1ItemStack);
|
||||
stacks.add(count + " " + I18n.format(new ItemStack(block, 1, getBlockMeta(par1ItemStack)).getUnlocalizedName() + ".name"));
|
||||
stacks.add(count + " " + I18n.format(new ItemStack(block, 1, getBlockMeta(par1ItemStack)).getTranslationKey() + ".name"));
|
||||
}
|
||||
|
||||
if(par1ItemStack.getItemDamage() == 1)
|
||||
|
||||
@@ -57,8 +57,8 @@ public class ItemBlackLotus extends ItemMod implements IManaDissolvable {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -68,8 +68,8 @@ public class ItemCorporeaSpark extends ItemMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -59,8 +59,8 @@ public class ItemCraftPattern extends ItemMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -68,8 +68,8 @@ public class ItemGrassHorn extends ItemMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -78,8 +78,8 @@ public class ItemGrassSeeds extends ItemMod implements IFloatingFlowerVariant {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName() + stack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ItemManaCookie extends ItemFood implements IModelRegister {
|
||||
setPotionEffect(new PotionEffect(MobEffects.SATURATION, 20, 0), 1F);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibItemNames.MANA_COOKIE));
|
||||
setUnlocalizedName(LibItemNames.MANA_COOKIE);
|
||||
setTranslationKey(LibItemNames.MANA_COOKIE);
|
||||
addPropertyOverride(new ResourceLocation(LibMisc.MOD_ID, "totalbiscuit"),
|
||||
(stack, worldIn, entityIn) -> stack.getDisplayName().toLowerCase(Locale.ROOT).contains("totalbiscuit") ? 1F : 0F);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public abstract class ItemMod extends Item implements IModelRegister {
|
||||
public ItemMod(String name) {
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -39,8 +39,8 @@ public class ItemSparkUpgrade extends ItemMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return getUnlocalizedNameLazy(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return getUnlocalizedNameLazy(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -49,7 +49,7 @@ public class ItemSparkUpgrade extends ItemMod {
|
||||
ModelHandler.registerItemAppendMeta(this, 4, LibItemNames.SPARK_UPGRADE);
|
||||
}
|
||||
|
||||
String getUnlocalizedNameLazy(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack);
|
||||
String getUnlocalizedNameLazy(ItemStack stack) {
|
||||
return super.getTranslationKey(stack);
|
||||
}
|
||||
}
|
||||
@@ -46,8 +46,8 @@ public class ItemThornChakram extends ItemMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName() + stack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey() + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -246,8 +246,8 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return getUnlocalizedNameLazy(par1ItemStack);
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return getUnlocalizedNameLazy(stack);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -138,8 +138,8 @@ public class ItemVirus extends ItemMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName(stack) + stack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ItemBlockFloatingSpecialFlower extends ItemBlockSpecialFlower {
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getItemStackDisplayName(@Nonnull ItemStack stack) {
|
||||
String flowerName = getUnlocalizedName(stack) + ".name";
|
||||
String flowerName = getTranslationKey(stack) + ".name";
|
||||
return String.format(I18n.translateToLocal("botaniamisc.floatingPrefix"), I18n.translateToLocal(flowerName));
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ public class ItemBlockModSlab extends ItemSlab {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return block.getUnlocalizedName().replaceAll("tile.", "tile.botania:");
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return block.getTranslationKey().replaceAll("tile.", "tile.botania:");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -80,7 +80,7 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return BotaniaAPI.getSignatureForName(getType(stack)).getUnlocalizedNameForStack(stack);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ItemBlockSpecialQuartz extends ItemMultiTexture {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(@Nonnull ItemStack par1ItemStack) {
|
||||
return par1ItemStack.getItemDamage() >= 3 ? "" : ((BlockSpecialQuartz) block).getNames()[par1ItemStack.getItemDamage()];
|
||||
public String getTranslationKey(@Nonnull ItemStack stack) {
|
||||
return stack.getItemDamage() >= 3 ? "" : ((BlockSpecialQuartz) block).getNames()[stack.getItemDamage()];
|
||||
}
|
||||
}
|
||||
@@ -24,8 +24,8 @@ public class ItemBlockWithMetadataAndName extends ItemBlockMod {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,8 +46,8 @@ public class ItemVial extends ItemMod implements IBrewContainer {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ public class ItemManasteelArmor extends ItemArmor implements ISpecialArmor, IMan
|
||||
this.type = type;
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ public class ItemManaweaveArmor extends ItemManasteelArmor {
|
||||
@Nonnull
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
String name = super.getUnlocalizedName(stack);
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
String name = super.getTranslationKey(stack);
|
||||
if(ClientProxy.jingleTheBells)
|
||||
name = name.replaceAll("manaweave", "santaweave");
|
||||
return name;
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class ItemTerrasteelArmor extends ItemManasteelArmor {
|
||||
@Override
|
||||
public Multimap<String, AttributeModifier> getAttributeModifiers(@Nonnull EntityEquipmentSlot slot, ItemStack stack) {
|
||||
Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(slot, stack);
|
||||
UUID uuid = new UUID((getUnlocalizedName() + slot.toString()).hashCode(), 0);
|
||||
UUID uuid = new UUID((getTranslationKey(stack) + slot.toString()).hashCode(), 0);
|
||||
if (slot == armorType) {
|
||||
multimap.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getName(), new AttributeModifier(uuid, "Terrasteel modifier " + type, (double) getArmorDisplay(null, new ItemStack(this), type.getIndex()) / 20, 0));
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
IItemHandler inv = BaublesApi.getBaublesHandler((EntityPlayer) evt.getEntityLiving());
|
||||
for(int i = 0; i < inv.getSlots(); i++) {
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if (!stack.isEmpty() && stack.getItem().getRegistryName().getResourceDomain().equals(LibMisc.MOD_ID)) {
|
||||
if (!stack.isEmpty() && stack.getItem().getRegistryName().getNamespace().equals(LibMisc.MOD_ID)) {
|
||||
((ItemBauble) stack.getItem()).onUnequipped(stack, evt.getEntityLiving());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
public String getTranslationKey(ItemStack stack) {
|
||||
return super.getTranslationKey(stack) + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -92,7 +92,7 @@ public final class ToolCommons {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
if(block.removedByPlayer(state, world, pos, player, true)) {
|
||||
block.onBlockDestroyedByPlayer(world, pos, state);
|
||||
block.onPlayerDestroy(world, pos, state);
|
||||
|
||||
if(!dispose || !ItemElementiumPick.isDisposable(block)) {
|
||||
block.harvestBlock(world, player, pos, state, tile, stack);
|
||||
@@ -153,7 +153,7 @@ public final class ToolCommons {
|
||||
{
|
||||
d3 = ((net.minecraft.entity.player.EntityPlayerMP)playerIn).interactionManager.getBlockReachDistance();
|
||||
}*/
|
||||
Vec3d vec3d1 = vec3d.addVector((double)f6 * d3, (double)f5 * d3, (double)f7 * d3);
|
||||
Vec3d vec3d1 = vec3d.add((double)f6 * d3, (double)f5 * d3, (double)f7 * d3);
|
||||
return worldIn.rayTraceBlocks(vec3d, vec3d1, useLiquids, !useLiquids, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ItemLivingwoodBow extends ItemBow implements IManaUsingItem, IModel
|
||||
public ItemLivingwoodBow(String name) {
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
setMaxDamage(500);
|
||||
addPropertyOverride(new ResourceLocation("minecraft:pull"), (stack, worldIn, entityIn) -> {
|
||||
if (entityIn == null)
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ public class ItemManasteelAxe extends ItemAxe implements IManaUsingItem, ISortab
|
||||
super(mat, 8F, -3.1F);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -89,7 +89,7 @@ public class ItemManasteelAxe extends ItemAxe implements IManaUsingItem, ISortab
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float sx, float sy, float sz) {
|
||||
for(int i = 0; i < player.inventory.getSizeInventory(); i++) {
|
||||
ItemStack stackAt = player.inventory.getStackInSlot(i);
|
||||
if(!stackAt.isEmpty() && SAPLING_PATTERN.matcher(stackAt.getItem().getUnlocalizedName()).find()) {
|
||||
if(!stackAt.isEmpty() && SAPLING_PATTERN.matcher(stackAt.getItem().getTranslationKey()).find()) {
|
||||
ItemStack saveHeldStack = player.getHeldItem(hand);
|
||||
player.setHeldItem(hand, stackAt);
|
||||
EnumActionResult did = stackAt.getItem().onItemUse(player, world, pos, hand, side, sx, sy, sz);
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ public class ItemManasteelPick extends ItemPickaxe implements IManaUsingItem, IS
|
||||
super(mat);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -85,7 +85,7 @@ public class ItemManasteelPick extends ItemPickaxe implements IManaUsingItem, IS
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float sx, float sy, float sz) {
|
||||
for(int i = 0; i < player.inventory.getSizeInventory(); i++) {
|
||||
ItemStack stackAt = player.inventory.getStackInSlot(i);
|
||||
if(!stackAt.isEmpty() && TORCH_PATTERN.matcher(stackAt.getItem().getUnlocalizedName()).find()) {
|
||||
if(!stackAt.isEmpty() && TORCH_PATTERN.matcher(stackAt.getItem().getTranslationKey()).find()) {
|
||||
ItemStack saveHeldStack = player.getHeldItem(hand);
|
||||
player.setHeldItem(hand, stackAt);
|
||||
EnumActionResult did = stackAt.getItem().onItemUse(player, world, pos, hand, side, sx, sy, sz);
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public class ItemManasteelShears extends ItemShears implements IManaUsingItem, I
|
||||
public ItemManasteelShears(String name) {
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class ItemManasteelShovel extends ItemSpade implements IManaUsingItem, IS
|
||||
super(mat);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem, IMo
|
||||
super(mat);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
|
||||
setUnlocalizedName(name);
|
||||
setTranslationKey(name);
|
||||
addPropertyOverride(new ResourceLocation("botania", "elucidator"),
|
||||
(stack, worldIn, entityIn) -> "the elucidator".equals(stack.getDisplayName().toLowerCase().trim()) ? 1 : 0);
|
||||
}
|
||||
|
||||
+3
-3
@@ -171,9 +171,9 @@ public class ItemTerraPick extends ItemManasteelPick implements IManaItem, ISequ
|
||||
int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
|
||||
boolean silk = EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0;
|
||||
boolean thor = ItemThorRing.getThorRing(player) != null;
|
||||
boolean doX = thor || side.getFrontOffsetX() == 0;
|
||||
boolean doY = thor || side.getFrontOffsetY() == 0;
|
||||
boolean doZ = thor || side.getFrontOffsetZ() == 0;
|
||||
boolean doX = thor || side.getXOffset() == 0;
|
||||
boolean doY = thor || side.getYOffset() == 0;
|
||||
boolean doZ = thor || side.getZOffset() == 0;
|
||||
|
||||
int origLevel = getLevel(stack);
|
||||
int level = origLevel + (thor ? 1 : 0);
|
||||
|
||||
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user