Cleaned up a lot of different inspections

This commit is contained in:
Nicholas Ignoffo 2018-03-01 19:27:38 -08:00
parent 0dd0854bd9
commit 70d98455b7
207 changed files with 603 additions and 731 deletions

View file

@ -25,15 +25,6 @@ import java.io.IOException;
@SideOnly(Side.CLIENT)
public class GuiItemRoutingNode extends GuiContainer {
private GuiButton downButton;
private GuiButton upButton;
private GuiButton northButton;
private GuiButton southButton;
private GuiButton westButton;
private GuiButton eastButton;
private GuiButton incrementButton;
private GuiButton decrementButton;
private GuiTextField textBox;
private TileFilteredRoutingNode inventory;
@ -65,14 +56,14 @@ public class GuiItemRoutingNode extends GuiContainer {
top = (this.height - this.ySize) / 2;
this.buttonList.clear();
this.buttonList.add(this.downButton = new GuiButton(0, left + 176, top + 14, 18, 18, "D"));
this.buttonList.add(this.upButton = new GuiButton(1, left + 176, top + 32, 18, 18, "U"));
this.buttonList.add(this.northButton = new GuiButton(2, left + 176, top + 50, 18, 18, "N"));
this.buttonList.add(this.southButton = new GuiButton(3, left + 176, top + 68, 18, 18, "S"));
this.buttonList.add(this.westButton = new GuiButton(4, left + 176, top + 86, 18, 18, "W"));
this.buttonList.add(this.eastButton = new GuiButton(5, left + 176, top + 104, 18, 18, "E"));
this.buttonList.add(this.incrementButton = new GuiButton(6, left + 160, top + 50, 10, 18, ">"));
this.buttonList.add(this.decrementButton = new GuiButton(7, left + 132, top + 50, 10, 18, "<"));
this.buttonList.add(new GuiButton(0, left + 176, top + 14, 18, 18, "D"));
this.buttonList.add(new GuiButton(1, left + 176, top + 32, 18, 18, "U"));
this.buttonList.add(new GuiButton(2, left + 176, top + 50, 18, 18, "N"));
this.buttonList.add(new GuiButton(3, left + 176, top + 68, 18, 18, "S"));
this.buttonList.add(new GuiButton(4, left + 176, top + 86, 18, 18, "W"));
this.buttonList.add(new GuiButton(5, left + 176, top + 104, 18, 18, "E"));
this.buttonList.add(new GuiButton(6, left + 160, top + 50, 10, 18, ">"));
this.buttonList.add(new GuiButton(7, left + 132, top + 50, 10, 18, "<"));
disableDirectionalButton(inventory.currentActiveSlot);
this.textBox = new GuiTextField(0, this.fontRenderer, left + 94, top + 37, 70, 12);
@ -92,7 +83,7 @@ public class GuiItemRoutingNode extends GuiContainer {
try {
Integer testVal = Integer.decode(str);
if (testVal != null) {
amount = testVal.intValue();
amount = testVal;
}
} catch (NumberFormatException d) {
}
@ -120,7 +111,7 @@ public class GuiItemRoutingNode extends GuiContainer {
if (container.lastGhostSlotClicked != -1) {
Slot slot = container.getSlot(container.lastGhostSlotClicked + 1);
ItemStack stack = slot.getStack();
if (stack != null) {
if (!stack.isEmpty()) {
int amount = GhostItemHelper.getItemGhostAmount(stack);
this.textBox.setText("" + amount);
} else {
@ -173,7 +164,7 @@ public class GuiItemRoutingNode extends GuiContainer {
String s = "";
if (container.lastGhostSlotClicked != -1) {
ItemStack clickedStack = inventorySlots.getSlot(1 + container.lastGhostSlotClicked).getStack();
if (clickedStack != null) {
if (!clickedStack.isEmpty()) {
s = clickedStack.getDisplayName();
}
}

View file

@ -6,20 +6,17 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiMasterRoutingNode extends GuiContainer {
private TileEntity inventory;
public GuiMasterRoutingNode(InventoryPlayer playerInventory, IInventory tileRoutingNode) {
super(new ContainerMasterRoutingNode(playerInventory, tileRoutingNode));
this.xSize = 216;
this.ySize = 216;
inventory = (TileEntity) tileRoutingNode;
}
@Override

View file

@ -1,13 +1,3 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
* <p>
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
* <p>
* File Created @ [Apr 9, 2014, 11:20:26 PM (GMT)]
*/
package WayofTime.bloodmagic.client.helper;
import net.minecraft.client.renderer.OpenGlHelper;
@ -22,6 +12,16 @@ import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
* <p>
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
* <p>
* File Created @ [Apr 9, 2014, 11:20:26 PM (GMT)]
*/
public final class ShaderHelper {
private static final int VERT_ST = ARBVertexShader.GL_VERTEX_SHADER_ARB;
private static final int FRAG_ST = ARBFragmentShader.GL_FRAGMENT_SHADER_ARB;

View file

@ -15,7 +15,7 @@ import java.util.ArrayList;
import java.util.List;
public class HUDElementDemonWillAura extends HUDElement {
protected List<EnumDemonWillType> barOrder = new ArrayList<EnumDemonWillType>();
protected List<EnumDemonWillType> barOrder = new ArrayList<>();
public HUDElementDemonWillAura() {
super(5, 5, RenderGameOverlayEvent.ElementType.HOTBAR);

View file

@ -16,7 +16,7 @@ public class RenderCorruptedChicken extends RenderLiving<EntityCorruptedChicken>
public RenderCorruptedChicken(RenderManager renderManagerIn) {
super(renderManagerIn, new ModelCorruptedChicken(0), 0.3f);
this.addLayer(new LayerWill<EntityCorruptedChicken>(this, new ModelCorruptedChicken(1.1f)));
this.addLayer(new LayerWill<>(this, new ModelCorruptedChicken(1.1f)));
}
@Override

View file

@ -19,9 +19,9 @@ public class RenderCorruptedSheep extends RenderLiving<EntityCorruptedSheep> {
public RenderCorruptedSheep(RenderManager renderManagerIn) {
super(renderManagerIn, new ModelCorruptedSheep2(0), 0.7F);
this.addLayer(new LayerCorruptedSheepWool(this));
this.addLayer(new LayerWill<EntityCorruptedSheep>(this, new ModelCorruptedSheep(1.1f)));
this.addLayer(new LayerWill<EntityCorruptedSheep>(this, new ModelCorruptedSheep2(1.1f)));
this.addLayer(new LayerAlchemyCircle<EntityCorruptedSheep>());
this.addLayer(new LayerWill<>(this, new ModelCorruptedSheep(1.1f)));
this.addLayer(new LayerWill<>(this, new ModelCorruptedSheep2(1.1f)));
this.addLayer(new LayerAlchemyCircle<>());
}
@Override

View file

@ -18,7 +18,7 @@ public class RenderCorruptedSpider extends RenderLiving<EntityCorruptedSpider> {
public RenderCorruptedSpider(RenderManager renderManagerIn) {
super(renderManagerIn, new ModelSpider(), 1.0F);
this.addLayer(new LayerCorruptedSpiderEyes(this));
this.addLayer(new LayerWill<EntityCorruptedSpider>(this, new ModelCorruptedSpider(1.1f)));
this.addLayer(new LayerWill<>(this, new ModelCorruptedSpider(1.1f)));
}
protected float getDeathMaxRotation(EntityCorruptedSpider entityLivingBaseIn) {

View file

@ -38,7 +38,7 @@ public class RenderCorruptedZombie extends RenderBiped<EntityCorruptedZombie> {
}
this.layerRenderers.remove(layerbipedarmor);
this.addLayer(new LayerWill<EntityCorruptedZombie>(this, new ModelZombie(1.2f, false)));
this.addLayer(new LayerWill<>(this, new ModelZombie(1.2f, false)));
}
/**

View file

@ -10,9 +10,11 @@ import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
public class RenderEntityMeteor extends Render<EntityMeteor> {
private static final ResourceLocation resource = new ResourceLocation(BloodMagic.MODID, "textures/models/Meteor.png");
private static final ResourceLocation TEXTURE = new ResourceLocation(BloodMagic.MODID, "textures/models/Meteor.png");
private static final float SCALE = 1;
public ModelBase model = new ModelMeteor();
private float scale = 1;
public RenderEntityMeteor(RenderManager renderManagerIn) {
super(renderManagerIn);
@ -20,24 +22,11 @@ public class RenderEntityMeteor extends Render<EntityMeteor> {
@Override
public void doRender(EntityMeteor entity, double x, double y, double z, float entityYaw, float partialTicks) {
// GlStateManager.pushMatrix();
// GlStateManager.translate((float) x, (float) y, (float) z);
// GlStateManager.enableRescaleNormal();
// GlStateManager.scale(0.5F, 0.5F, 0.5F);
// GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
// GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
// this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
// this.renderItem.renderItem(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), ItemCameraTransforms.TransformType.GROUND);
// GlStateManager.disableRescaleNormal();
// GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.translate((float) x, (float) y, (float) z);
GlStateManager.enableRescaleNormal();
GlStateManager.scale(scale, scale, scale);
this.bindTexture(this.getEntityTexture(entity));
// GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F);
// GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f);
GlStateManager.scale(SCALE, SCALE, SCALE);
this.bindTexture(TEXTURE);
model.render(entity, 0, (float) x, (float) y, (float) z, entityYaw, partialTicks);
GlStateManager.disableRescaleNormal();
GlStateManager.popMatrix();
@ -47,6 +36,6 @@ public class RenderEntityMeteor extends Render<EntityMeteor> {
@Override
protected ResourceLocation getEntityTexture(EntityMeteor entity) {
return resource;
return TEXTURE;
}
}

View file

@ -37,7 +37,7 @@ public class RenderEntitySentientArrow extends Render<EntitySentientArrow> {
int i = 0;
float f = 0.0F;
float f1 = 0.5F;
float f2 = (float) (0 + i * 10) / 32.0F;
float f2 = (float) (i * 10) / 32.0F;
float f3 = (float) (5 + i * 10) / 32.0F;
float f4 = 0.0F;
float f5 = 0.15625F;