mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-10-26 14:24:14 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8478c00dc | ||
|
|
1f144067a9 | ||
|
|
9d2c64c34c | ||
|
|
37fbe0a668 | ||
|
|
1eba34b256 | ||
|
|
d5b4687dbf | ||
|
|
7cf2bcca38 | ||
|
|
cef6034f0d | ||
|
|
505da020e4 | ||
|
|
7ca87b36cd | ||
|
|
ee5164c3b3 | ||
|
|
59a478d14c | ||
|
|
21981128ac | ||
|
|
e65bfc1ea6 | ||
|
|
52f6b868ba | ||
|
|
162d9c46d6 | ||
|
|
c867c3a3a1 | ||
|
|
6ed7fc5cc6 | ||
|
|
759018100c | ||
|
|
f0d845ee3f | ||
|
|
1032180d60 | ||
|
|
614e5541d5 | ||
|
|
9c2c528df1 | ||
|
|
06eca83f44 | ||
|
|
57c5b560e8 | ||
|
|
5917addb7e | ||
|
|
d73596cb82 | ||
|
|
bc9f1093c2 | ||
|
|
9e210c2602 | ||
|
|
1f0d2aafe8 | ||
|
|
24b3af116c |
No files matched your search
+7
-1
@@ -1,5 +1,11 @@
|
||||
######## 1.0.2h ########
|
||||
-added config option to disable flight.
|
||||
-removed some log spam.
|
||||
-fixed issue which makes it impossible to charge new bows after crafting.
|
||||
-fixed config option to disable arrow explosion damage.
|
||||
|
||||
######## 1.0.2g ########
|
||||
-fixed server crash
|
||||
-fixed server crash.
|
||||
|
||||
######## 1.0.2f ########
|
||||
-fixed shield sound effect being too loud.
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
Version:1.0.2g
|
||||
Version:1.0.2h
|
||||
Snapshot:0
|
||||
ReleaseNote:Fixed a little server crash
|
||||
ReleaseNote:Fixed issue with charging bows.
|
||||
@@ -25,6 +25,7 @@ repositories {
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'signing'
|
||||
|
||||
// Define properties file
|
||||
ext.configFile = file "build.properties"
|
||||
@@ -98,4 +99,19 @@ artifacts {
|
||||
archives deobfJar
|
||||
archives sourceJar
|
||||
archives jar
|
||||
}
|
||||
|
||||
task signJar(dependsOn: 'reobf'){
|
||||
doLast {
|
||||
ant.signjar(
|
||||
destDir: jar.destinationDir,
|
||||
jar: jar.getArchivePath(),
|
||||
alias: findProperty('keyStoreAlias') ?: '',
|
||||
keystore: findProperty('keyStore') ?: '',
|
||||
storepass: findProperty('keyStorePass') ?: '',
|
||||
digestalg: findProperty('signDigestAlg') ?: '',
|
||||
tsaurl: findProperty('signTSAurl') ?: '',
|
||||
verbose: true
|
||||
)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
minecraft_version=1.7.10
|
||||
mod_version=1.0.2g
|
||||
mod_version=1.0.2o
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
CCLIB_version=1.1.3.140
|
||||
NEI_version=1.0.5.120
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -52,7 +52,6 @@ public class GUIDissEnchanter extends GuiContainer {
|
||||
fontRendererObj.drawString("Damage: " + (40 - tile.bookPower) + "%", 5, 49, 0x0000ff);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -117,7 +117,6 @@ public class GUIDraconiumChest extends GuiContainer implements INEIGuiHandler {
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -35,7 +35,7 @@ public class GUIGenerator extends GuiContainer {
|
||||
this.player = invPlayer.player;
|
||||
}
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/gui/Grinder.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/gui/GGrinder.png");
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int X, int Y) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class GUIGrinder extends GuiContainer {
|
||||
this.player = invPlayer.player;
|
||||
}
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/gui/Grinder.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/gui/GGrinder.png");
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int X, int Y) {
|
||||
|
||||
@@ -116,7 +116,6 @@ public class GUIParticleGenerator extends GuiScreen {
|
||||
super.mouseClicked(x, y, button);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
int posX = (this.width - xSize) / 2;
|
||||
@@ -524,7 +523,6 @@ public class GUIParticleGenerator extends GuiScreen {
|
||||
fontRendererObj.drawString("> " + random_scale1, col2, posY + ln2 + 7 * 22, 0x000000, false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void page1Buttons() {
|
||||
int posX = (this.width - xSize) / 2;
|
||||
int posY = (this.height - ySize) / 2;
|
||||
@@ -616,7 +614,6 @@ public class GUIParticleGenerator extends GuiScreen {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void page2Buttons() {
|
||||
int posX = (this.width - xSize) / 2;
|
||||
int posY = (this.height - ySize) / 2;
|
||||
@@ -689,7 +686,6 @@ public class GUIParticleGenerator extends GuiScreen {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void page3Buttons() {
|
||||
int posX = (this.width - xSize) / 2;
|
||||
int posY = (this.height - ySize) / 2;
|
||||
|
||||
@@ -84,7 +84,6 @@ public class GUIPlayerDetector extends GuiContainer {
|
||||
drawHoveringText(lines, x, y, fontRendererObj);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -48,7 +48,6 @@ public class GUISunDial extends GuiContainer {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -302,7 +302,6 @@ public class GUITeleporter extends GuiScreen {
|
||||
else if (!editingNew) ((GuiButton) buttonList.get(4)).enabled = true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
buttonList.clear();
|
||||
|
||||
@@ -231,7 +231,6 @@ public class GUIUpgradeModifier extends GuiContainer {
|
||||
fontRendererObj.drawString(">" + (coreSlots - usedSlots), guiLeft + 4, guiTop + 67, 0x000000);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float f) {
|
||||
super.drawScreen(x, y, f);
|
||||
|
||||
@@ -61,7 +61,6 @@ public class GUIWeatherController extends GuiContainer {
|
||||
public static final String STORM_TEXT = "Thunder Storm";
|
||||
public static String text;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -30,7 +30,6 @@ public class GuiHudConfig extends GuiScreen {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
+17
-12
@@ -325,7 +325,7 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
List<String> content;
|
||||
|
||||
reader.beginArray();
|
||||
|
||||
|
||||
//Read next page
|
||||
while (reader.hasNext()) {
|
||||
String name;
|
||||
@@ -335,13 +335,16 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
content = new ArrayList<String>();
|
||||
|
||||
reader.beginObject();
|
||||
|
||||
|
||||
//Read page name
|
||||
String s = reader.nextName();
|
||||
if (s.equals("name")) {
|
||||
name = reader.nextString();
|
||||
} else
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"name\" [Found:\"" + s + "\"])");
|
||||
} else {
|
||||
reader.close();
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"name\" [Found:\"" + s + "\"])");
|
||||
}
|
||||
|
||||
|
||||
//Read page images
|
||||
s = reader.nextName();
|
||||
@@ -362,9 +365,10 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
if (!imageURLs.contains(url)) imageURLs.add(url);
|
||||
}
|
||||
reader.endArray();
|
||||
} else
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"images\" [Found:\"" + s + "\"])");
|
||||
|
||||
} else{
|
||||
reader.close();
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"name\" [Found:\"" + s + "\"])");
|
||||
}
|
||||
//Read page content
|
||||
s = reader.nextName();
|
||||
if (s.equals("content")) {
|
||||
@@ -373,17 +377,17 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
content.add(reader.nextString());
|
||||
}
|
||||
reader.endArray();
|
||||
} else
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"content\" [Found:\"" + s + "\"])");
|
||||
|
||||
} else{
|
||||
reader.close();
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"name\" [Found:\"" + s + "\"])");
|
||||
}
|
||||
reader.endObject();
|
||||
|
||||
if (isValidPage(name))
|
||||
pageList.add(new ManualPage(name, images.toArray(new String[images.size()]), content.toArray(new String[content.size()]), nameL, meta));
|
||||
}
|
||||
|
||||
reader.endArray();
|
||||
|
||||
reader.close();
|
||||
}
|
||||
catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
@@ -391,6 +395,7 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-1
@@ -48,7 +48,6 @@ public class GUIToolConfig extends GUIBase {
|
||||
addDependentComponents();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
-1
@@ -71,7 +71,6 @@ public class ComponentFieldButton extends ComponentBase {
|
||||
drawString(fontRendererObj, field.getLocalizedName(), x + offsetX + 2, y + offsetY + (getHeight() / 2) - (fontRendererObj.FONT_HEIGHT / 2), 0xffffff);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void renderFinal(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
if (isMouseOver(mouseX, mouseY)) {
|
||||
|
||||
-1
@@ -380,7 +380,6 @@ public class ComponentManualPage extends ComponentScrollingBase {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Object[] getRecipeInput(IRecipe recipe) {
|
||||
if (recipe instanceof ShapelessOreRecipe) return ((ShapelessOreRecipe) recipe).getInput().toArray();
|
||||
else if (recipe instanceof ShapedOreRecipe) return getShapedOreRecipe((ShapedOreRecipe) recipe);
|
||||
|
||||
@@ -107,6 +107,7 @@ public class KeyInputHandler {
|
||||
if (c > 0 && c < 8) return c + i;
|
||||
if (c == 0 && i < 0) return 8;
|
||||
if (c == 8 && i > 0) return 0;
|
||||
if (c == 150 && i < 0) return 152;
|
||||
return c + i;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RenderTileCrystal extends TileEntitySpecialRenderer {
|
||||
private IModelCustom modelCrystalTransceiver;
|
||||
|
||||
public RenderTileCrystal() {
|
||||
modelCrystal = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/Crystal.obj"));
|
||||
modelCrystal = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/CCrystal.obj"));
|
||||
modelCrystalTransceiver = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/CrystalTransceiver.obj"));
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,6 @@ public class CommonProxy {
|
||||
DETab.initialize();
|
||||
PotionHandler.init();
|
||||
CCOCIntegration.init();
|
||||
ModHelper.init();
|
||||
DragonChunkLoader.init();
|
||||
|
||||
LogHelper.info("Finished Initialization");
|
||||
|
||||
@@ -69,7 +69,6 @@ public class DraconiumBlock extends BlockDE {
|
||||
return icons[meta];
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs p_149666_2_, List list) {
|
||||
|
||||
@@ -68,7 +68,6 @@ public class InfusedObsidian extends BlockDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
list.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("info.infusedObsidian.txt"));
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ public class CKeyStoneItemBlock extends ItemBlock {
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
|
||||
-1
@@ -18,7 +18,6 @@ public class DraconiumChestItemBlock extends ItemBlockCustomData {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
list.add(StatCollector.translateToLocal("info.draconiumChestInfo1.txt"));
|
||||
|
||||
-2
@@ -29,7 +29,6 @@ public class DraconiumItemBlock extends ItemBlock implements IEnergyContainerIte
|
||||
protected int maxReceive = BalanceConfigHandler.draconiumBlockChargingSpeed;
|
||||
protected int maxExtract = BalanceConfigHandler.draconiumBlockChargingSpeed;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
@@ -94,7 +93,6 @@ public class DraconiumItemBlock extends ItemBlock implements IEnergyContainerIte
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
if (stack.hasTagCompound()) list.add(getEnergyStored(stack) + " / " + getMaxEnergyStored(stack) + "RF");
|
||||
|
||||
-1
@@ -47,7 +47,6 @@ public class EnergyCrystal extends BlockDE implements IHudDisplayBlock {
|
||||
ModBlocks.register(this, EnergyCrystalItemBlock.class);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs p_149666_2_, List list) {
|
||||
|
||||
@@ -65,7 +65,6 @@ public class Generator extends BlockCustomDrop {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List par3list) {
|
||||
|
||||
@@ -63,7 +63,6 @@ public class Grinder extends BlockCustomDrop {
|
||||
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List par3list) {
|
||||
|
||||
-1
@@ -95,7 +95,6 @@ public class WeatherController extends BlockCustomDrop {
|
||||
else return icon_top;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List par3list) {
|
||||
|
||||
-1
@@ -51,7 +51,6 @@ public class ContainerPlayerDetector extends Container {
|
||||
addSlotToContainer(new SlotOpaqueBlock(tileDetector, 0, 145, 15));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void updateContainerSlots() {
|
||||
if (gui == null) {
|
||||
return;
|
||||
|
||||
+3
-2
@@ -83,8 +83,9 @@ public class EntityChaosCrystal extends EntityLivingBase {
|
||||
int j = MathHelper.floor_double(this.posY);
|
||||
int k = MathHelper.floor_double(this.posZ);
|
||||
|
||||
if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k).isBlockSolid(this.worldObj, i, j, k, 0) && this.worldObj.getBlock(i, j, k) != Blocks.fire)
|
||||
if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k).isBlockSolid(this.worldObj, i, j, k, 0) && this.worldObj.getBlock(i, j, k) != Blocks.fire) {
|
||||
this.worldObj.setBlock(i, j, k, Blocks.fire);
|
||||
}
|
||||
|
||||
} else if (deathAnimation > 0) deathAnimation -= 0.1F;
|
||||
|
||||
@@ -170,7 +171,7 @@ public class EntityChaosCrystal extends EntityLivingBase {
|
||||
|
||||
private EntityChaosGuardian getGuardian() {
|
||||
if (guardian == null) {
|
||||
@SuppressWarnings("unchecked") List<EntityChaosGuardian> list = worldObj.getEntitiesWithinAABB(EntityChaosGuardian.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(512, 512, 512));
|
||||
List<EntityChaosGuardian> list = worldObj.getEntitiesWithinAABB(EntityChaosGuardian.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(512, 512, 512));
|
||||
if (list.size() > 0) guardian = list.get(0);
|
||||
if (guardian != null && guardian.crystals != null && !guardian.crystals.contains(this)) {
|
||||
guardian.crystals.add(this);
|
||||
|
||||
+5
-2
@@ -443,6 +443,9 @@ public class EntityChaosGuardian extends EntityDragon {//summon DraconicEvolutio
|
||||
case GUARDING:
|
||||
break;
|
||||
|
||||
case FIREBOMB:
|
||||
break;
|
||||
|
||||
case CHARGING:
|
||||
if (Utills.getDistanceAtoB(posX, posZ, homeX, homeZ) > 300) behaviour = EnumBehaviour.GO_HOME;
|
||||
break;
|
||||
@@ -530,7 +533,7 @@ public class EntityChaosGuardian extends EntityDragon {//summon DraconicEvolutio
|
||||
else if (nextAttackTimer == 0) {
|
||||
|
||||
Entity attackTarget = target;
|
||||
@SuppressWarnings("unchecked") List<EntityPlayer> targets = attackTarget == null ? worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(homeX, homeY, homeZ, homeX, homeY, homeZ).expand(100, 100, 100)) : null;
|
||||
List<EntityPlayer> targets = attackTarget == null ? worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(homeX, homeY, homeZ, homeX, homeY, homeZ).expand(100, 100, 100)) : null;
|
||||
|
||||
if (targets != null && targets.size() > 0) {
|
||||
Iterator<EntityPlayer> i = targets.iterator();
|
||||
@@ -748,7 +751,7 @@ public class EntityChaosGuardian extends EntityDragon {//summon DraconicEvolutio
|
||||
|
||||
break;
|
||||
case FIREBOMB:
|
||||
@SuppressWarnings("unchecked") List<EntityPlayer> targets = worldObj.getEntitiesWithinAABB(EntityPlayer.class, boundingBox.expand(150, 150, 150));
|
||||
List<EntityPlayer> targets = worldObj.getEntitiesWithinAABB(EntityPlayer.class, boundingBox.expand(150, 150, 150));
|
||||
target = null;
|
||||
while (targets.size() > 0 && target == null) {
|
||||
EntityPlayer potentialTarget = targets.get(rand.nextInt(targets.size()));
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class EntityChaosVortex extends Entity {
|
||||
double intensity = (ticksExisted - 130) / 100D;
|
||||
if (intensity > 1D) intensity = 1D;
|
||||
|
||||
@SuppressWarnings("unchecked") List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, boundingBox.expand(200, 200, 200));
|
||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, boundingBox.expand(200, 200, 200));
|
||||
|
||||
for (EntityPlayer player : players) {
|
||||
double x = (rand.nextDouble() - 0.5) * 2 * intensity;
|
||||
|
||||
+2
-2
@@ -3,6 +3,7 @@ package com.brandon3055.draconicevolution.common.entity;
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
|
||||
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.items.weapons.BowHandler;
|
||||
import com.brandon3055.draconicevolution.common.network.GenericParticlePacket;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
@@ -93,7 +94,6 @@ public class EntityCustomArrow extends EntityArrow {
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
//region Entity Update And motion
|
||||
@@ -416,7 +416,7 @@ public class EntityCustomArrow extends EntityArrow {
|
||||
|
||||
public void onHitAnything() {
|
||||
if (bowProperties.explosionPower > 0 && !worldObj.isRemote) {
|
||||
worldObj.createExplosion(this, prevPosX, prevPosY, prevPosZ, bowProperties.explosionPower, true);
|
||||
worldObj.createExplosion(this, prevPosX, prevPosY, prevPosZ, bowProperties.explosionPower, ConfigHandler.bowBlockDamage);
|
||||
setDead();
|
||||
}
|
||||
if (bowProperties.shockWavePower > 0 && !worldObj.isRemote) {
|
||||
|
||||
@@ -108,7 +108,6 @@ public class EntityDraconicArrow extends EntityArrow {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
//super.onUpdate();
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ public class EntityDragonHeart extends Entity {
|
||||
}
|
||||
break;
|
||||
}
|
||||
@SuppressWarnings("unchecked") List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5));
|
||||
List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5));
|
||||
for (EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if (Utills.getDistanceAtoB(posX, posY + 0.5, posZ, item.posX, item.posY, item.posZ) < 1) {
|
||||
|
||||
+3
-3
@@ -216,8 +216,8 @@ public class EntityDragonProjectile extends Entity {
|
||||
worldObj.playSoundEffect(posX, posY, posZ, "random.explode", 4.0F, (1.0F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
int i = 3 + rand.nextInt(3);
|
||||
EntityDragonProjectile newProjectile;
|
||||
@SuppressWarnings("unchecked") List<EntityLivingBase> list = worldObj.getEntitiesWithinAABBExcludingEntity(shooter, boundingBox.expand(60, 60, 60), Utills.selectPlayer);
|
||||
for (i = i; i > 0; i--) {
|
||||
List<EntityLivingBase> list = worldObj.getEntitiesWithinAABBExcludingEntity(shooter, boundingBox.expand(60, 60, 60), Utills.selectPlayer);
|
||||
for (i =+ 0; i > 0; i--) {
|
||||
newProjectile = new EntityDragonProjectile(worldObj, MINI_CHAOS_CHASER, list.size() > 0 ? list.get(rand.nextInt(list.size())) : null, power / 2F, shooter);
|
||||
newProjectile.motionY = 0;
|
||||
int randDir = rand.nextInt();
|
||||
@@ -285,7 +285,7 @@ public class EntityDragonProjectile extends Entity {
|
||||
|
||||
private void damageEntitiesInRadius(DamageSource source, double radius, float damage) {
|
||||
if (worldObj.isRemote) return;
|
||||
@SuppressWarnings("unchecked") List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(radius, radius, radius));
|
||||
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(radius, radius, radius));
|
||||
|
||||
for (EntityLivingBase entityLivingBase : entities) {
|
||||
if (entityLivingBase == shooter) continue;
|
||||
|
||||
@@ -102,7 +102,6 @@ public class EntityEnderArrow extends EntityDraconicArrow {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
for (int i = 0; i < 10; i++)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.brandon3055.draconicevolution.common.handler;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class ConfigHandler {
|
||||
|
||||
public static Configuration config;
|
||||
@@ -47,6 +47,7 @@ public class ConfigHandler {
|
||||
public static boolean useOldD2DToolTextures;
|
||||
public static boolean disableGuardianCrystalRespawn;
|
||||
public static boolean disableLog;
|
||||
public static boolean enableFlight;
|
||||
private static String[] itemDislocatorBlacklist;
|
||||
public static Map<String, Integer> itemDislocatorBlacklistMap = new HashMap<String, Integer>();
|
||||
|
||||
@@ -123,6 +124,7 @@ public class ConfigHandler {
|
||||
disableGuardianCrystalRespawn = config.get(Configuration.CATEGORY_GENERAL, "Disable Guardian Crystal Respawn", false, "(Wuss mode) Setting this to true will disable the chaos guardians ability to respawn healing crystals. Under certain circumstances such as on a Spigot server where entity render distance is significantly lower this may be required.").getBoolean(false);
|
||||
itemDislocatorBlacklist = config.getStringList("Item Dislocator Blacklist", Configuration.CATEGORY_GENERAL, new String[]{"appliedenergistics2:item.ItemCrystalSeed"}, "A list of items of items that should be ignored by the item dislocator. Use the items registry name e.g. minecraft:apple you can also add a meta value like so minecraft:wool|4");
|
||||
disableLog = config.get(Configuration.CATEGORY_GENERAL, "Disable Log", false, "If you are having issued with console spam that you cant fix setting this to true will disable all log output from Draconic Evolution (Not recommended)").getBoolean(false);
|
||||
enableFlight = config.get(Configuration.CATEGORY_GENERAL, "Enable Flight", true, "Set this to false to disable flight given by draconic armor.").getBoolean(true);
|
||||
|
||||
|
||||
//Spawner
|
||||
|
||||
+2
-2
@@ -64,7 +64,6 @@ import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MinecraftForgeEventHandler {
|
||||
|
||||
Random random = new Random();
|
||||
@@ -171,8 +170,9 @@ public class MinecraftForgeEventHandler {
|
||||
}
|
||||
|
||||
for (Object o : event.entity.worldObj.playerEntities) {
|
||||
if (o instanceof EntityPlayer)
|
||||
if (o instanceof EntityPlayer) {
|
||||
((EntityPlayer) o).addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("msg.de.dragonDeath.txt")));
|
||||
}
|
||||
}
|
||||
|
||||
int count = 30 + event.entity.worldObj.rand.nextInt(30);
|
||||
|
||||
@@ -25,7 +25,6 @@ public class DraconicCore extends ItemDE {
|
||||
ModItems.register(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
|
||||
@@ -40,7 +40,6 @@ public class DraconiumEnergyCore extends ItemDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
|
||||
@@ -479,7 +479,6 @@ public class Tclogo extends ItemDE {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
list.add(EnumChatFormatting.RED + "Warning! this is an item used to test random bits of code. You should not play with it");
|
||||
list.add(EnumChatFormatting.RED + "because depending on what i used it for last it could do anything.");
|
||||
|
||||
+42
-41
@@ -1,15 +1,13 @@
|
||||
package com.brandon3055.draconicevolution.common.items.armor;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
import com.brandon3055.brandonscore.BrandonsCore;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.network.ShieldHitPacket;
|
||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
@@ -26,6 +24,8 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 13/11/2014.
|
||||
*/
|
||||
@@ -211,54 +211,55 @@ public class CustomArmorHandler {
|
||||
public static void tickArmorEffects(ArmorSummery summery, EntityPlayer player) {
|
||||
|
||||
//region/*----------------- Flight ------------------*/
|
||||
if (ConfigHandler.enableFlight) {
|
||||
if (summery != null && summery.flight[0]) {
|
||||
playersWithFlight.put(player, true);
|
||||
player.capabilities.allowFlying = true;
|
||||
if (summery.flight[1]) player.capabilities.isFlying = true;
|
||||
|
||||
if (summery != null && summery.flight[0]) {
|
||||
playersWithFlight.put(player, true);
|
||||
player.capabilities.allowFlying = true;
|
||||
if (summery.flight[1]) player.capabilities.isFlying = true;
|
||||
if (player.worldObj.isRemote) setPlayerFlySpeed(player, 0.05F + (0.05F * summery.flightSpeedModifier));
|
||||
|
||||
if (player.worldObj.isRemote) setPlayerFlySpeed(player, 0.05F + (0.05F * summery.flightSpeedModifier));
|
||||
|
||||
if ((!player.onGround && player.capabilities.isFlying) && player.motionY != 0 && summery.flightVModifier > 0) {
|
||||
if ((!player.onGround && player.capabilities.isFlying) && player.motionY != 0 && summery.flightVModifier > 0) {
|
||||
// float percentIncrease = summery.flightVModifier;
|
||||
|
||||
if (BrandonsCore.proxy.isSpaceDown() && !BrandonsCore.proxy.isShiftDown()) {
|
||||
//LogHelper.info(player.motionY);
|
||||
player.motionY = 0.225F * summery.flightVModifier;
|
||||
if (BrandonsCore.proxy.isSpaceDown() && !BrandonsCore.proxy.isShiftDown()) {
|
||||
//LogHelper.info(player.motionY);
|
||||
player.motionY = 0.225F * summery.flightVModifier;
|
||||
}
|
||||
|
||||
if (BrandonsCore.proxy.isShiftDown() && !BrandonsCore.proxy.isSpaceDown()) {
|
||||
player.motionY = -0.225F * summery.flightVModifier;
|
||||
}
|
||||
}
|
||||
|
||||
if (BrandonsCore.proxy.isShiftDown() && !BrandonsCore.proxy.isSpaceDown()) {
|
||||
player.motionY = -0.225F * summery.flightVModifier;
|
||||
if (summery.flight[2] && player.moveForward == 0 && player.moveStrafing == 0 && player.capabilities.isFlying) {
|
||||
player.motionX *= 0.5;
|
||||
player.motionZ *= 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
if (summery.flight[2] && player.moveForward == 0 && player.moveStrafing == 0 && player.capabilities.isFlying) {
|
||||
player.motionX *= 0.5;
|
||||
player.motionZ *= 0.5;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!playersWithFlight.containsKey(player)) {
|
||||
playersWithFlight.put(player, false);
|
||||
}
|
||||
|
||||
if (playersWithFlight.get(player) && !player.worldObj.isRemote) {
|
||||
playersWithFlight.put(player, false);
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
player.capabilities.allowFlying = false;
|
||||
player.capabilities.isFlying = false;
|
||||
player.sendPlayerAbilities();
|
||||
LogHelper.info("Send Disable");
|
||||
} else {
|
||||
if (!playersWithFlight.containsKey(player)) {
|
||||
playersWithFlight.put(player, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.worldObj.isRemote && playersWithFlight.get(player)) {
|
||||
playersWithFlight.put(player, false);
|
||||
player.capabilities.allowFlying = false;
|
||||
player.capabilities.isFlying = false;
|
||||
LogHelper.info("Put Client");
|
||||
setPlayerFlySpeed(player, 0.05F);
|
||||
if (playersWithFlight.get(player) && !player.worldObj.isRemote) {
|
||||
playersWithFlight.put(player, false);
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
player.capabilities.allowFlying = false;
|
||||
player.capabilities.isFlying = false;
|
||||
player.sendPlayerAbilities();
|
||||
}
|
||||
}
|
||||
|
||||
if (player.worldObj.isRemote && playersWithFlight.get(player)) {
|
||||
playersWithFlight.put(player, false);
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
player.capabilities.allowFlying = false;
|
||||
player.capabilities.isFlying = false;
|
||||
}
|
||||
setPlayerFlySpeed(player, 0.05F);
|
||||
}
|
||||
}
|
||||
}
|
||||
//endregion
|
||||
|
||||
+1
-7
@@ -92,7 +92,6 @@ public class DraconicArmor
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item), "Energy", 0));
|
||||
@@ -213,7 +212,6 @@ public class DraconicArmor
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
|
||||
@@ -221,7 +219,6 @@ public class DraconicArmor
|
||||
ToolBase.holdCTRLForUpgrades(list, stack);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean clearNegativeEffects(Entity par3Entity) {
|
||||
boolean flag = false;
|
||||
if (par3Entity.ticksExisted % 20 == 0) {
|
||||
@@ -240,7 +237,7 @@ public class DraconicArmor
|
||||
}
|
||||
for (PotionEffect potion : potions) {
|
||||
int id = potion.getPotionID();
|
||||
if (ReflectionHelper.getPrivateValue(Potion.class, Potion.potionTypes[id], new String[]{"isBadEffect", "field_76418_K", "J"})) {
|
||||
if ((Boolean) ReflectionHelper.getPrivateValue(Potion.class, Potion.potionTypes[id], new String[]{"isBadEffect", "field_76418_K", "J"})) {
|
||||
if (potion.getPotionID() == Potion.digSlowdown.id && ModHelper.isHoldingCleaver(player)) break;
|
||||
if ((player.getHeldItem() == null || (player.getHeldItem().getItem() != ModItems.wyvernBow && player.getHeldItem().getItem() != ModItems.draconicBow)) || id != 2) {
|
||||
player.removePotionEffect(id);
|
||||
@@ -259,7 +256,6 @@ public class DraconicArmor
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
int stored = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int receive = Math.min(maxReceive, Math.min(getMaxEnergyStored(container) - stored, maxTransfer));
|
||||
|
||||
if (!simulate) {
|
||||
stored += receive;
|
||||
ItemNBTHelper.setInteger(container, "Energy", stored);
|
||||
@@ -269,10 +265,8 @@ public class DraconicArmor
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
int stored = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int extract = Math.min(maxExtract, Math.min(maxTransfer, stored));
|
||||
|
||||
if (!simulate) {
|
||||
stored -= extract;
|
||||
ItemNBTHelper.setInteger(container, "Energy", stored);
|
||||
|
||||
@@ -66,7 +66,6 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item), "Energy", 0));
|
||||
@@ -197,7 +196,6 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
int stored = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int receive = Math.min(maxReceive, Math.min(getMaxEnergyStored(container) - stored, maxTransfer));
|
||||
|
||||
if (!simulate) {
|
||||
stored += receive;
|
||||
ItemNBTHelper.setInteger(container, "Energy", stored);
|
||||
@@ -207,10 +205,8 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
int stored = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int extract = Math.min(maxExtract, Math.min(maxTransfer, stored));
|
||||
|
||||
if (!simulate) {
|
||||
stored -= extract;
|
||||
ItemNBTHelper.setInteger(container, "Energy", stored);
|
||||
|
||||
@@ -101,7 +101,6 @@ public class AdminSpawnEgg extends ItemDE {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean p_77624_4_) {
|
||||
|
||||
-2
@@ -28,7 +28,6 @@ public class CreativeStructureSpawner extends ItemDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
@@ -107,7 +106,6 @@ public class CreativeStructureSpawner extends ItemDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
if (stack.getItemDamage() == 1)
|
||||
|
||||
-1
@@ -88,7 +88,6 @@ public class DraconicDistructionStaff extends MiningTool implements IInventoryTo
|
||||
return super.onItemRightClick(stack, world, player);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean extended) {
|
||||
|
||||
+4
-16
@@ -31,7 +31,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
@@ -180,7 +179,6 @@ public class DraconicHoe extends ItemHoe implements IEnergyContainerItem, IRende
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
InfoHelper.addEnergyInfo(stack, list);
|
||||
@@ -190,32 +188,22 @@ public class DraconicHoe extends ItemHoe implements IEnergyContainerItem, IRende
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null) {
|
||||
container.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyReceived;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyExtracted;
|
||||
}
|
||||
|
||||
-2
@@ -55,7 +55,6 @@ public class DraconiumFluxCapacitor extends RFItemBase implements IUpgradableIte
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -136,7 +135,6 @@ public class DraconiumFluxCapacitor extends RFItemBase implements IUpgradableIte
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
if (InfoHelper.holdShiftForDetails(list)) {
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ public class EnderArrow extends ItemDE {
|
||||
itemIcon = iconRegister.registerIcon(References.RESOURCESPREFIX + "ender_arrow");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "" + EnumChatFormatting.ITALIC + StatCollector.translateToLocal("info.arrowInfo.txt"));
|
||||
|
||||
@@ -57,7 +57,6 @@ public class Magnet extends ItemDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
@@ -75,7 +74,6 @@ public class Magnet extends ItemDE {
|
||||
return ItemNBTHelper.getBoolean(stack, "MagnetEnabled", false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean hotbar) {
|
||||
if (!entity.isSneaking() && entity.ticksExisted % 5 == 0 && ItemNBTHelper.getBoolean(stack, "MagnetEnabled", false) && entity instanceof EntityPlayer) {
|
||||
@@ -128,7 +126,6 @@ public class Magnet extends ItemDE {
|
||||
return stack;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
list.add(StatCollector.translateToLocal("info.de.shiftRightClickToActivate.txt"));
|
||||
|
||||
@@ -40,7 +40,6 @@ public class SafetyMatch extends ItemDE {
|
||||
else return super.getUnlocalizedName(itemStack) + "Box";
|
||||
}
|
||||
|
||||
@SuppressWarnings("ALL")
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
@@ -116,7 +115,6 @@ public class SafetyMatch extends ItemDE {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("ALL")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
|
||||
@@ -111,7 +111,6 @@ public class TeleporterMKI extends ItemDE {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
if (!ItemNBTHelper.getBoolean(stack, "IsSet", false)) {
|
||||
|
||||
@@ -108,7 +108,6 @@ public class TeleporterMKII extends TeleporterMKI implements IHudDisplayItem {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack teleporter, final EntityPlayer player, final List list2, final boolean extraInformation) {
|
||||
short selected = ItemNBTHelper.getShort(teleporter, "Selection", (short) 0);
|
||||
|
||||
@@ -72,7 +72,6 @@ public class Wrench extends ItemDE implements IHudDisplayItem {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("msg.de.wrenchMode." + currentMode + ".txt"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean bool) {
|
||||
|
||||
+47
-16
@@ -13,20 +13,26 @@ import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.MaterialLiquid;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.play.client.C07PacketPlayerDigging;
|
||||
import net.minecraft.network.play.server.S18PacketEntityTeleport;
|
||||
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@@ -37,6 +43,7 @@ import net.minecraftforge.event.world.BlockEvent;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 2/01/2015.
|
||||
* Modified by bartimaeusnek on 23/05/2018
|
||||
*/
|
||||
public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
|
||||
@@ -160,7 +167,8 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
for (int xPos = x - xMin; xPos <= x + xMax; xPos++) {
|
||||
for (int yPos = y + yOffset - yMin; yPos <= y + yOffset + yMax; yPos++) {
|
||||
for (int zPos = z - zMin; zPos <= z + zMax; zPos++) {
|
||||
if (player.worldObj.getTileEntity(xPos, yPos, zPos) != null) {
|
||||
TileEntity te = player.worldObj.getTileEntity(xPos, yPos, zPos);
|
||||
if (te != null && !ModHelper.isGregTechTileEntityOre(te)) {
|
||||
if (player.worldObj.isRemote) {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("msg.de.baseSafeAOW.txt"));
|
||||
} else
|
||||
@@ -172,15 +180,26 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (int xPos = x - xMin; xPos <= x + xMax; xPos++) {
|
||||
for (int yPos = y + yOffset - yMin; yPos <= y + yOffset + yMax; yPos++) {
|
||||
for (int zPos = z - zMin; zPos <= z + zMax; zPos++) {
|
||||
player.worldObj.getChunkFromBlockCoords(xPos, zPos).sendUpdates=false;
|
||||
breakExtraBlock(stack, player.worldObj, xPos, yPos, zPos, breakRadius * ((breakDepth / 2) + 1), player, refStrength, Math.abs(x - xPos) <= 1 && Math.abs(y - yPos) <= 1 && Math.abs(z - zPos) <= 1, blockMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") List<EntityItem> items = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x - xMin, y + yOffset - yMin, z - zMin, x + xMax + 1, y + yOffset + yMax + 1, z + zMax + 1));
|
||||
for (int xPos = x - xMin; xPos <= x + xMax; xPos++) {
|
||||
for (int yPos = y + yOffset - yMin; yPos <= y + yOffset + yMax; yPos++) {
|
||||
for (int zPos = z - zMin; zPos <= z + zMax; zPos++) {
|
||||
player.worldObj.getChunkFromBlockCoords(x, z).sendUpdates=true;
|
||||
player.worldObj.getChunkFromBlockCoords(x, z).isModified=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<EntityItem> items = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x - xMin, y + yOffset - yMin, z - zMin, x + xMax + 1, y + yOffset + yMax + 1, z + zMax + 1));
|
||||
for (EntityItem item : items) {
|
||||
if (!player.worldObj.isRemote) {
|
||||
item.setLocationAndAngles(player.posX, player.posY, player.posZ, 0, 0);
|
||||
@@ -192,7 +211,7 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected void breakExtraBlock(ItemStack stack, World world, int x, int y, int z, int totalSize, EntityPlayer player, float refStrength, boolean breakSound, Map<Block, Integer> blockMap) {
|
||||
if (world.isAirBlock(x, y, z)) return;
|
||||
|
||||
@@ -243,23 +262,35 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
extractEnergy(stack, scaledPower, false);
|
||||
|
||||
if (!world.isRemote) {
|
||||
|
||||
|
||||
block.onBlockHarvested(world, x, y, z, meta, player);
|
||||
|
||||
if (block.removedByPlayer(world, player, x, y, z, true)) {
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
block.harvestBlock(world, player, x, y, z, meta);
|
||||
player.addExhaustion(-0.025F);
|
||||
if (block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)) > 0)
|
||||
player.addExperience(block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
|
||||
}
|
||||
|
||||
|
||||
ArrayList<ItemStack> drops = block.getDrops(world, x, y, z, meta, EnchantmentHelper.getFortuneModifier(player));
|
||||
for (ItemStack is : drops) {
|
||||
if (!player.inventory.addItemStackToInventory(is)) {
|
||||
if (world.getGameRules().getGameRuleBooleanValue("doTileDrops") && !world.restoringBlockSnapshots){
|
||||
float f = 0.7F;
|
||||
double d0 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d1 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(world, (double)x + d0, (double)y + d1, (double)z + d2, is);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
player.addExhaustion(-0.025F);
|
||||
if (block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)) > 0)
|
||||
player.addExperience(block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
|
||||
EntityPlayerMP mpPlayer = (EntityPlayerMP) player;
|
||||
mpPlayer.playerNetServerHandler.sendPacket(new S23PacketBlockChange(x, y, z, world));
|
||||
|
||||
} else {
|
||||
if (breakSound) world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
if (block.removedByPlayer(world, player, x, y, z, true)) {
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
if (block.removedByPlayer(world, player, x, y, z, false)) {
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(2, x, y, z, Minecraft.getMinecraft().objectMouseOver.sideHit));
|
||||
|
||||
+13
-8
@@ -1,8 +1,5 @@
|
||||
package com.brandon3055.draconicevolution.common.items.tools.baseclasses;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
@@ -19,10 +16,14 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 8/01/2015.
|
||||
*/
|
||||
@@ -82,7 +83,6 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getCapacity(container) - energy, Math.min(getMaxReceive(container), maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
@@ -92,9 +92,11 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
if (container.getTagCompound() == null) {
|
||||
container.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(getMaxExtract(container), maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
@@ -123,7 +125,6 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -149,10 +150,14 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
|
||||
int preset = ItemNBTHelper.getInteger(stack, "ConfigProfile", 0);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("info.de.capacitorMode.txt") + ": " + ItemNBTHelper.getString(stack, "ProfileName" + preset, "Profile " + preset));
|
||||
}
|
||||
for (ItemConfigField field : getFields(stack, 0))
|
||||
|
||||
for (ItemConfigField field : getFields(stack, 0)){
|
||||
list.add(field.getTooltipInfo());//list.add(field.getLocalizedName() + ": " + field.getFormattedValue());
|
||||
if (capacity > 0)
|
||||
}
|
||||
|
||||
if (getCapacity(stack) > 0) {
|
||||
list.add(InfoHelper.ITC() + StatCollector.translateToLocal("info.de.charge.txt") + ": " + InfoHelper.HITC() + Utills.formatNumber(getEnergyStored(stack)) + " / " + Utills.formatNumber(capacity));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
-2
@@ -75,7 +75,6 @@ public class ToolBase extends RFItemBase {
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setHarvestLevel(String toolClass, int level) {
|
||||
if (toolClass.equals("pickaxe")) blockOverrides.addAll(PICKAXE_OVERRIDES);
|
||||
@@ -234,7 +233,6 @@ public class ToolBase extends RFItemBase {
|
||||
return toolMaterial;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void holdCTRLForUpgrades(List list, ItemStack stack) {
|
||||
if (stack == null || !(stack.getItem() instanceof IUpgradableItem)) return;
|
||||
if (!InfoHelper.isCtrlKeyDown())
|
||||
|
||||
-1
@@ -201,7 +201,6 @@ public class ToolHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unused"})
|
||||
public static void AOEAttack(EntityPlayer player, Entity entity, ItemStack stack, int range) {
|
||||
World world = player.worldObj;
|
||||
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(entity.posX - range, entity.posY - range, entity.posZ - range, entity.posX + range, entity.posY + range, entity.posZ + range).expand(1.0D, 1.0D, 1.0D);
|
||||
|
||||
+3
-15
@@ -1,8 +1,5 @@
|
||||
package com.brandon3055.draconicevolution.common.items.weapons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.brandon3055.brandonscore.BrandonsCore;
|
||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
@@ -36,6 +33,9 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableItem, IEnergyContainerWeaponItem, IHudDisplayItem {
|
||||
public static final String[] bowPullIconNameArray = new String[]{"pulling_0", "pulling_1", "pulling_2"};
|
||||
|
||||
@@ -111,7 +111,6 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
boolean show = InfoHelper.holdShiftForDetails(list);
|
||||
if (show) {
|
||||
@@ -126,7 +125,6 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -283,13 +281,8 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
@@ -299,13 +292,8 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
|
||||
+4
-16
@@ -32,7 +32,6 @@ import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -88,7 +87,6 @@ public class DraconicSword extends ItemSword implements IEnergyContainerWeaponIt
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
if (InfoHelper.holdShiftForDetails(list)) {
|
||||
@@ -111,32 +109,22 @@ public class DraconicSword extends ItemSword implements IEnergyContainerWeaponIt
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null) {
|
||||
container.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyReceived;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyExtracted;
|
||||
}
|
||||
|
||||
+3
-15
@@ -1,8 +1,5 @@
|
||||
package com.brandon3055.draconicevolution.common.items.weapons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.brandon3055.brandonscore.BrandonsCore;
|
||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
@@ -36,6 +33,9 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableItem, IEnergyContainerWeaponItem, IHudDisplayItem {
|
||||
|
||||
public static final String[] bowPullIconNameArray = new String[]{"pulling_0", "pulling_1", "pulling_2"};
|
||||
@@ -122,7 +122,6 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
boolean show = InfoHelper.holdShiftForDetails(list);
|
||||
if (show) {
|
||||
@@ -137,7 +136,6 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -281,13 +279,8 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
@@ -297,13 +290,8 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
|
||||
+4
-17
@@ -33,7 +33,6 @@ import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -59,7 +58,6 @@ public class WyvernSword extends ItemSword implements IEnergyContainerWeaponItem
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -91,7 +89,6 @@ public class WyvernSword extends ItemSword implements IEnergyContainerWeaponItem
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
if (InfoHelper.holdShiftForDetails(list)) {
|
||||
@@ -119,32 +116,22 @@ public class WyvernSword extends ItemSword implements IEnergyContainerWeaponItem
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null) {
|
||||
container.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyReceived;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyExtracted;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@ package com.brandon3055.draconicevolution.common.lib;
|
||||
* Created by Brandon on 24/02/2015.
|
||||
*/
|
||||
public class VersionHandler {
|
||||
public static final String VERSION = "1.0.2g";
|
||||
public static final String VERSION = "1.0.2h";
|
||||
|
||||
|
||||
public static final int SNAPSHOT = 0;
|
||||
public static final String MCVERSION = "1.7.10";
|
||||
|
||||
@SuppressWarnings({"unused"})
|
||||
public static final String FULL_VERSION = VERSION + (SNAPSHOT > 0 ? "-snapshot_" + SNAPSHOT : "");
|
||||
}
|
||||
|
||||
|
||||
+5
-2
@@ -47,7 +47,9 @@ public class ContributorPacket implements IMessage {
|
||||
ContributorHandler.Contributor contributor1 = ContributorHandler.contributors.get(message.contributor);
|
||||
|
||||
if (ctx.side == Side.SERVER) {
|
||||
if (!contributor1.isUserValid(ctx.getServerHandler().playerEntity)) return null;
|
||||
if (!contributor1.isUserValid(ctx.getServerHandler().playerEntity)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
contributor1.contributorWingsEnabled = message.wings;
|
||||
contributor1.patreonBadgeEnabled = message.badge;
|
||||
@@ -55,8 +57,9 @@ public class ContributorPacket implements IMessage {
|
||||
DraconicEvolution.network.sendToAll(message);
|
||||
} else {
|
||||
EntityPlayer player = BrandonsCore.proxy.getClientPlayer();
|
||||
if (!contributor1.isUserValid(player) || message.contributor.equals(player.getCommandSenderName()))
|
||||
if (!contributor1.isUserValid(player) || message.contributor.equals(player.getCommandSenderName())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
contributor1.contributorWingsEnabled = message.wings;
|
||||
contributor1.patreonBadgeEnabled = message.badge;
|
||||
|
||||
-1
@@ -77,7 +77,6 @@ public class TileDissEnchanter extends TileEntity implements ISidedInventory {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void buttonClick(EntityPlayer player) {
|
||||
if (!isValidRecipe) return;
|
||||
if (player.experienceLevel < dissenchantCost && !player.capabilities.isCreativeMode) return;
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ public class TileDraconiumChest extends TileEntity implements ISidedInventory, I
|
||||
if (worldObj != null && !this.worldObj.isRemote && this.numUsingPlayers != 0 && (this.ticksSinceSync + this.xCoord + this.yCoord + this.zCoord) % 200 == 0) {
|
||||
this.numUsingPlayers = 0;
|
||||
float var1 = 5.0F;
|
||||
@SuppressWarnings("unchecked") List<EntityPlayer> var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox((double) ((float) this.xCoord - var1), (double) ((float) this.yCoord - var1), (double) ((float) this.zCoord - var1), (double) ((float) (this.xCoord + 1) + var1), (double) ((float) (this.yCoord + 1) + var1), (double) ((float) (this.zCoord + 1) + var1)));
|
||||
List<EntityPlayer> var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox((double) ((float) this.xCoord - var1), (double) ((float) this.yCoord - var1), (double) ((float) this.zCoord - var1), (double) ((float) (this.xCoord + 1) + var1), (double) ((float) (this.yCoord + 1) + var1), (double) ((float) (this.zCoord + 1) + var1)));
|
||||
|
||||
for (EntityPlayer var4 : var2) {
|
||||
if (var4.openContainer instanceof ContainerDraconiumChest) {
|
||||
|
||||
+5
-5
@@ -1,8 +1,5 @@
|
||||
package com.brandon3055.draconicevolution.common.tileentities;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import cofh.api.energy.IEnergyReceiver;
|
||||
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
@@ -32,6 +29,9 @@ import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class TileGrinder extends TileObjectSync implements ISidedInventory, IEnergyReceiver {
|
||||
//########### variables #############//
|
||||
public int meta = -1;
|
||||
@@ -147,13 +147,13 @@ public class TileGrinder extends TileObjectSync implements ISidedInventory, IEne
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean killNextEntity() {
|
||||
if (worldObj.isRemote) return false;
|
||||
//fakePlayer = null;
|
||||
if (fakePlayer == null) {
|
||||
fakePlayer = FakePlayerFactory.get((WorldServer) worldObj, new GameProfile(UUID.fromString("5b5689b9-e43d-4282-a42a-dc916f3616b7"), "[Draconic-Evolution]"));
|
||||
}
|
||||
if (fakePlayer.getHeldItem() == null || !ItemStack.areItemStacksEqual(fakePlayer.getHeldItem(), diamondSword)) {
|
||||
if (BalanceConfigHandler.grinderShouldUseLooting && (fakePlayer.getHeldItem() == null || !ItemStack.areItemStacksEqual(fakePlayer.getHeldItem(), diamondSword))) {
|
||||
fakePlayer.setCurrentItemOrArmor(0, diamondSword);
|
||||
}
|
||||
killBox = AxisAlignedBB.getBoundingBox(centreX - 4.5, centreY - 4.5, centreZ - 4.5, centreX + 4.5, centreY + 4.5, centreZ + 4.5);
|
||||
|
||||
-1
@@ -72,7 +72,6 @@ public class TilePlayerDetectorAdvanced extends TileEntity implements IInventory
|
||||
return b;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked"})
|
||||
private void findEntitys() {
|
||||
double x1 = xCoord + 0.5 - range;
|
||||
double y1 = yCoord + 0.5 - range;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class UpdateChecker {
|
||||
thread.start();
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings({"unused"})
|
||||
@SubscribeEvent
|
||||
public void tickStart(TickEvent.PlayerTickEvent event) {
|
||||
if (event.phase != TickEvent.Phase.START) return;
|
||||
@@ -41,13 +41,15 @@ public class UpdateChecker {
|
||||
if (!thread.getVersion().equals(VersionHandler.VERSION) || (VersionHandler.SNAPSHOT > 0 && thread.getSnapshot() == 0)) {
|
||||
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.LIGHT_PURPLE + "[Draconic Evolution]" + EnumChatFormatting.RESET + " New version available:"));
|
||||
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Draconic Evolution v" + thread.getVersion()));
|
||||
if (!StringUtils.isNullOrEmpty(thread.getNote()))
|
||||
if (!StringUtils.isNullOrEmpty(thread.getNote())){
|
||||
event.player.addChatComponentMessage(new ChatComponentText(thread.getNote()));
|
||||
}
|
||||
} else if (thread.getSnapshot() > VersionHandler.SNAPSHOT) {
|
||||
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "[Draconic Evolution]" + EnumChatFormatting.RESET + " New snapshot version available:"));
|
||||
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.BLUE + "Draconic Evolution v" + thread.getVersion() + "-snapshot_" + thread.getSnapshot()));
|
||||
if (!StringUtils.isNullOrEmpty(thread.getNote()))
|
||||
if (!StringUtils.isNullOrEmpty(thread.getNote())){
|
||||
event.player.addChatComponentMessage(new ChatComponentText(thread.getNote()));
|
||||
}
|
||||
}
|
||||
|
||||
} else if (thread.isFailed()) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
|
||||
/**
|
||||
@@ -12,17 +13,32 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
*/
|
||||
public class ModHelper {
|
||||
|
||||
public static boolean isTConInstalled;
|
||||
public static boolean isAvaritiaInstalled;
|
||||
public static boolean isRotaryCraftInstalled;
|
||||
private static boolean isTConInstalled;
|
||||
private static boolean isAvaritiaInstalled;
|
||||
//private static boolean isRotaryCraftInstalled;
|
||||
private static boolean isGregTechInstalled;
|
||||
|
||||
private static Item cleaver;
|
||||
private static Item avaritiaSword;
|
||||
private static Item bedrockSword;
|
||||
//private static Item bedrockSword;
|
||||
|
||||
public static void init() {
|
||||
private static Class bwores;
|
||||
private static Class GTores;
|
||||
|
||||
static {
|
||||
isTConInstalled = Loader.isModLoaded("TConstruct");
|
||||
isAvaritiaInstalled = Loader.isModLoaded("Avaritia");
|
||||
isRotaryCraftInstalled = Loader.isModLoaded("RotaryCraft");
|
||||
//isRotaryCraftInstalled = Loader.isModLoaded("RotaryCraft");
|
||||
isGregTechInstalled = Loader.isModLoaded("gregtech");
|
||||
|
||||
if (isGregTechInstalled)
|
||||
try {
|
||||
GTores = Class.forName("gregtech.common.blocks.GT_TileEntity_Ores");
|
||||
} catch (ClassNotFoundException e) {}
|
||||
if (Loader.isModLoaded("bartworks"))
|
||||
try {
|
||||
bwores = Class.forName("com.github.bartimaeusnek.bartworks.system.material.BW_MetaGeneratedOreTE");
|
||||
} catch (ClassNotFoundException e) {}
|
||||
}
|
||||
|
||||
public static boolean isHoldingCleaver(EntityPlayer player) {
|
||||
@@ -39,12 +55,12 @@ public class ModHelper {
|
||||
return avaritiaSword != null && player.getHeldItem() != null && player.getHeldItem().getItem().equals(avaritiaSword);
|
||||
}
|
||||
|
||||
public static boolean isHoldingBedrockSword(EntityPlayer player) {
|
||||
if (!isRotaryCraftInstalled) return false;
|
||||
else if (bedrockSword == null) bedrockSword = GameRegistry.findItem("RotaryCraft", "rotarycraft_item_bedsword");
|
||||
|
||||
return bedrockSword != null && player.getHeldItem() != null && player.getHeldItem().getItem().equals(bedrockSword);
|
||||
}
|
||||
// public static boolean isHoldingBedrockSword(EntityPlayer player) {
|
||||
// if (!isRotaryCraftInstalled) return false;
|
||||
// else if (bedrockSword == null) bedrockSword = GameRegistry.findItem("RotaryCraft", "rotarycraft_item_bedsword");
|
||||
//
|
||||
// return bedrockSword != null && player.getHeldItem() != null && player.getHeldItem().getItem().equals(bedrockSword);
|
||||
// }
|
||||
|
||||
public static float applyModDamageAdjustments(ArmorSummery summery, LivingAttackEvent event) {
|
||||
if (summery == null) return event.ammount;
|
||||
@@ -57,15 +73,17 @@ public class ModHelper {
|
||||
if (isHoldingAvaritiaSword(attacker)) {
|
||||
event.entityLiving.hurtResistantTime = 0;
|
||||
return 300F;
|
||||
} else if (isHoldingBedrockSword(attacker)) {
|
||||
summery.entropy += 10;
|
||||
|
||||
if (summery.entropy > 100) {
|
||||
summery.entropy = 100;
|
||||
}
|
||||
|
||||
return Math.max(event.ammount, Math.min(50F, summery.protectionPoints));
|
||||
} else if (event.source.isUnblockable() || event.source.canHarmInCreative()) {
|
||||
}
|
||||
// else if (isHoldingBedrockSword(attacker)) {
|
||||
// summery.entropy += 10;
|
||||
//
|
||||
// if (summery.entropy > 100) {
|
||||
// summery.entropy = 100;
|
||||
// }
|
||||
//
|
||||
// return Math.max(event.ammount, Math.min(50F, summery.protectionPoints));
|
||||
// }
|
||||
else if (event.source.isUnblockable() || event.source.canHarmInCreative()) {
|
||||
summery.entropy += 3;
|
||||
|
||||
if (summery.entropy > 100) {
|
||||
@@ -78,4 +96,8 @@ public class ModHelper {
|
||||
return event.ammount;
|
||||
}
|
||||
|
||||
public static boolean isGregTechTileEntityOre(TileEntity te) {
|
||||
return isGregTechInstalled && GTores.isInstance(te) || isGregTechInstalled && Loader.isModLoaded("bartworks") && bwores.isInstance(te);
|
||||
}
|
||||
|
||||
}
|
||||
-4
@@ -61,7 +61,6 @@ public class CraftingChestOverlayHandler implements IOverlayHandler {
|
||||
if (quantity != 0) moveIngredients(gui, assignedIngredients, quantity);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean clearIngredients(GuiContainer gui, List<PositionedStack> ingreds) {
|
||||
int offsetx = getOffsetX(gui);
|
||||
int offsety = getOffsetY(gui);
|
||||
@@ -77,7 +76,6 @@ public class CraftingChestOverlayHandler implements IOverlayHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void moveIngredients(GuiContainer gui, List<IngredientDistribution> assignedIngredients, int quantity) {
|
||||
for (IngredientDistribution distrib : assignedIngredients) {
|
||||
ItemStack pstack = distrib.permutation;
|
||||
@@ -212,7 +210,6 @@ public class CraftingChestOverlayHandler implements IOverlayHandler {
|
||||
return assignedIngredients;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void findInventoryQuantities(GuiContainer gui, List<DistributedIngred> ingredStacks) {
|
||||
for (Slot slot : (List<Slot>) gui.inventorySlots.inventorySlots)//work out how much we have to go round
|
||||
{
|
||||
@@ -241,7 +238,6 @@ public class CraftingChestOverlayHandler implements IOverlayHandler {
|
||||
return slot.inventory instanceof InventoryPlayer || slot.inventory instanceof TileDraconiumChest;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Slot[][] mapIngredSlots(GuiContainer gui, List<PositionedStack> ingredients) {
|
||||
int offsetx = getOffsetX(gui);
|
||||
int offsety = getOffsetY(gui);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File renamed without changes.
Reference in new issue
Block a user