Skip to content

Instantly share code, notes, and snippets.

Avatar

Parker Young Parker8283

View GitHub Profile
@Parker8283
Parker8283 / Portal2IntelGraphicsFixStart.bat
Last active Aug 29, 2015
A Windows batch file to fix Portal 2 on Intel Integrated Graphics. Use this to run Portal 2 if you are experiencing problems.
View Portal2IntelGraphicsFixStart.bat
@echo off
if exist "%ProgramFiles(x86)%\Steam\steamapps\common\Portal 2\update\cfg\videodefaults.txt" del "%ProgramFiles(x86)%\Steam\steamapps\common\Portal 2\update\cfg\videodefaults.txt"
start steam://rungameid/620
View gist:587d32ab8351c99fbe45
public void openUpdateGui() {
try {
FXMLLoader loader = new FXMLLoader(TTPHGui.class.getResource("fxml/update.fxml"));
updatePane = (AnchorPane)loader.load();
updateStage = new Stage();
updateStage.setTitle("Example Title");
updateStage.setResizable(false);
updateStage.initModality(Modality.WINDOW_MODAL);
updateStage.initOwner(primaryStage);
Scene scene = new Scene(updatePane);
View description.txt
All blocks will need 3 JSONs minimum, and all items will need 1 JSON minimum.
For each block:
- 1 BlockState JSON in assets/modid/blockstates
- Minimum of 1 Block Model JSON in assets/modid/models/block
- Minimum of 1 Item Model JSON in assets/modid/models/item
Fore each item:
- Minimum of 1 Item Model JSON in assets/modid/models/item
@Parker8283
Parker8283 / explanation.txt
Last active Aug 29, 2015
Why Forge PR #1713 should be pulled
View explanation.txt
So here's the deal.
The current problem is that, in 1.8, modders have no way of rendering their custom TESRs as ItemStacks
(through EntityItem, or as ItemStacks in GUIs). You may ask, "What changed? (besides everything related
to rendering)" Well, actually, this has ALWAYS been a bug. Though it was easily worked around by just
using an IItemRenderer. The problem is in net.minecraft.client.renderer.tileentity.TileEntityItemStackRenderer
(was net.minecraft.client.render.tileentity.TileEntityRenderChestHelper (or something like that) prior to 1.8).
In the renderByItem method, it checks against all the vanilla TESRs that render as an ItemStack the exact same
as they render in-world. The biggest thing is the last else. If the passed in ItemStack doesn't match any of the
other conditionals, it just renders the passed in ItemStack as a vanilla chest. Problem? Yes.
@Parker8283
Parker8283 / Developing for FML or Forge in IntelliJ IDEA.md
Last active Aug 29, 2015
Instructions for how to setup a dev env for working on FML/Forge in IntelliJ IDEA
View Developing for FML or Forge in IntelliJ IDEA.md

To do this, it's a little tricky. It's assumed that you have already cloned the repo and run the gradle tasks necessary.

  1. Open IDEA
  2. Select "Import Project"
  3. Navigate to the cloned repo, and inside of the eclipse folder, choose the Clean or FML/Forge folder, depending on what your working on (If you don't know, you probably want the FML/Forge folder).
  4. Select the .project file inside of the folder you navigated into, and hit OK. (Make sure you click the button to show hidden files if you don't see the .project file. (It's the last graphic button on the toolbar))
  5. All the default settings should be fine (unless you want the .ipr project format instead of the .idea project format; it doesn't matter), so click Next.
  6. Verify that the correct project is there, and click Next.
  7. Make sure you have the correct JDK selected and click Finish. IDEA will now convert the Eclipse project to an IDEA project.
  8. Once IDEA has set up the project, open the Project Structure (Command + ; on Mac, I