This repository has been archived by the owner on Jul 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a10c58
commit 4289acf
Showing
21 changed files
with
213 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/me/roryclaasen/rorysmod/core/RorysGlobal.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright 2017 Rory Claasen | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package me.roryclaasen.rorysmod.core; | ||
|
||
import net.minecraft.item.ItemArmor.ArmorMaterial; | ||
import net.minecraftforge.common.util.EnumHelper; | ||
|
||
public class RorysGlobal { | ||
|
||
private RorysGlobal() {} | ||
|
||
public static final ArmorMaterial SOLDER_ARMOR = EnumHelper.addArmorMaterial("solder", 12, new int[] { 2, 5, 3, 1 }, 15); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 19 additions & 45 deletions
64
src/main/java/me/roryclaasen/rorysmod/gui/GuiPoweredChest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,34 @@ | ||
/* | ||
Copyright 2016-2017 Rory Claasen | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
* Copyright 2016-2017 Rory Claasen | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package me.roryclaasen.rorysmod.gui; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.inventory.GuiContainer; | ||
import net.minecraft.client.resources.I18n; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.entity.player.InventoryPlayer; | ||
import net.minecraft.util.ResourceLocation; | ||
import cofh.lib.gui.GuiBase; | ||
import me.roryclaasen.rorysmod.block.tile.TileEntityPoweredChest; | ||
import me.roryclaasen.rorysmod.container.ContainerPoweredChest; | ||
import me.roryclaasen.rorysmod.core.RorysMod; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraft.util.StatCollector; | ||
|
||
import org.lwjgl.opengl.GL11; | ||
|
||
public class GuiPoweredChest extends GuiContainer { | ||
|
||
private ResourceLocation texture = new ResourceLocation(RorysMod.MODID, "textures/gui/chest.png"); | ||
|
||
private InventoryPlayer inventory; | ||
private TileEntityPoweredChest te; | ||
public class GuiPoweredChest extends GuiBase { | ||
|
||
public GuiPoweredChest(TileEntityPoweredChest te, EntityPlayer player) { | ||
super(new ContainerPoweredChest(te, player)); | ||
inventory = player.inventory; | ||
this.te = te; | ||
} | ||
|
||
@Override | ||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { | ||
Minecraft.getMinecraft().renderEngine.bindTexture(texture); | ||
|
||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); | ||
|
||
int x = (width - xSize) / 2; | ||
int y = (height - ySize) / 2; | ||
|
||
drawTexturedModalRect(x, y, 0, 0, xSize, ySize); | ||
super(new ContainerPoweredChest(te, player), new ResourceLocation(RorysMod.MODID, "textures/gui/chest.png")); | ||
} | ||
|
||
@Override | ||
protected void drawGuiContainerForegroundLayer(int par1, int par2) { | ||
fontRendererObj.drawString(I18n.format(te.getInventoryName()), 8, 6, 4210752, false); | ||
fontRendererObj.drawString(I18n.format(inventory.getInventoryName()), 8, ySize - 96 + 2, 4210752); | ||
public void initGui() { | ||
super.initGui(); | ||
this.name = StatCollector.translateToLocal(RorysMod.GUIS.CHEST_POWERED.getName() + ".title"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.