mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-13 00:37:32 +00:00
Various Fixes (#39)
* Update BS + dpes * Fix annotations & generics * Remove some commented-out code * Change to Tags class * create Terminus aspect during preInit * Apply spotless * Add comments for unmapped methods/fields * Use AT in favor of reflection * Fix server-side crash
This commit is contained in:
1 parent
ca60012c67
commit
91bfbb36f0
71 files changed
+208
-618
No files matched your search
+10
-10
@@ -1,30 +1,30 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev")
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.6.14-GTNH:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.8.2:api") {
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.9.7:api") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.10.3-GTNH:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:Botania:1.11.3-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:Mantle:0.4.0:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:Mantle:0.4.1:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.11.5-GTNH:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.12.5-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:BloodMagic:1.4.3:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:BloodMagic:1.6.2:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.3.0:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.3.1:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.4.8:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.31:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.45.25:dev") {
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.48.72:dev") {
|
||||
transitive = false
|
||||
}
|
||||
|
||||
@@ -41,5 +41,5 @@ dependencies {
|
||||
transitive = false
|
||||
}
|
||||
|
||||
runtimeOnly("com.github.GTNewHorizons:GTNHLib:0.1.0:dev")
|
||||
runtimeOnly("com.github.GTNewHorizons:GTNHLib:0.3.2:dev")
|
||||
}
|
||||
+12
-11
@@ -33,7 +33,7 @@ channel = stable
|
||||
mappingsVersion = 12
|
||||
|
||||
# Defines other MCP mappings for dependency deobfuscation.
|
||||
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||
|
||||
# Select a default username for testing your mod. You can always override this per-run by running
|
||||
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||
@@ -41,19 +41,19 @@ developmentEnvironmentUserName = "Developer"
|
||||
|
||||
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
enableModernJavaSyntax = false
|
||||
enableModernJavaSyntax = true
|
||||
|
||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||
enableGenericInjection = false
|
||||
enableGenericInjection = true
|
||||
|
||||
# Generate a class with a String field for the mod version named as defined below.
|
||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||
generateGradleTokenClass =
|
||||
generateGradleTokenClass = fox.spiteful.avaritia.Tags
|
||||
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenVersion = VERSION
|
||||
|
||||
# [DEPRECATED] Mod ID replacement token.
|
||||
gradleTokenModId =
|
||||
@@ -61,13 +61,16 @@ gradleTokenModId =
|
||||
# [DEPRECATED] Mod name replacement token.
|
||||
gradleTokenModName =
|
||||
|
||||
# [DEPRECATED] Mod Group replacement token.
|
||||
gradleTokenGroupName =
|
||||
|
||||
# [DEPRECATED]
|
||||
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
|
||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...]).
|
||||
# Leave these properties empty to skip individual token replacements.
|
||||
replaceGradleTokenInFile = Avaritia.java
|
||||
replaceGradleTokenInFile =
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||
# leave this property empty.
|
||||
@@ -77,7 +80,7 @@ apiPackage =
|
||||
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
|
||||
# There can be multiple files in a space-separated list.
|
||||
# Example value: mymodid_at.cfg nei_at.cfg
|
||||
accessTransformersFile =
|
||||
accessTransformersFile = Avaritia_at.cfg
|
||||
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
@@ -114,7 +117,7 @@ minimizeShadowedDependencies = true
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories.
|
||||
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
includeWellKnownRepositories = true
|
||||
|
||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||
@@ -123,7 +126,7 @@ includeWellKnownRepositories = true
|
||||
usesMavenPublishing = true
|
||||
|
||||
# Maven repository to publish the mod to.
|
||||
# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/
|
||||
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
|
||||
|
||||
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
|
||||
#
|
||||
@@ -187,5 +190,3 @@ curseForgeRelations =
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# ideaCheckSpotlessOnBuild = true
|
||||
|
||||
# Non-GTNH properties
|
||||
gradleTokenGroupName =
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.23'
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.achievements.Achievements;
|
||||
import fox.spiteful.avaritia.blocks.LudicrousBlocks;
|
||||
import fox.spiteful.avaritia.compat.Compat;
|
||||
@@ -29,7 +27,7 @@ import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
@Mod(
|
||||
modid = "Avaritia",
|
||||
name = "Avaritia",
|
||||
version = "GRADLETOKEN_VERSION",
|
||||
version = Tags.VERSION,
|
||||
dependencies = "after:Thaumcraft;after:AWWayofTime;after:Botania")
|
||||
public class Avaritia {
|
||||
|
||||
@@ -44,14 +42,12 @@ public class Avaritia {
|
||||
public static CreativeTabs tab = new CreativeTabs("avaritia") {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem() {
|
||||
return LudicrousItems.resource;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int func_151243_f() {
|
||||
public int func_151243_f() { // getIconItemDamage
|
||||
return 5;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
@@ -17,16 +16,13 @@ public class DamageSourceInfinitySword extends EntityDamageSource {
|
||||
super("infinity", source);
|
||||
}
|
||||
|
||||
public IChatComponent func_151519_b(EntityLivingBase p_151519_1_) {
|
||||
ItemStack itemstack = this.damageSourceEntity instanceof EntityLivingBase
|
||||
? ((EntityLivingBase) this.damageSourceEntity).getHeldItem()
|
||||
: null;
|
||||
@Override
|
||||
public IChatComponent func_151519_b(EntityLivingBase p_151519_1_) { // getDeathMessage
|
||||
String s = "death.attack.infinity";
|
||||
int rando = randy.nextInt(5);
|
||||
if (rando != 0) s = s + "." + rando;
|
||||
return new ChatComponentTranslation(
|
||||
s,
|
||||
new Object[] { p_151519_1_.func_145748_c_(), this.damageSourceEntity.func_145748_c_() });
|
||||
// func_145748_c_ = getFormattedCommandSenderName
|
||||
return new ChatComponentTranslation(s, p_151519_1_.func_145748_c_(), this.damageSourceEntity.func_145748_c_());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,30 +1,17 @@
|
||||
package fox.spiteful.avaritia;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
public class PotionHelper {
|
||||
|
||||
private static ArrayList<Potion> badPotions;
|
||||
|
||||
public static void healthInspection() {
|
||||
badPotions = new ArrayList<Potion>();
|
||||
try {
|
||||
Field stupidMojangPrivateVariable = ReflectionHelper
|
||||
.findField(Potion.class, "isBadEffect", "field_76418_K");
|
||||
|
||||
for (Potion potion : Potion.potionTypes) {
|
||||
if (potion != null && stupidMojangPrivateVariable.getBoolean(potion)) badPotions.add(potion);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Lumberjack.log(Level.ERROR, e, "Failure to get potions");
|
||||
e.printStackTrace();
|
||||
for (Potion potion : Potion.potionTypes) {
|
||||
if (potion != null && potion.isBadEffect) badPotions.add(potion);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@ import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
|
||||
public class AchievementTrigger {
|
||||
|
||||
/*
|
||||
* @SubscribeEvent public void onItemPickedUp(PlayerEvent.ItemPickupEvent event) { ItemStack stack =
|
||||
* event.pickedUp.getEntityItem(); }
|
||||
*/
|
||||
|
||||
@SubscribeEvent
|
||||
public void onItemCrafted(PlayerEvent.ItemCraftedEvent event) {
|
||||
if (event.crafting != null) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.stats.Achievement;
|
||||
|
||||
public class LudicrousAchievement extends Achievement {
|
||||
|
||||
public static List<Achievement> achievements = new ArrayList();
|
||||
public static List<Achievement> achievements = new ArrayList<>();
|
||||
|
||||
public LudicrousAchievement(String name, int x, int y, ItemStack icon, Achievement parent) {
|
||||
super("achievement.avaritia:" + name, "avaritia:" + name, x, y, icon, parent);
|
||||
|
||||
@@ -45,7 +45,6 @@ public class BlockCompressor extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
if (side == 1) return top;
|
||||
int facing = 2;
|
||||
@@ -56,7 +55,6 @@ public class BlockCompressor extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if (side == 1) return top;
|
||||
if (side == 3) return front;
|
||||
@@ -79,6 +77,7 @@ public class BlockCompressor extends BlockContainer {
|
||||
return new TileEntityCompressor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack item) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileEntityCompressor) {
|
||||
@@ -96,6 +95,7 @@ public class BlockCompressor extends BlockContainer {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int wut) {
|
||||
TileEntityCompressor compressor = (TileEntityCompressor) world.getTileEntity(x, y, z);
|
||||
|
||||
@@ -137,7 +137,7 @@ public class BlockCompressor extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
world.func_147453_f(x, y, z, block);
|
||||
world.func_147453_f(x, y, z, block); // updateNeighborsAboutBlockChange
|
||||
}
|
||||
|
||||
super.breakBlock(world, x, y, z, block, wut);
|
||||
|
||||
@@ -43,7 +43,6 @@ public class BlockDireCrafting extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if (side == 0) return bottom;
|
||||
if (side == 1) return top;
|
||||
@@ -66,6 +65,7 @@ public class BlockDireCrafting extends BlockContainer {
|
||||
return new TileEntityDireCrafting();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int wut) {
|
||||
TileEntityDireCrafting craft = (TileEntityDireCrafting) world.getTileEntity(x, y, z);
|
||||
|
||||
@@ -106,7 +106,7 @@ public class BlockDireCrafting extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
world.func_147453_f(x, y, z, block);
|
||||
world.func_147453_f(x, y, z, block); // updateNeighborsAboutBlockChange
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ public class BlockNeutronCollector extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
if (side == 1) return top;
|
||||
int facing = 2;
|
||||
@@ -56,7 +55,6 @@ public class BlockNeutronCollector extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if (side == 1) return top;
|
||||
if (side == 3) return front;
|
||||
@@ -79,6 +77,7 @@ public class BlockNeutronCollector extends BlockContainer {
|
||||
return new TileEntityNeutron();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack item) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileEntityNeutron) {
|
||||
@@ -96,6 +95,7 @@ public class BlockNeutronCollector extends BlockContainer {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int wut) {
|
||||
TileEntityNeutron collector = (TileEntityNeutron) world.getTileEntity(x, y, z);
|
||||
|
||||
@@ -134,7 +134,7 @@ public class BlockNeutronCollector extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
world.func_147453_f(x, y, z, block);
|
||||
world.func_147453_f(x, y, z, block); // updateNeighborsAboutBlockChange
|
||||
}
|
||||
|
||||
super.breakBlock(world, x, y, z, block, wut);
|
||||
|
||||
@@ -34,20 +34,22 @@ public class BlockResource extends Block {
|
||||
setCreativeTab(Avaritia.tab);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return this.icons[metadata % types.length];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metadata) {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int x = 0; x < types.length; x++) list.add(new ItemStack(item, 1, x));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.icons = new IIcon[types.length];
|
||||
|
||||
@@ -13,6 +13,7 @@ public class ItemBlockWithMetadataUnderp extends ItemBlockWithMetadata {
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
// field_150939_a = blockInstance
|
||||
return this.field_150939_a.getUnlocalizedName() + meta;
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,10 @@ public class Compat {
|
||||
am2 = Loader.isModLoaded("arsmagica2") && Config.am2;
|
||||
forestry = Loader.isModLoaded("Forestry") && Config.forestry;
|
||||
te = Loader.isModLoaded("ThermalExpansion") && Config.te;
|
||||
|
||||
if (thaumic) {
|
||||
Lucrum.initTermination();
|
||||
}
|
||||
}
|
||||
|
||||
public static void compatify() {
|
||||
@@ -287,6 +291,8 @@ public class Compat {
|
||||
|
||||
public static class ItemNotFoundException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = -1225515573911036286L;
|
||||
|
||||
public ItemNotFoundException(String mod, String item) {
|
||||
super("Unable to find " + item + " in mod " + mod + "! Are you using the correct version of the mod?");
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ItemOrbArmok extends Item implements IBloodOrb, IBindable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List tooltip, boolean wut) {
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean wut) {
|
||||
tooltip.add(StatCollector.translateToLocal("tooltip.armok.desc"));
|
||||
if (item.getTagCompound() != null) {
|
||||
tooltip.add(
|
||||
|
||||
@@ -89,10 +89,9 @@ public class BlockInfinitato extends BlockContainer implements ILexiconable {
|
||||
if (!par6EntityPlayer.capabilities.isCreativeMode) dropBlockAsItem(par1World, par2, par3, par4, par5, 0);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
ArrayList<ItemStack> list = new ArrayList();
|
||||
ArrayList<ItemStack> list = new ArrayList<>();
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (tile != null) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -14,7 +15,6 @@ public class ItemInfinitatoCostume extends Item {
|
||||
|
||||
public static final String[] types = new String[] { "armstrong", "moon", "egbert", "francis" };
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
|
||||
public ItemInfinitatoCostume() {
|
||||
@@ -22,6 +22,7 @@ public class ItemInfinitatoCostume extends Item {
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[types.length];
|
||||
@@ -32,11 +33,10 @@ public class ItemInfinitatoCostume extends Item {
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {}
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int dam) {
|
||||
return this.icons[dam % icons.length];
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.crafting.ExtremeShapedOreRecipe;
|
||||
import fox.spiteful.avaritia.crafting.ExtremeShapedRecipe;
|
||||
import fox.spiteful.avaritia.crafting.ExtremeShapelessRecipe;
|
||||
@@ -46,7 +44,6 @@ public class PageLudicrousRecipe extends PageRecipe {
|
||||
LexiconRecipeMappings.map(this.recipe.getRecipeOutput(), entry, index);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void renderRecipe(IGuiLexiconEntry gui, int mx, int my) {
|
||||
oreDictRecipe = shapelessRecipe = false;
|
||||
@@ -89,7 +86,6 @@ public class PageLudicrousRecipe extends PageRecipe {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateScreen() {
|
||||
/*
|
||||
* if(ticksElapsed % 20 == 0) { recipeAt++; if(recipeAt == recipes.size()) recipeAt = 0; }
|
||||
@@ -97,8 +93,6 @@ public class PageLudicrousRecipe extends PageRecipe {
|
||||
++ticksElapsed;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderCraftingRecipe(IGuiLexiconEntry gui, IRecipe recipe) {
|
||||
if (recipe instanceof ExtremeShapedRecipe) {
|
||||
ExtremeShapedRecipe shaped = (ExtremeShapedRecipe) recipe;
|
||||
@@ -131,31 +125,10 @@ public class PageLudicrousRecipe extends PageRecipe {
|
||||
shapelessRecipe = true;
|
||||
oreDictRecipe = true;
|
||||
}
|
||||
/*
|
||||
* if(recipe instanceof ShapedRecipes) { ShapedRecipes shaped = (ShapedRecipes)recipe; for(int y = 0; y <
|
||||
* shaped.recipeHeight; y++) for(int x = 0; x < shaped.recipeWidth; x++) renderItemAtGridPos(gui, 1 + x, 1 + y,
|
||||
* shaped.recipeItems[y * shaped.recipeWidth + x], true); } else if(recipe instanceof ShapedOreRecipe) {
|
||||
* ShapedOreRecipe shaped = (ShapedOreRecipe) recipe; int width = (Integer)
|
||||
* ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 4); int height = (Integer)
|
||||
* ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 5); for(int y = 0; y < height; y++) for(int x
|
||||
* = 0; x < width; x++) { Object input = shaped.getInput()[y * width + x]; if(input != null)
|
||||
* renderItemAtGridPos(gui, 1 + x, 1 + y, input instanceof ItemStack ? (ItemStack) input :
|
||||
* ((ArrayList<ItemStack>) input).get(0), true); } oreDictRecipe = true; } else if(recipe instanceof
|
||||
* ShapelessRecipes) { ShapelessRecipes shapeless = (ShapelessRecipes) recipe; drawGrid : { for(int y = 0; y <
|
||||
* 3; y++) for(int x = 0; x < 3; x++) { int index = y * 3 + x; if(index >= shapeless.recipeItems.size()) break
|
||||
* drawGrid; renderItemAtGridPos(gui, 1 + x, 1 + y, (ItemStack) shapeless.recipeItems.get(index), true); } }
|
||||
* shapelessRecipe = true; } else if(recipe instanceof ShapelessOreRecipe) { ShapelessOreRecipe shapeless =
|
||||
* (ShapelessOreRecipe) recipe; drawGrid : { for(int y = 0; y < 3; y++) for(int x = 0; x < 3; x++) { int index =
|
||||
* y * 3 + x; if(index >= shapeless.getRecipeSize()) break drawGrid; Object input =
|
||||
* shapeless.getInput().get(index); if(input != null) renderItemAtGridPos(gui, 1 + x, 1 + y, input instanceof
|
||||
* ItemStack ? (ItemStack) input : ((ArrayList<ItemStack>) input).get(0), true); } } shapelessRecipe = true;
|
||||
* oreDictRecipe = true; }
|
||||
*/
|
||||
|
||||
renderItemAtLudicrousGridPos(gui, 4, -1, recipe.getRecipeOutput(), false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderItemAtLudicrousGridPos(IGuiLexiconEntry gui, int x, int y, ItemStack stack,
|
||||
boolean accountForContainer) {
|
||||
if (stack == null || stack.getItem() == null) return;
|
||||
|
||||
@@ -19,7 +19,6 @@ public class TileInfinitato extends TileLudicrous {
|
||||
public String name = "";
|
||||
public int nextDoIt = 0;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void interact() {
|
||||
jump();
|
||||
if (name.equalsIgnoreCase("shia labeouf") && !worldObj.isRemote && nextDoIt == 0) {
|
||||
@@ -56,7 +55,7 @@ public class TileInfinitato extends TileLudicrous {
|
||||
ent.addPotionEffect(new PotionEffect(Potion.fireResistance.id, time, 0));
|
||||
ent.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, time, 0));
|
||||
ent.addPotionEffect(new PotionEffect(Potion.nightVision.id, time, 0));
|
||||
ent.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, time, 4)); // absorb
|
||||
ent.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, time, 4)); // absorption
|
||||
ent.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, time, 4)); // saturation
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ public enum GreedyBeeSpecies implements IAlleleBeeSpecies, IIconProvider {
|
||||
private String authority;
|
||||
private EnumTemperature temperature = EnumTemperature.NORMAL;
|
||||
private EnumHumidity humidity = EnumHumidity.NORMAL;
|
||||
private boolean hasEffect;
|
||||
private boolean isSecret;
|
||||
private boolean isCounted = true;
|
||||
private boolean fancy;
|
||||
|
||||
@@ -20,10 +20,8 @@ public class ItemBeesource extends Item implements IHaloRenderItem {
|
||||
|
||||
private static final String[] types = new String[] { "infinity_drop", "dust" };
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon halo;
|
||||
|
||||
public ItemBeesource() {
|
||||
@@ -33,6 +31,7 @@ public class ItemBeesource extends Item implements IHaloRenderItem {
|
||||
this.setCreativeTab(Avaritia.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[types.length];
|
||||
@@ -44,7 +43,7 @@ public class ItemBeesource extends Item implements IHaloRenderItem {
|
||||
halo = ir.registerIcon("avaritia:halo");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int dam) {
|
||||
return this.icons[dam % icons.length];
|
||||
}
|
||||
@@ -55,10 +54,8 @@ public class ItemBeesource extends Item implements IHaloRenderItem {
|
||||
return super.getUnlocalizedName() + "." + types[i];
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int j = 0; j < types.length; ++j) {
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
@@ -77,33 +74,28 @@ public class ItemBeesource extends Item implements IHaloRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
return (meta == 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack) {
|
||||
return halo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
return meta == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack) {
|
||||
return 0xFF000000;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package fox.spiteful.avaritia.compat.forestry;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -19,7 +20,6 @@ public class ItemComb extends Item {
|
||||
private static final int[] mainColors = new int[] { 0xB6B6B6, 0xEF57FF };
|
||||
private static final int[] otherColors = new int[] { 0x757575, 0x06005C };
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon secondIcon;
|
||||
|
||||
public ItemComb() {
|
||||
@@ -29,15 +29,14 @@ public class ItemComb extends Item {
|
||||
setUnlocalizedName("avaritia.comb");
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, java.util.List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int j = 0; j < types.length; ++j) {
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0");
|
||||
@@ -50,7 +49,6 @@ public class ItemComb extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
@@ -61,7 +59,6 @@ public class ItemComb extends Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||
|
||||
if (pass == 0) {
|
||||
|
||||
@@ -36,7 +36,6 @@ public class Ranger {
|
||||
comb = Compat.getItem("Forestry", "beeCombs");
|
||||
honey = Compat.getItem("Forestry", "honeyDrop");
|
||||
honeydew = Compat.getItem("Forestry", "honeydew");
|
||||
Item panel = Compat.getItem("Forestry", "craftingMaterial");
|
||||
|
||||
if (!Config.bees) return;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package fox.spiteful.avaritia.compat.minetweaker;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import fox.spiteful.avaritia.crafting.CompressOreRecipe;
|
||||
import fox.spiteful.avaritia.crafting.CompressorManager;
|
||||
@@ -140,37 +139,6 @@ public class Compressor {
|
||||
}
|
||||
}
|
||||
|
||||
private static Object toObject(IIngredient ingredient) {
|
||||
if (ingredient == null) return null;
|
||||
else {
|
||||
if (ingredient instanceof IOreDictEntry) {
|
||||
return toString((IOreDictEntry) ingredient);
|
||||
} else if (ingredient instanceof IItemStack) {
|
||||
return toStack((IItemStack) ingredient);
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static Object[] toObjects(IIngredient[] list) {
|
||||
if (list == null) return null;
|
||||
Object[] ingredients = new Object[list.length];
|
||||
for (int x = 0; x < list.length; x++) {
|
||||
ingredients[x] = toObject(list[x]);
|
||||
}
|
||||
return ingredients;
|
||||
}
|
||||
|
||||
private static Object toActualObject(IIngredient ingredient) {
|
||||
if (ingredient == null) return null;
|
||||
else {
|
||||
if (ingredient instanceof IOreDictEntry) {
|
||||
return OreDictionary.getOres(toString((IOreDictEntry) ingredient));
|
||||
} else if (ingredient instanceof IItemStack) {
|
||||
return toStack((IItemStack) ingredient);
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static String toString(IOreDictEntry entry) {
|
||||
return ((IOreDictEntry) entry).getName();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package fox.spiteful.avaritia.compat.minetweaker;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
@@ -141,88 +139,6 @@ public class ExtremeCrafting {
|
||||
|
||||
}
|
||||
|
||||
private static class AddCatalyst implements IUndoableAction {
|
||||
|
||||
Object ingredient;
|
||||
|
||||
public AddCatalyst(Object add) {
|
||||
ingredient = add;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {}
|
||||
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
if (ingredient instanceof ItemStack)
|
||||
return "Adding " + ((ItemStack) ingredient).getDisplayName() + " to Infinity Catalyst recipe.";
|
||||
else if (ingredient instanceof List)
|
||||
return "Adding " + ((ItemStack) (((List) ingredient).get(0))).getDisplayName()
|
||||
+ " to Infinity Catalyst recipe.";
|
||||
else return "Adding something to Infinity Catalyst recipe.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo() {
|
||||
if (ingredient instanceof ItemStack)
|
||||
return "Removing " + ((ItemStack) ingredient).getDisplayName() + " from Infinity Catalyst recipe.";
|
||||
else if (ingredient instanceof List)
|
||||
return "Removing " + ((ItemStack) (((List) ingredient).get(0))).getDisplayName()
|
||||
+ " from Infinity Catalyst recipe.";
|
||||
else return "Removing something from Infinity Catalyst recipe.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class RemoveCatalyst implements IUndoableAction {
|
||||
|
||||
IIngredient ingredient;
|
||||
|
||||
public RemoveCatalyst(IIngredient rem) {
|
||||
ingredient = rem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {}
|
||||
|
||||
@Override
|
||||
public boolean canUndo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {}
|
||||
|
||||
@Override
|
||||
public String describe() {
|
||||
return "Adding something to Infinity Catalyst recipe.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describeUndo() {
|
||||
return "Removing something from Infinity Catalyst recipe.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOverrideKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static ItemStack toStack(IItemStack item) {
|
||||
if (item == null) return null;
|
||||
else {
|
||||
|
||||
@@ -128,7 +128,7 @@ public class CompressionHandler extends TemplateRecipeHandler {
|
||||
|
||||
private boolean safeOre(CompressorRecipe recipe) {
|
||||
if (!(recipe instanceof CompressOreRecipe)) return true;
|
||||
return !((ArrayList) recipe.getIngredient()).isEmpty();
|
||||
return !((ArrayList<?>) recipe.getIngredient()).isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -136,7 +136,6 @@ public class CompressionHandler extends TemplateRecipeHandler {
|
||||
return "avaritia:textures/gui/compressor.png";
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void drawForeground(int recipe) {
|
||||
super.drawForeground(recipe);
|
||||
|
||||
@@ -75,6 +75,7 @@ public class ExtremeShapelessRecipeHandler extends ShapelessRecipeHandler {
|
||||
public PositionedStack result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return StatCollector.translateToLocal("crafting.extreme.shapeless");
|
||||
}
|
||||
|
||||
@@ -17,21 +17,14 @@ import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class InfiniteFoxes {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static FakeTailEntity fakeEntity;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Object tailPartInfo;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Object earPartInfo;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Object foxTailRender;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Object foxEarsRender;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Method m_RenderPart_render;
|
||||
|
||||
public static void floof() {
|
||||
@@ -41,15 +34,16 @@ public class InfiniteFoxes {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void grabReflections() {
|
||||
try {
|
||||
Class c_PartType = Class.forName("kihira.tails.common.PartsData$PartType");
|
||||
Class c_PartInfo = Class.forName("kihira.tails.common.PartInfo");
|
||||
@SuppressWarnings("rawtypes")
|
||||
Class<? extends Enum> c_PartType = (Class<? extends Enum>) Class
|
||||
.forName("kihira.tails.common.PartsData$PartType");
|
||||
Class<?> c_PartInfo = Class.forName("kihira.tails.common.PartInfo");
|
||||
|
||||
// Setup Info
|
||||
Constructor constr = c_PartInfo.getConstructor(
|
||||
Constructor<?> constr = c_PartInfo.getConstructor(
|
||||
boolean.class,
|
||||
int.class,
|
||||
int.class,
|
||||
@@ -75,8 +69,8 @@ public class InfiniteFoxes {
|
||||
null);
|
||||
|
||||
// Grab renderparts + render method
|
||||
Class c_RenderPart = Class.forName("kihira.tails.client.render.RenderPart");
|
||||
Class c_PartRegistry = Class.forName("kihira.tails.client.PartRegistry");
|
||||
Class<?> c_RenderPart = Class.forName("kihira.tails.client.render.RenderPart");
|
||||
Class<?> c_PartRegistry = Class.forName("kihira.tails.client.PartRegistry");
|
||||
Method m_getRenderPart = c_PartRegistry.getMethod("getRenderPart", c_PartType, int.class);
|
||||
foxTailRender = m_getRenderPart.invoke(null, Enum.valueOf(c_PartType, "TAIL"), 0);
|
||||
foxEarsRender = m_getRenderPart.invoke(null, Enum.valueOf(c_PartType, "EARS"), 0);
|
||||
@@ -94,7 +88,6 @@ public class InfiniteFoxes {
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void renderInfinitatoFluff(float partialTicks) {
|
||||
if (fakeEntity == null) {
|
||||
fakeEntity = new FakeTailEntity(Minecraft.getMinecraft().theWorld);
|
||||
@@ -113,7 +106,6 @@ public class InfiniteFoxes {
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onWorldUnload(WorldEvent.Unload e) {
|
||||
if (fakeEntity != null) {
|
||||
fakeEntity.setDead();
|
||||
@@ -121,7 +113,6 @@ public class InfiniteFoxes {
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class FakeTailEntity extends EntityLiving {
|
||||
|
||||
public FakeTailEntity(World world) {
|
||||
|
||||
@@ -10,8 +10,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.Avaritia;
|
||||
import fox.spiteful.avaritia.compat.Compat;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
@@ -49,10 +47,8 @@ public class ItemAkashicRecord extends Item {
|
||||
return stack;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
super.getSubItems(item, tab, list);
|
||||
try {
|
||||
Item wand = Compat.getItem("Thaumcraft", "WandCasting");
|
||||
|
||||
@@ -6,6 +6,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import fox.spiteful.avaritia.blocks.LudicrousBlocks;
|
||||
import fox.spiteful.avaritia.compat.Compat;
|
||||
@@ -24,17 +26,20 @@ import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
public class Lucrum {
|
||||
|
||||
public static Aspect ULTRA_DEATH;
|
||||
|
||||
public static WandRod WAND_ROD_NEUTRONIUM;
|
||||
public static WandCap WAND_CAP_CRYSTAL;
|
||||
|
||||
public static void abracadabra() throws Compat.ItemNotFoundException {
|
||||
public static void initTermination() {
|
||||
ULTRA_DEATH = new Aspect(
|
||||
"terminus",
|
||||
0xb90000,
|
||||
new Aspect[] { Aspect.GREED, Aspect.ELDRITCH },
|
||||
new ResourceLocation("avaritia", "textures/misc/terminus.png"),
|
||||
771);
|
||||
GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
public static void abracadabra() throws Compat.ItemNotFoundException {
|
||||
LudicrousItems.akashic_record = new ItemAkashicRecord();
|
||||
GameRegistry.registerItem(LudicrousItems.akashic_record, "Akashic_Record");
|
||||
LudicrousItems.bigPearl = new ItemBigPearl();
|
||||
|
||||
@@ -4,8 +4,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
|
||||
@@ -24,12 +22,12 @@ public class LudicrousResearchItem extends ResearchItem {
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public String getName() {
|
||||
return StatCollector.translateToLocal("avaritia.research_name." + key);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public String getText() {
|
||||
return "[AV] " + StatCollector.translateToLocal("avaritia.research_text." + key);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,6 @@ public abstract class TConTextureResourcePackBase implements IResourcePack, IRes
|
||||
return stream;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<IResourcePack> getPacks() {
|
||||
if (resourcePackz == null) {
|
||||
resourcePackz = new ArrayList<IResourcePack>();
|
||||
@@ -171,9 +170,8 @@ public abstract class TConTextureResourcePackBase implements IResourcePack, IRes
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public Set getResourceDomains() {
|
||||
public Set<String> getResourceDomains() {
|
||||
return delegate.getResourceDomains();
|
||||
}
|
||||
|
||||
|
||||
@@ -77,16 +77,6 @@ public class Tonkers {
|
||||
new ItemStack(TinkerTools.toolRod, 1, neutroniumId),
|
||||
neutroniumId);
|
||||
|
||||
// register patterns
|
||||
/*
|
||||
* for (int m = 0; m < TinkerTools.patternOutputs.length; m++) { if (TinkerTools.patternOutputs[m] != null)
|
||||
* TConstructRegistry.addPartMapping(TinkerTools.woodPattern, m + 1, neutroniumId, new
|
||||
* ItemStack(TinkerTools.patternOutputs[m], 1, neutroniumId)); } for (int m = 0; m <
|
||||
* TinkerWeaponry.patternOutputs.length; m++) { TConstructRegistry.addPartMapping(TinkerWeaponry.woodPattern, m,
|
||||
* neutroniumId, new ItemStack(TinkerWeaponry.patternOutputs[m], 1, neutroniumId)); }
|
||||
* TConstructRegistry.addPartMapping(TinkerTools.woodPattern, 25, neutroniumId, new
|
||||
* ItemStack(TinkerWeaponry.arrowhead, 1, neutroniumId));
|
||||
*/
|
||||
TonkersEvents events = new TonkersEvents();
|
||||
MinecraftForge.EVENT_BUS.register(events);
|
||||
FMLCommonHandler.instance().bus().register(events);
|
||||
|
||||
@@ -120,18 +120,6 @@ public class TonkersEvents {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @SubscribeEvent public void onLivingUpdate(LivingUpdateEvent event) { ItemStack held =
|
||||
* event.entityLiving.getHeldItem(); if (held != null && held.hasTagCompound() && held.getItem() instanceof
|
||||
* ToolCore) { ToolCore tool = (ToolCore)held.getItem(); NBTTagCompound toolTag =
|
||||
* held.getTagCompound().getCompoundTag("InfiTool"); int chance = 0; int per = 1; if (toolTag.getInteger("Head") ==
|
||||
* Tonkers.infinityMetalId) { chance += per; } if (toolTag.getInteger("Handle") == Tonkers.infinityMetalId) { chance
|
||||
* += per; } if (toolTag.getInteger("Accessory") == Tonkers.infinityMetalId) { chance += per; } if
|
||||
* (toolTag.getInteger("Extra") == Tonkers.infinityMetalId) { chance += per; } if (randy.nextInt(60) < chance) {
|
||||
* AbilityHelper.healTool(held, MathHelper.floor_float(tool.getDurabilityModifier()), event.entityLiving, true); } }
|
||||
* }
|
||||
*/
|
||||
|
||||
// bedrock SMASH!
|
||||
@SubscribeEvent
|
||||
public void onPlayerMine(PlayerInteractEvent event) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package fox.spiteful.avaritia.crafting;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
@@ -19,7 +20,7 @@ public class ExtremeCraftingManager {
|
||||
/** The static instance of this class */
|
||||
private static final ExtremeCraftingManager instance = new ExtremeCraftingManager();
|
||||
/** A list of all the recipes added */
|
||||
private List recipes = new ArrayList();
|
||||
private List<IRecipe> recipes = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Returns the static instance of this class
|
||||
@@ -53,18 +54,18 @@ public class ExtremeCraftingManager {
|
||||
}
|
||||
}
|
||||
|
||||
HashMap hashmap;
|
||||
Map<Character, ItemStack> hashmap;
|
||||
|
||||
for (hashmap = new HashMap(); i < recipe.length; i += 2) {
|
||||
for (hashmap = new HashMap<>(); i < recipe.length; i += 2) {
|
||||
Character character = (Character) recipe[i];
|
||||
ItemStack itemstack1 = null;
|
||||
|
||||
if (recipe[i + 1] instanceof Item) {
|
||||
itemstack1 = new ItemStack((Item) recipe[i + 1]);
|
||||
} else if (recipe[i + 1] instanceof Block) {
|
||||
itemstack1 = new ItemStack((Block) recipe[i + 1], 1, 32767);
|
||||
} else if (recipe[i + 1] instanceof ItemStack) {
|
||||
itemstack1 = (ItemStack) recipe[i + 1];
|
||||
if (recipe[i + 1] instanceof Item item) {
|
||||
itemstack1 = new ItemStack(item);
|
||||
} else if (recipe[i + 1] instanceof Block block) {
|
||||
itemstack1 = new ItemStack(block, 1, 32767);
|
||||
} else if (recipe[i + 1] instanceof ItemStack stack) {
|
||||
itemstack1 = stack;
|
||||
}
|
||||
|
||||
hashmap.put(character, itemstack1);
|
||||
@@ -76,7 +77,7 @@ public class ExtremeCraftingManager {
|
||||
char c0 = s.charAt(i1);
|
||||
|
||||
if (hashmap.containsKey(Character.valueOf(c0))) {
|
||||
ingredients[i1] = ((ItemStack) hashmap.get(Character.valueOf(c0))).copy();
|
||||
ingredients[i1] = hashmap.get(Character.valueOf(c0)).copy();
|
||||
} else {
|
||||
ingredients[i1] = null;
|
||||
}
|
||||
@@ -131,23 +132,23 @@ public class ExtremeCraftingManager {
|
||||
}
|
||||
|
||||
public ExtremeShapelessRecipe addShapelessRecipe(ItemStack result, Object... ingredients) {
|
||||
ArrayList arraylist = new ArrayList();
|
||||
List<ItemStack> arraylist = new ArrayList<>();
|
||||
Object[] aobject = ingredients;
|
||||
int i = ingredients.length;
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
Object object1 = aobject[j];
|
||||
|
||||
if (object1 instanceof ItemStack) {
|
||||
arraylist.add(((ItemStack) object1).copy());
|
||||
} else if (object1 instanceof Item) {
|
||||
arraylist.add(new ItemStack((Item) object1));
|
||||
if (object1 instanceof ItemStack stack) {
|
||||
arraylist.add(stack.copy());
|
||||
} else if (object1 instanceof Item item) {
|
||||
arraylist.add(new ItemStack(item));
|
||||
} else {
|
||||
if (!(object1 instanceof Block)) {
|
||||
if (!(object1 instanceof Block block)) {
|
||||
throw new RuntimeException("Invalid shapeless recipy!");
|
||||
}
|
||||
|
||||
arraylist.add(new ItemStack((Block) object1));
|
||||
arraylist.add(new ItemStack(block));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +202,7 @@ public class ExtremeCraftingManager {
|
||||
return new ItemStack(itemstack.getItem(), 1, i1);
|
||||
} else {
|
||||
for (j = 0; j < this.recipes.size(); ++j) {
|
||||
IRecipe irecipe = (IRecipe) this.recipes.get(j);
|
||||
IRecipe irecipe = this.recipes.get(j);
|
||||
|
||||
if (irecipe.matches(matrix, world)) {
|
||||
return irecipe.getCraftingResult(matrix);
|
||||
@@ -215,7 +216,7 @@ public class ExtremeCraftingManager {
|
||||
/**
|
||||
* returns the List<> of all recipes
|
||||
*/
|
||||
public List getRecipeList() {
|
||||
public List<IRecipe> getRecipeList() {
|
||||
return this.recipes;
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,9 @@ public class ExtremeShapelessRecipe implements IRecipe {
|
||||
/** Is the ItemStack that you get when craft the recipe. */
|
||||
private final ItemStack recipeOutput;
|
||||
/** Is a List of ItemStack that composes the recipe. */
|
||||
public final List recipeItems;
|
||||
public final List<ItemStack> recipeItems;
|
||||
|
||||
public ExtremeShapelessRecipe(ItemStack result, List ingredients) {
|
||||
public ExtremeShapelessRecipe(ItemStack result, List<ItemStack> ingredients) {
|
||||
this.recipeOutput = result;
|
||||
this.recipeItems = ingredients;
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class ExtremeShapelessRecipe implements IRecipe {
|
||||
* Used to check if a recipe matches current crafting inventory
|
||||
*/
|
||||
public boolean matches(InventoryCrafting matrix, World world) {
|
||||
ArrayList arraylist = new ArrayList(this.recipeItems);
|
||||
ArrayList<ItemStack> arraylist = new ArrayList<>(this.recipeItems);
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
@@ -37,10 +37,10 @@ public class ExtremeShapelessRecipe implements IRecipe {
|
||||
|
||||
if (itemstack != null) {
|
||||
boolean flag = false;
|
||||
Iterator iterator = arraylist.iterator();
|
||||
Iterator<ItemStack> iterator = arraylist.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ItemStack itemstack1 = (ItemStack) iterator.next();
|
||||
ItemStack itemstack1 = iterator.next();
|
||||
|
||||
if (itemstack.getItem() == itemstack1.getItem() && (itemstack1.getItemDamage() == 32767
|
||||
|| itemstack.getItemDamage() == itemstack1.getItemDamage())) {
|
||||
|
||||
@@ -85,7 +85,6 @@ public class Mincer {
|
||||
|
||||
List<String> rawCrops = new ArrayList<String>();
|
||||
List<String> crops = new ArrayList<String>();
|
||||
List<String> meatNames = new ArrayList<String>();
|
||||
List<String> rawMeats = new ArrayList<String>();
|
||||
List<String> meats = new ArrayList<String>();
|
||||
|
||||
@@ -330,6 +329,7 @@ public class Mincer {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.orename + ": " + this.count;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class EntityCollationItem extends EntityItem {
|
||||
return;
|
||||
}
|
||||
|
||||
String owner = this.func_145798_i();
|
||||
String owner = this.func_145798_i(); // getOwner
|
||||
|
||||
ItemStack basestack = this.getEntityItem();
|
||||
NBTTagList list = basestack.getTagCompound().getTagList(ITEMTAG, 10);
|
||||
@@ -123,10 +123,12 @@ public class EntityCollationItem extends EntityItem {
|
||||
player.triggerAchievement(AchievementList.blazeRod);
|
||||
}
|
||||
|
||||
// func_145800_j = getThrower
|
||||
if (itemstack.getItem() == Items.diamond && this.func_145800_j() != null) {
|
||||
EntityPlayer entityplayer1 = this.worldObj.getPlayerEntityByName(this.func_145800_j());
|
||||
|
||||
if (entityplayer1 != null && entityplayer1 != player) {
|
||||
// "Diamonds to you!" achievement
|
||||
entityplayer1.triggerAchievement(AchievementList.field_150966_x);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,6 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EntityGapingVoid extends Entity {
|
||||
|
||||
private static Random randy = new Random();
|
||||
@@ -76,7 +73,6 @@ public class EntityGapingVoid extends Entity {
|
||||
dataWatcher.setObjectWatched(12);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
@@ -160,20 +156,19 @@ public class EntityGapingVoid extends Entity {
|
||||
this.posX + nomrange,
|
||||
this.posY + nomrange,
|
||||
this.posZ + nomrange);
|
||||
List<Entity> nommed = this.worldObj.selectEntitiesWithinAABB(EntityLivingBase.class, nomzone, nomlector);
|
||||
List<EntityLivingBase> nommed = this.worldObj
|
||||
.selectEntitiesWithinAABB(EntityLivingBase.class, nomzone, nomlector);
|
||||
|
||||
for (Entity nommee : nommed) {
|
||||
if (nommee != this) {
|
||||
double dx = this.posX - nommee.posX;
|
||||
double dy = this.posY - nommee.posY;
|
||||
double dz = this.posZ - nommee.posZ;
|
||||
for (EntityLivingBase nommee : nommed) {
|
||||
double dx = this.posX - nommee.posX;
|
||||
double dy = this.posY - nommee.posY;
|
||||
double dz = this.posZ - nommee.posZ;
|
||||
|
||||
double lensquared = dx * dx + dy * dy + dz * dz;
|
||||
double len = Math.sqrt(lensquared);
|
||||
double lensquared = dx * dx + dy * dy + dz * dz;
|
||||
double len = Math.sqrt(lensquared);
|
||||
|
||||
if (len <= nomrange) {
|
||||
nommee.attackEntityFrom(DamageSource.outOfWorld, 3.0f);
|
||||
}
|
||||
if (len <= nomrange) {
|
||||
nommee.attackEntityFrom(DamageSource.outOfWorld, 3.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +252,6 @@ public class EntityGapingVoid extends Entity {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getShadowSize() {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package fox.spiteful.avaritia.entity;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -8,24 +7,8 @@ import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import fox.spiteful.avaritia.Lumberjack;
|
||||
|
||||
public class EntityHeavenArrow extends EntityArrow {
|
||||
|
||||
public static Field inGroundField;
|
||||
public static Field ticksInGroundField;
|
||||
static {
|
||||
try {
|
||||
inGroundField = ReflectionHelper.findField(EntityArrow.class, "inGround", "field_70254_i");
|
||||
ticksInGroundField = ReflectionHelper.findField(EntityArrow.class, "ticksInGround", "field_70252_j");
|
||||
} catch (Exception e) {
|
||||
Lumberjack.log(Level.ERROR, e);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean impacted = false;
|
||||
public Random randy = new Random();
|
||||
|
||||
@@ -53,12 +36,8 @@ public class EntityHeavenArrow extends EntityArrow {
|
||||
this.rotationYaw = 0;
|
||||
super.onUpdate();
|
||||
if (!this.impacted) {
|
||||
try {
|
||||
if (inGroundField.getBoolean(this)) {
|
||||
this.impacted = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (this.inGround) {
|
||||
this.impacted = true;
|
||||
}
|
||||
|
||||
if (this.impacted) {
|
||||
@@ -68,7 +47,7 @@ public class EntityHeavenArrow extends EntityArrow {
|
||||
}
|
||||
}
|
||||
|
||||
if (getInGround(this) && getTicksInGround(this) >= 100) {
|
||||
if (this.inGround && this.ticksInGround >= 100) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
@@ -82,27 +61,12 @@ public class EntityHeavenArrow extends EntityArrow {
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound tag) {
|
||||
super.readEntityFromNBT(tag);
|
||||
this.impacted = tag.getBoolean("impacted");
|
||||
}
|
||||
|
||||
public static boolean getInGround(EntityArrow arrow) {
|
||||
try {
|
||||
return inGroundField.getBoolean(arrow);
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static int getTicksInGround(EntityArrow arrow) {
|
||||
try {
|
||||
return ticksInGroundField.getInt(arrow);
|
||||
} catch (Exception e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void barrage() {
|
||||
for (int i = 0; i < 35; i++) {
|
||||
double angle = randy.nextDouble() * 2 * Math.PI;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class EntityHeavenSubArrow extends EntityArrow {
|
||||
this.rotationYaw = 0;
|
||||
super.onUpdate();
|
||||
|
||||
if (EntityHeavenArrow.getInGround(this) && EntityHeavenArrow.getTicksInGround(this) >= 20) {
|
||||
if (this.inGround && this.ticksInGround >= 20) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ public class EntityImmortalItem extends EntityItem {
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
this.motionY -= 0.03999999910593033D;
|
||||
// func_145771_j = pushOutOfBlocks
|
||||
this.noClip = this
|
||||
.func_145771_j(this.posX, (this.boundingBox.minY + this.boundingBox.maxY) / 2.0D, this.posZ);
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
@@ -130,14 +131,12 @@ public class EntityImmortalItem extends EntityItem {
|
||||
}
|
||||
}
|
||||
|
||||
// GODDAMNIT MOJANG
|
||||
@SuppressWarnings("rawtypes")
|
||||
private void searchForOtherItemsNearby2() {
|
||||
Iterator iterator = this.worldObj
|
||||
Iterator<EntityItem> iterator = this.worldObj
|
||||
.getEntitiesWithinAABB(EntityItem.class, this.boundingBox.expand(0.5D, 0.0D, 0.5D)).iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
EntityItem entityitem = (EntityItem) iterator.next();
|
||||
EntityItem entityitem = iterator.next();
|
||||
this.combineItems(entityitem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ public class ContainerCompressor extends Container {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return this.compressor.isUseableByPlayer(player);
|
||||
}
|
||||
@@ -38,6 +39,7 @@ public class ContainerCompressor extends Container {
|
||||
/**
|
||||
* Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
|
||||
*/
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotNumber) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(slotNumber);
|
||||
|
||||
@@ -20,6 +20,7 @@ public class ContainerCustomWorkbench extends ContainerWorkbench {
|
||||
worldObj = world;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return this.worldObj.isAirBlock(this.posX, this.posY, this.posZ) ? false
|
||||
: player.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D)
|
||||
|
||||
@@ -60,6 +60,7 @@ public class ContainerExtremeCrafting extends Container {
|
||||
/**
|
||||
* Callback for when the crafting matrix is changed.
|
||||
*/
|
||||
@Override
|
||||
public void onCraftMatrixChanged(IInventory matrix) {
|
||||
this.craftResult.setInventorySlotContents(
|
||||
0,
|
||||
@@ -69,11 +70,13 @@ public class ContainerExtremeCrafting extends Container {
|
||||
/**
|
||||
* Called when the container is closed.
|
||||
*/
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer player) {
|
||||
super.onContainerClosed(player);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return this.worldObj.getBlock(this.posX, this.posY, this.posZ) == LudicrousBlocks.dire_crafting
|
||||
&& player.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D)
|
||||
@@ -83,6 +86,7 @@ public class ContainerExtremeCrafting extends Container {
|
||||
/**
|
||||
* Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
|
||||
*/
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotNumber) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(slotNumber);
|
||||
|
||||
@@ -29,6 +29,7 @@ public class ContainerNeutron extends Container {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return this.tileNeutron.isUseableByPlayer(player);
|
||||
}
|
||||
@@ -36,6 +37,7 @@ public class ContainerNeutron extends Container {
|
||||
/**
|
||||
* Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
|
||||
*/
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotNumber) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(slotNumber);
|
||||
|
||||
@@ -24,7 +24,8 @@ public class GUICompressor extends GuiContainer {
|
||||
/**
|
||||
* Draw the foreground layer for the GuiContainer (everything in front of the items)
|
||||
*/
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
String s = StatCollector.translateToLocal("container.neutronium_compressor");
|
||||
this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752);
|
||||
if (compressor.getProgress() > 0) {
|
||||
@@ -36,7 +37,8 @@ public class GUICompressor extends GuiContainer {
|
||||
.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(furnaceGuiTextures);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
||||
@@ -25,14 +25,16 @@ public class GUINeutron extends GuiContainer {
|
||||
/**
|
||||
* Draw the foreground layer for the GuiContainer (everything in front of the items)
|
||||
*/
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
String s = StatCollector.translateToLocal("container.neutron_collector");
|
||||
this.fontRendererObj.drawString(s, this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752);
|
||||
this.fontRendererObj
|
||||
.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(furnaceGuiTextures);
|
||||
int k = (this.width - this.xSize) / 2;
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
@@ -78,7 +79,6 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
super.setDamage(stack, 0);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
if (armorType == 0) {
|
||||
@@ -86,15 +86,12 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
player.getFoodStats().addStats(20, 20F);
|
||||
} else if (armorType == 1) {
|
||||
// player.capabilities.allowFlying = true;
|
||||
Collection effects = player.getActivePotionEffects();
|
||||
Collection<PotionEffect> effects = player.getActivePotionEffects();
|
||||
if (effects.size() > 0) {
|
||||
ArrayList<Potion> bad = new ArrayList<Potion>();
|
||||
for (Object effect : effects) {
|
||||
if (effect instanceof PotionEffect) {
|
||||
PotionEffect potion = (PotionEffect) effect;
|
||||
if (PotionHelper.badPotion(Potion.potionTypes[potion.getPotionID()]))
|
||||
bad.add(Potion.potionTypes[potion.getPotionID()]);
|
||||
}
|
||||
for (PotionEffect potion : effects) {
|
||||
if (PotionHelper.badPotion(Potion.potionTypes[potion.getPotionID()]))
|
||||
bad.add(Potion.potionTypes[potion.getPotionID()]);
|
||||
}
|
||||
if (bad.size() > 0) {
|
||||
for (Potion potion : bad) {
|
||||
@@ -122,10 +119,9 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
return model;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public Multimap getAttributeModifiers(ItemStack stack) {
|
||||
Multimap multimap = super.getAttributeModifiers(stack);
|
||||
public Multimap<String, AttributeModifier> getAttributeModifiers(ItemStack stack) {
|
||||
Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(stack);
|
||||
// if(armorType == 3)
|
||||
// multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new
|
||||
// AttributeModifier(field_111210_e, "Armor modifier", 0.7, 1));
|
||||
@@ -152,8 +148,8 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
return 20;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean par4) {
|
||||
if (Compat.thaumic) list.add(
|
||||
EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
|
||||
+ ": "
|
||||
@@ -213,13 +209,11 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getMaskTexture(ItemStack stack, EntityPlayer player) {
|
||||
return this.cosmicMask;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaskMultiplier(ItemStack stack, EntityPlayer player) {
|
||||
return 1.0f;
|
||||
}
|
||||
@@ -235,7 +229,6 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack par1ItemStack, int pass) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.Avaritia;
|
||||
import fox.spiteful.avaritia.entity.EntityEndestPearl;
|
||||
import fox.spiteful.avaritia.render.IHaloRenderItem;
|
||||
@@ -43,31 +41,26 @@ public class ItemEndestPearl extends ItemEnderPearl implements IHaloRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack) {
|
||||
return ((ItemResource) LudicrousItems.resource).halo[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack) {
|
||||
return 0xFF000000;
|
||||
}
|
||||
|
||||
@@ -40,10 +40,8 @@ public class ItemFracturedOre extends Item {
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
// for debug purposes only - don't want these cluttering up the tab.
|
||||
/*
|
||||
* for (ItemStack stack : emulatedOres) { list.add(getStackForOre(stack, 1)); }
|
||||
@@ -144,7 +142,7 @@ public class ItemFracturedOre extends Item {
|
||||
|
||||
ItemStack smeltingResult = FurnaceRecipes.smelting().getSmeltingResult(orestack);
|
||||
if (smeltingResult != null) {
|
||||
float exp = FurnaceRecipes.smelting().func_151398_b(orestack);
|
||||
float exp = FurnaceRecipes.smelting().func_151398_b(orestack); // getSmeltingExperience
|
||||
// Lumberjack.info("Registering "+stack+" to smelt to "+smeltingResult+" for "+exp+" experience");
|
||||
GameRegistry.addSmelting(stack, smeltingResult, exp);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ public class ItemMatterCluster extends Item implements ICosmicRenderItem {
|
||||
this.setTextureName("avaritia:mattercluster");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
super.registerIcons(ir);
|
||||
@@ -64,9 +65,8 @@ public class ItemMatterCluster extends Item implements ICosmicRenderItem {
|
||||
return LudicrousItems.cosmic;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean debug) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean debug) {
|
||||
if (!stack.hasTagCompound() || !stack.getTagCompound().hasKey(MAINTAG)) {
|
||||
return;
|
||||
}
|
||||
@@ -267,7 +267,6 @@ public class ItemMatterCluster extends Item implements ICosmicRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getMaskTexture(ItemStack stack, EntityPlayer player) {
|
||||
int count = getClusterSize(stack);
|
||||
if (count == capacity) {
|
||||
@@ -277,7 +276,6 @@ public class ItemMatterCluster extends Item implements ICosmicRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaskMultiplier(ItemStack stack, EntityPlayer player) {
|
||||
int count = getClusterSize(stack);
|
||||
return count / (float) capacity;
|
||||
@@ -293,7 +291,6 @@ public class ItemMatterCluster extends Item implements ICosmicRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
return this.getIcon(stack, 0);
|
||||
}
|
||||
|
||||
@@ -27,9 +27,7 @@ public class ItemResource extends Item implements IHaloRenderItem {
|
||||
"neutron_nugget", "neutronium_ingot", "infinity_catalyst", "infinity_ingot", "record_fragment", "starfuel",
|
||||
"neutronium_gear" };
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] halo;
|
||||
|
||||
public ItemResource() {
|
||||
@@ -39,6 +37,7 @@ public class ItemResource extends Item implements IHaloRenderItem {
|
||||
this.setCreativeTab(Avaritia.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[types.length];
|
||||
@@ -52,9 +51,8 @@ public class ItemResource extends Item implements IHaloRenderItem {
|
||||
halo[1] = ir.registerIcon("avaritia:halonoise");
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List tooltip, boolean wut) {
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean wut) {
|
||||
|
||||
int meta = item.getItemDamage();
|
||||
if (meta != 0 && meta < 8) {
|
||||
@@ -65,7 +63,7 @@ public class ItemResource extends Item implements IHaloRenderItem {
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int dam) {
|
||||
return this.icons[dam % icons.length];
|
||||
}
|
||||
@@ -76,10 +74,8 @@ public class ItemResource extends Item implements IHaloRenderItem {
|
||||
return super.getUnlocalizedName() + "." + types[i];
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int j = 0; j < types.length; ++j) {
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
@@ -107,14 +103,12 @@ public class ItemResource extends Item implements IHaloRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
return (meta >= 2 && meta <= 6) || meta >= 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta == 2 || meta == 3 || meta == 4 || meta == 9) {
|
||||
@@ -124,7 +118,6 @@ public class ItemResource extends Item implements IHaloRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
switch (meta) {
|
||||
@@ -136,14 +129,12 @@ public class ItemResource extends Item implements IHaloRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
return meta == 5 || meta == 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta == 2) {
|
||||
|
||||
@@ -37,7 +37,6 @@ public class ItemSingularity extends Item implements IHaloRenderItem {
|
||||
this.setCreativeTab(Avaritia.tab);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
// System.out.println(foreground);
|
||||
@@ -52,10 +51,8 @@ public class ItemSingularity extends Item implements IHaloRenderItem {
|
||||
return "item.singularity_" + types[i];
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int j = 0; j < types.length; ++j) {
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
@@ -76,7 +73,6 @@ public class ItemSingularity extends Item implements IHaloRenderItem {
|
||||
return foreground;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
@@ -88,9 +84,8 @@ public class ItemSingularity extends Item implements IHaloRenderItem {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List tooltip, boolean wut) {
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean wut) {
|
||||
|
||||
int meta = item.getItemDamage();
|
||||
if (meta == 11) {
|
||||
@@ -101,32 +96,27 @@ public class ItemSingularity extends Item implements IHaloRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack) {
|
||||
return ((ItemResource) LudicrousItems.resource).halo[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack) {
|
||||
if (stack.getItemDamage() == 10) return 8;
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack) {
|
||||
return 0xFF000000;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.Avaritia;
|
||||
import fox.spiteful.avaritia.entity.EntityImmortalItem;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
@@ -40,7 +38,7 @@ public class ItemAxeInfinity extends ItemAxe {
|
||||
|
||||
private static final ToolMaterial opAxe = EnumHelper
|
||||
.addToolMaterial("INFINITY_PICKAXE", 32, 9999, 9999F, 20.0F, 200);
|
||||
private static Map<Integer, List<BlockSwapper>> blockSwappers = new HashMap();
|
||||
private static Map<Integer, List<BlockSwapper>> blockSwappers = new HashMap<>();
|
||||
|
||||
public ItemAxeInfinity() {
|
||||
super(opAxe);
|
||||
@@ -65,7 +63,7 @@ public class ItemAxeInfinity extends ItemAxe {
|
||||
if (ForgeHooks.isToolEffective(stack, block, meta) || block.getMaterial() == Material.leaves) {
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
return Math.max(func_150893_a(stack, block), 6.0F);
|
||||
return Math.max(func_150893_a(stack, block), 6.0F); // getStrVsBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -112,7 +110,7 @@ public class ItemAxeInfinity extends ItemAxe {
|
||||
int originZ, int side) {
|
||||
if (player.isSneaking()) return;
|
||||
ChunkCoordinates coords = new ChunkCoordinates(x, y, z);
|
||||
addBlockSwapper(player.worldObj, player, stack, coords, coords, 32, false, true, new ArrayList());
|
||||
addBlockSwapper(player.worldObj, player, stack, coords, coords, 32, false, true, new ArrayList<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -126,7 +124,6 @@ public class ItemAxeInfinity extends ItemAxe {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack par1ItemStack, int pass) {
|
||||
return false;
|
||||
}
|
||||
@@ -137,7 +134,7 @@ public class ItemAxeInfinity extends ItemAxe {
|
||||
int dim = event.world.provider.dimensionId;
|
||||
if (blockSwappers.containsKey(dim)) {
|
||||
List<BlockSwapper> swappers = blockSwappers.get(dim);
|
||||
List<BlockSwapper> swappersSafe = new ArrayList(swappers);
|
||||
List<BlockSwapper> swappersSafe = new ArrayList<>(swappers);
|
||||
swappers.clear();
|
||||
for (BlockSwapper s : swappersSafe) if (s != null) s.tick();
|
||||
}
|
||||
@@ -158,7 +155,7 @@ public class ItemAxeInfinity extends ItemAxe {
|
||||
force,
|
||||
posChecked);
|
||||
int dim = world.provider.dimensionId;
|
||||
if (!blockSwappers.containsKey(dim)) blockSwappers.put(dim, new ArrayList());
|
||||
if (!blockSwappers.containsKey(dim)) blockSwappers.put(dim, new ArrayList<>());
|
||||
blockSwappers.get(dim).add(swapper);
|
||||
return swapper;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,6 @@ public class ItemBowInfinity extends Item implements ICosmicRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (usingItem != null) {
|
||||
int max = stack.getMaxItemUseDuration();
|
||||
@@ -185,19 +184,16 @@ public class ItemBowInfinity extends Item implements ICosmicRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return super.getIcon(stack, pass);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getMaskTexture(ItemStack stack, EntityPlayer player) {
|
||||
int frame = -1;
|
||||
if (player != null) {
|
||||
@@ -214,7 +210,6 @@ public class ItemBowInfinity extends Item implements ICosmicRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaskMultiplier(ItemStack stack, EntityPlayer player) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@@ -51,9 +51,8 @@ public class ItemPickaxeInfinity extends ItemPickaxe {
|
||||
super.setDamage(stack, 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
ItemStack pick = new ItemStack(this);
|
||||
pick.addEnchantment(Enchantment.fortune, 10);
|
||||
list.add(pick);
|
||||
@@ -72,9 +71,10 @@ public class ItemPickaxeInfinity extends ItemPickaxe {
|
||||
if (ForgeHooks.isToolEffective(stack, block, meta)) {
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
return Math.max(func_150893_a(stack, block), 6.0F);
|
||||
return Math.max(func_150893_a(stack, block), 6.0F); // getStrVsBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
|
||||
@@ -92,7 +92,6 @@ public class ItemPickaxeInfinity extends ItemPickaxe {
|
||||
return itemIcon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
return getIcon(stack, 0);
|
||||
@@ -191,7 +190,6 @@ public class ItemPickaxeInfinity extends ItemPickaxe {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack par1ItemStack, int pass) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -53,9 +53,10 @@ public class ItemShovelInfinity extends ItemSpade {
|
||||
if (ForgeHooks.isToolEffective(stack, block, meta)) {
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
return Math.max(func_150893_a(stack, block), 1.0F);
|
||||
return Math.max(func_150893_a(stack, block), 1.0F); // getStrVsBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
|
||||
@@ -73,7 +74,6 @@ public class ItemShovelInfinity extends ItemSpade {
|
||||
return itemIcon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
return getIcon(stack, 0);
|
||||
@@ -152,7 +152,6 @@ public class ItemShovelInfinity extends ItemSpade {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack par1ItemStack, int pass) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package fox.spiteful.avaritia.items.tools;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -14,14 +12,10 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.Avaritia;
|
||||
import fox.spiteful.avaritia.DamageSourceInfinitySword;
|
||||
import fox.spiteful.avaritia.Lumberjack;
|
||||
import fox.spiteful.avaritia.achievements.Achievements;
|
||||
import fox.spiteful.avaritia.compat.Belmont;
|
||||
import fox.spiteful.avaritia.entity.EntityImmortalItem;
|
||||
@@ -35,17 +29,6 @@ public class ItemSwordInfinity extends ItemSword implements ICosmicRenderItem {
|
||||
private IIcon cosmicMask;
|
||||
private IIcon pommel;
|
||||
|
||||
public static Field stupidMojangProtectedVariable;
|
||||
|
||||
static {
|
||||
try {
|
||||
stupidMojangProtectedVariable = ReflectionHelper
|
||||
.findField(EntityLivingBase.class, "recentlyHit", "field_70718_bc");
|
||||
} catch (Exception e) {
|
||||
Lumberjack.log(Level.ERROR, e);
|
||||
}
|
||||
}
|
||||
|
||||
public ItemSwordInfinity() {
|
||||
super(opSword);
|
||||
setUnlocalizedName("infinity_sword");
|
||||
@@ -70,12 +53,8 @@ public class ItemSwordInfinity extends ItemSword implements ICosmicRenderItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
stupidMojangProtectedVariable.setInt(victim, 60);
|
||||
} catch (Exception e) {
|
||||
Lumberjack.log(Level.ERROR, e, "The sword isn't reflecting right! Polish it!");
|
||||
}
|
||||
victim.func_110142_aN()
|
||||
victim.recentlyHit = 60;
|
||||
victim.func_110142_aN() // getCombatTracker
|
||||
.func_94547_a(new DamageSourceInfinitySword(player), victim.getHealth(), victim.getHealth());
|
||||
victim.setHealth(0);
|
||||
if (Belmont.isVampire(victim)) victim.onDeath(new EntityDamageSource("infinity", player).setFireDamage());
|
||||
@@ -90,7 +69,7 @@ public class ItemSwordInfinity extends ItemSword implements ICosmicRenderItem {
|
||||
if (victim.capabilities.isCreativeMode && !victim.isDead
|
||||
&& victim.getHealth() > 0
|
||||
&& !LudicrousItems.isInfinite(victim)) {
|
||||
victim.func_110142_aN()
|
||||
victim.func_110142_aN() // getCombatTracker
|
||||
.func_94547_a(new DamageSourceInfinitySword(player), victim.getHealth(), victim.getHealth());
|
||||
victim.setHealth(0);
|
||||
victim.onDeath(new EntityDamageSource("infinity", player));
|
||||
@@ -112,13 +91,11 @@ public class ItemSwordInfinity extends ItemSword implements ICosmicRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getMaskTexture(ItemStack stack, EntityPlayer player) {
|
||||
return cosmicMask;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaskMultiplier(ItemStack stack, EntityPlayer player) {
|
||||
return 1.0f;
|
||||
}
|
||||
@@ -141,7 +118,6 @@ public class ItemSwordInfinity extends ItemSword implements ICosmicRenderItem {
|
||||
return super.getIcon(stack, pass);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
@@ -158,7 +134,6 @@ public class ItemSwordInfinity extends ItemSword implements ICosmicRenderItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack par1ItemStack, int pass) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,8 @@ public class ItemSwordSkulls extends ItemSword {
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List tooltip, boolean wut) {
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List<String> tooltip, boolean wut) {
|
||||
tooltip.add(
|
||||
EnumChatFormatting.DARK_GRAY + ""
|
||||
+ EnumChatFormatting.ITALIC
|
||||
|
||||
@@ -8,13 +8,8 @@ import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
public class CosmicBowRenderer extends CosmicItemRenderer implements IItemRenderer {
|
||||
|
||||
private static String[] iiuObf = new String[] { "itemInUse", "field_71074_e", "f" };
|
||||
private static String[] iiucObf = new String[] { "itemInUseCount", "field_71072_f", "g" };
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack stack, Object... data) {
|
||||
if (type == ItemRenderType.EQUIPPED) {
|
||||
@@ -28,12 +23,11 @@ public class CosmicBowRenderer extends CosmicItemRenderer implements IItemRender
|
||||
}
|
||||
|
||||
public static int getBowFrame(EntityPlayer player) {
|
||||
ItemStack inuse = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, iiuObf);
|
||||
int time = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, iiucObf);
|
||||
ItemStack inuse = player.getItemInUse();
|
||||
|
||||
if (inuse != null) {
|
||||
int max = inuse.getMaxItemUseDuration();
|
||||
double pull = (max - time) / (double) max;
|
||||
double pull = (max - player.getItemInUseCount()) / (double) max;
|
||||
return Math.max(0, (int) Math.ceil(pull * 3.0) - 1);
|
||||
}
|
||||
return 0;
|
||||
@@ -43,11 +37,14 @@ public class CosmicBowRenderer extends CosmicItemRenderer implements IItemRender
|
||||
public IIcon getStackIcon(ItemStack stack, int pass, EntityPlayer player) {
|
||||
Item item = stack.getItem();
|
||||
ItemStack inuse;
|
||||
if (player != null) inuse = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, iiuObf);
|
||||
else inuse = stack;
|
||||
int time;
|
||||
if (player != null) time = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, iiucObf);
|
||||
else time = 0;
|
||||
if (player != null) {
|
||||
inuse = player.getItemInUse();
|
||||
time = player.getItemInUseCount();
|
||||
} else {
|
||||
inuse = stack;
|
||||
time = 0;
|
||||
}
|
||||
|
||||
return item.getIcon(stack, pass, player, inuse, time);
|
||||
}
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
package fox.spiteful.avaritia.render;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.lwjgl.opengl.ARBShaderObjects;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import fox.spiteful.avaritia.Lumberjack;
|
||||
|
||||
public class CosmicRenderShenanigans {
|
||||
|
||||
public static final ShaderCallback shaderCallback;
|
||||
|
||||
public static float[] lightlevel = new float[3];
|
||||
|
||||
public static String[] lightmapobf = new String[] { "lightmapColors", "field_78504_Q", "U" };
|
||||
public static boolean inventoryRender = false;
|
||||
public static float cosmicOpacity = 1.0f;
|
||||
|
||||
@@ -76,8 +67,6 @@ public class CosmicRenderShenanigans {
|
||||
ShaderHelper.releaseShader();
|
||||
}
|
||||
|
||||
private static Field mapfield = ReflectionHelper.findField(EntityRenderer.class, lightmapobf);
|
||||
|
||||
public static void setLightFromLocation(World world, int x, int y, int z) {
|
||||
if (world == null) {
|
||||
setLightLevel(1.0f);
|
||||
@@ -86,12 +75,7 @@ public class CosmicRenderShenanigans {
|
||||
|
||||
int coord = world.getLightBrightnessForSkyBlocks(x, y, z, 0);
|
||||
|
||||
int[] map = null;
|
||||
try {
|
||||
map = (int[]) mapfield.get(Minecraft.getMinecraft().entityRenderer);
|
||||
} catch (Exception e) {
|
||||
Lumberjack.log(Level.ERROR, e, "Failure to get light map");
|
||||
}
|
||||
int[] map = Minecraft.getMinecraft().entityRenderer.lightmapColors;
|
||||
if (map == null) {
|
||||
setLightLevel(1.0f);
|
||||
return;
|
||||
|
||||
@@ -217,7 +217,7 @@ public class FracturedOreRenderer implements IItemRenderer {
|
||||
Item oreitem = orestack.getItem();
|
||||
if (oreitem instanceof ItemBlock) {
|
||||
ItemBlock ib = (ItemBlock) oreitem;
|
||||
Block b = ib.field_150939_a;
|
||||
Block b = ib.field_150939_a; // blockInstance
|
||||
|
||||
if (b instanceof ITileEntityProvider) {
|
||||
unknown = true;
|
||||
|
||||
@@ -4,14 +4,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public interface ICosmicRenderItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getMaskTexture(ItemStack stack, EntityPlayer player);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaskMultiplier(ItemStack stack, EntityPlayer player);
|
||||
}
|
||||
@@ -3,23 +3,15 @@ package fox.spiteful.avaritia.render;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IHaloRenderItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack);
|
||||
}
|
||||
@@ -20,12 +20,9 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.items.ItemArmorInfinity;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelArmorInfinity extends ModelBiped {
|
||||
|
||||
public static final ModelArmorInfinity armorModel = new ModelArmorInfinity(1.0f);
|
||||
@@ -95,12 +92,11 @@ public class ModelArmorInfinity extends ModelBiped {
|
||||
return this;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void rebuildWings() {
|
||||
|
||||
// remove the old items from the list so that the new ones don't just stack up
|
||||
if (this.bipedBody.childModels == null) {
|
||||
this.bipedBody.childModels = new ArrayList();
|
||||
this.bipedBody.childModels = new ArrayList<>();
|
||||
}
|
||||
if (this.bipedLeftWing != null) {
|
||||
this.bipedBody.childModels.remove(this.bipedLeftWing);
|
||||
@@ -423,7 +419,6 @@ public class ModelArmorInfinity extends ModelBiped {
|
||||
this.expand = expand;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void rebuild(IIcon icon, IIcon wingicon) {
|
||||
int ox = MathHelper.floor_float(icon.getMinU() * itempagewidth);
|
||||
int oy = MathHelper.floor_float(icon.getMinV() * itempageheight);
|
||||
@@ -467,7 +462,7 @@ public class ModelArmorInfinity extends ModelBiped {
|
||||
int oyw = MathHelper.floor_float(wingicon.getMinV() * itempageheight);
|
||||
|
||||
if (this.bipedBody.childModels == null) {
|
||||
this.bipedBody.childModels = new ArrayList();
|
||||
this.bipedBody.childModels = new ArrayList<>();
|
||||
}
|
||||
if (this.bipedLeftWing != null) {
|
||||
this.bipedBody.childModels.remove(this.bipedLeftWing);
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
package fox.spiteful.avaritia.render;
|
||||
|
||||
/*
|
||||
* import java.util.Map; public class MorvInABoxRenderer implements IItemRenderer { private static GameProfile morvy;//
|
||||
* = new GameProfile(UUID.fromString(), "Morvelaira"); private static ResourceLocation skin = null; public
|
||||
* MorvInABoxRenderer() { NBTTagCompound morvytag = new NBTTagCompound(); morvytag.setString("Id",
|
||||
* "67b0b9d7-c003-4b12-8ee1-f233424a219c"); morvy = new GameProfile(null, "Morvelaira"); }
|
||||
* @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return true; }
|
||||
* @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
* return helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING; }
|
||||
* @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { this.getMorvy(); Minecraft mc
|
||||
* = Minecraft.getMinecraft(); switch(type) { case ENTITY : { GL11.glPushMatrix(); GL11.glTranslatef(-0.5F, 0F, 0F);
|
||||
* if(item.isOnItemFrame()) GL11.glTranslatef(0F, -0.3F, 0.01F); render(item, null); GL11.glPopMatrix(); break; } case
|
||||
* EQUIPPED : { render(item, data[1] instanceof EntityPlayer ? (EntityPlayer) data[1] : null); break; } case
|
||||
* EQUIPPED_FIRST_PERSON : { render(item, data[1] instanceof EntityPlayer ? (EntityPlayer) data[1] : null); break; }
|
||||
* case INVENTORY: { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA,
|
||||
* GL11.GL_ONE_MINUS_SRC_ALPHA); RenderHelper.enableGUIStandardItemLighting(); GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
* GL11.glDisable(GL11.GL_DEPTH_TEST); RenderItem r = RenderItem.getInstance(); r.renderItemIntoGUI(mc.fontRenderer,
|
||||
* mc.getTextureManager(), item, 0, 0, true); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
* GL11.glEnable(GL11.GL_DEPTH_TEST); r.renderWithColor = true; Tessellator t = Tessellator.instance; if (skin != null)
|
||||
* { GL11.glPushMatrix(); GL11.glScaled(0.4, 0.4, 1.0); GL11.glTranslated(16, 10, 0); GL11.glRotated(20, 0, 0, 1);
|
||||
* mc.getTextureManager().bindTexture(skin); float minu = 8/64.0f; float maxu = 16/64.0f; float minv = 8/32.0f; float
|
||||
* maxv = 16/32.0f; t.startDrawingQuads(); t.addVertexWithUV(0, 0, 0, minu, minv); t.addVertexWithUV(0, 16, 0, minu,
|
||||
* maxv); t.addVertexWithUV(16, 16, 0, maxu, maxv); t.addVertexWithUV(16, 0, 0, maxu, minv); t.draw(); minu = 40/64.0f;
|
||||
* maxu = 48/64.0f; minv = 8/32.0f; maxv = 16/32.0f; t.startDrawingQuads(); t.addVertexWithUV(-1, -1, 0, minu, minv);
|
||||
* t.addVertexWithUV(-1, 17, 0, minu, maxv); t.addVertexWithUV(17, 17, 0, maxu, maxv); t.addVertexWithUV(17, -1, 0,
|
||||
* maxu, minv); t.draw(); mc.getTextureManager().bindTexture(TextureMap.locationItemsTexture); GL11.glPopMatrix(); }
|
||||
* IIcon icon = ((ItemMorvInABox)(LudicrousItems.morv_in_a_box)).nameoverlay; GL11.glColor4d(1, 1, 1, 1); float minu =
|
||||
* icon.getMinU(); float maxu = icon.getMaxU(); float minv = icon.getMinV(); float maxv = icon.getMaxV();
|
||||
* t.startDrawingQuads(); t.addVertexWithUV(0, 0, 0, minu, minv); t.addVertexWithUV(0, 16, 0, minu, maxv);
|
||||
* t.addVertexWithUV(16, 16, 0, maxu, maxv); t.addVertexWithUV(16, 0, 0, maxu, minv); t.draw();
|
||||
* GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); break; } default : break; } } public void render(ItemStack item,
|
||||
* EntityPlayer player) { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA,
|
||||
* GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1F, 1F, 1F, 1F); //ItemRenderer.renderItemIn2D(Tessellator.instance, f1,
|
||||
* f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale); IIcon icon = item.getItem().getIcon(item, 0); float f =
|
||||
* icon.getMinU(); float f1 = icon.getMaxU(); float f2 = icon.getMinV(); float f3 = icon.getMaxV();
|
||||
* ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(),
|
||||
* 1.0f/16.0f); if (skin != null) { Minecraft mc = Minecraft.getMinecraft(); GL11.glPushMatrix(); GL11.glScaled(0.4,
|
||||
* 0.4, 1.0); GL11.glTranslated(15.0/16.0, 10.0/16.0, 0.0001); GL11.glRotated(20, 0, 0, 1);
|
||||
* //GL11.glDisable(GL11.GL_DEPTH_TEST); //GL11.glDepthFunc(GL11.GL_EQUAL); mc.getTextureManager().bindTexture(skin); f
|
||||
* = 8/64.0f; f1 = 16/64.0f; f2 = 8/32.0f; f3 = 16/32.0f; ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f,
|
||||
* f3, icon.getIconWidth(), icon.getIconHeight(), 1.0025f/16.0f); f = 40/64.0f; f1 = 48/64.0f; f2 = 8/32.0f; f3 =
|
||||
* 16/32.0f; GL11.glTranslated(-.35/16.0, -.35/16.0, 0.0002); GL11.glScaled(17/16.0, 17/16.0, 1.0);
|
||||
* ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(),
|
||||
* 1.006f/16.0f); mc.getTextureManager().bindTexture(TextureMap.locationItemsTexture);
|
||||
* //GL11.glDepthFunc(GL11.GL_LEQUAL); //GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glPopMatrix(); } icon =
|
||||
* ((ItemMorvInABox)(LudicrousItems.morv_in_a_box)).nameoverlay; f = icon.getMinU(); f1 = icon.getMaxU(); f2 =
|
||||
* icon.getMinV(); f3 = icon.getMaxV(); GL11.glPushMatrix(); GL11.glTranslated(0, 0, 0.0004);
|
||||
* ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(),
|
||||
* 1.008f/16.0f); GL11.glPopMatrix(); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
* }
|
||||
* @SuppressWarnings("rawtypes") public void getMorvy() { if (!morvy.isComplete() ||
|
||||
* !morvy.getProperties().containsKey("textures")) { GameProfile gameprofile = null; //Which one is returning null? Who
|
||||
* knooooooooows if(MinecraftServer.getServer() != null && MinecraftServer.getServer().func_152358_ax() != null && morvy
|
||||
* != null) gameprofile = MinecraftServer.getServer().func_152358_ax().func_152655_a(morvy.getName()); if (gameprofile
|
||||
* != null) { Property property = (Property)Iterables.getFirst(gameprofile.getProperties().get("textures"),
|
||||
* (Object)null); if (property == null) { gameprofile =
|
||||
* MinecraftServer.getServer().func_147130_as().fillProfileProperties(gameprofile, true); } } morvy = gameprofile; } if
|
||||
* (skin == null) { //Lumberjack.info("2"); Minecraft minecraft = Minecraft.getMinecraft(); Map map =
|
||||
* minecraft.func_152342_ad().func_152788_a(morvy); //Map map =
|
||||
* minecraft.func_152342_ad().func_152788_a(Minecraft.getMinecraft().thePlayer.getGameProfile());
|
||||
* //Lumberjack.info(map); if (map.containsKey(Type.SKIN)) { //Lumberjack.info("3"); skin =
|
||||
* minecraft.func_152342_ad().func_152792_a((MinecraftProfileTexture)map.get(Type.SKIN), Type.SKIN); } } } }
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ public class TileLudicrous extends TileEntity {
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
|
||||
super.onDataPacket(net, packet);
|
||||
readCustomNBT(packet.func_148857_g());
|
||||
readCustomNBT(packet.func_148857_g()); // getNbtCompound
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,8 +7,7 @@
|
||||
|
||||
package fox.spiteful.avaritia.tile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
@@ -16,13 +15,10 @@ import net.minecraft.world.World;
|
||||
public final class VanillaPacketDispatcher {
|
||||
|
||||
public static void dispatchTEToNearbyPlayers(TileEntity tile) {
|
||||
World world = tile.getWorldObj();
|
||||
List players = world.playerEntities;
|
||||
for (Object player : players) if (player instanceof EntityPlayerMP) {
|
||||
EntityPlayerMP mp = (EntityPlayerMP) player;
|
||||
if (pointDistancePlane(mp.posX, mp.posZ, tile.xCoord + 0.5, tile.zCoord + 0.5) < 64)
|
||||
((EntityPlayerMP) player).playerNetServerHandler.sendPacket(tile.getDescriptionPacket());
|
||||
}
|
||||
for (EntityPlayer player : tile.getWorldObj().playerEntities) if (player instanceof EntityPlayerMP mp
|
||||
&& pointDistancePlane(mp.posX, mp.posZ, tile.xCoord + 0.5, tile.zCoord + 0.5) < 64) {
|
||||
mp.playerNetServerHandler.sendPacket(tile.getDescriptionPacket());
|
||||
}
|
||||
}
|
||||
|
||||
public static void dispatchTEToNearbyPlayers(World world, int x, int y, int z) {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
protected net.minecraft.entity.projectile.EntityArrow field_70252_j # ticksInGround
|
||||
protected net.minecraft.entity.projectile.EntityArrow field_70254_i # inGround
|
||||
public net.minecraft.entity.EntityLivingBase field_70718_bc # recentlyHit
|
||||
public net.minecraft.potion.Potion field_76418_K # isBadEffect
|
||||
public net.minecraft.client.renderer.EntityRenderer field_78504_Q # lightmapColors
|
||||
Reference in new issue
Block a user