Merge remote-tracking branch 'origin/dev' into dev
commit 1a47c78556.
Conflicts:
src/main/java/com/cricketcraft/chisel/Features.java
No files matched your search
@@ -27,13 +27,13 @@ run
|
||||
#workspace
|
||||
saves
|
||||
asm
|
||||
config
|
||||
logs
|
||||
screenshots
|
||||
mods
|
||||
world
|
||||
lib
|
||||
libs
|
||||
config
|
||||
world
|
||||
|
||||
*.txt
|
||||
*.json
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
Contributing
|
||||
============
|
||||
___
|
||||
Setting up a Development Environment
|
||||
------------------------------------
|
||||
Chisel is open-source under the GPL v2 license. As a result, you may contribute to the development of the mod via pull requests.
|
||||
|
||||
To set up the mod as to allow you to make changes, do the following:
|
||||
|
||||
1. Clone the repository onto your local system.
|
||||
2. Open a command prompt from the repository folder.
|
||||
3. Run the command `gradlew setupDecompWorkspace` (using `./gradlew` if on Mac/Linux)
|
||||
|
||||
*The next steps vary based on what IDE you wish to use*
|
||||
|
||||
### IntelliJ IDEA
|
||||
1. Run `gradlew idea`.
|
||||
2. Open IntelliJ and point to either the project folder or the build.gradle file.
|
||||
3. After opening the project in IntelliJ, run `gradlew genIntellijRuns` in the command terminal you opened earlier.
|
||||
|
||||
### Eclipse
|
||||
|
||||
1. Run `gradlew eclipse`.
|
||||
2. Open Eclipse and import the folder as a project.
|
||||
|
||||
You now have a functional local copy of Chisel, ready to develop on.
|
||||
|
||||
___
|
||||
Formatting
|
||||
----------
|
||||
|
||||
When coding for Chisel 2, please use the provided [formatter settings](eclipseFormat.xml) to format your code. Poorly formatted code, or PRs which reformat existing code will likely not be accepted.
|
||||
@@ -1,49 +1,35 @@
|
||||
Chisel
|
||||
Chisel 2
|
||||
=======
|
||||
Chisel is a mod for Minecraft which adds aesthetic blocks to the game through the use of a chisel. Originally created by
|
||||
AUTOMATIC_MAIDEN, it was ported to Minecraft 1.7.2 by asie, and maintained by Pokefenn during 1.7.10 and now maintained by Cricket.
|
||||
Chisel is a mod for Minecraft which adds aesthetic blocks to the game through the use of a chisel.
|
||||
|
||||
Originally created by
|
||||
AUTOMATIC_MAIDEN, it was ported to Minecraft 1.7.2 by asie, and maintained by Pokefenn during 1.7.10.
|
||||
|
||||
The second iteration of the mod contains loads of new blocks, new features like the autochisel and chisel modes, and lots of bugfixes.
|
||||
|
||||
It is maintained by [Cricket](github.com/TheCricket), [tterrag](github.com/tterrag1098), [warlordjones](github.com/warlordjones), [Drullkus](github.com/Drullkus) (Artist), and [CptSpaceToaster](github.com/CptSpaceToaster).
|
||||
|
||||
Pull Requests
|
||||
---------------
|
||||
If you wish to create a pull request with an awesome new feature, a language translation or even a bug fix. That's cool but please push to the correct branch which is dev. That is the working branch. Master is for releases only.
|
||||
|
||||
Pull requests with new features, translations, and bufixes are very welcome. Please make sure to always submit PRs against the ***dev*** branch, not master.
|
||||
|
||||
Do not make PRs that are solely formatting or other aesthetic things.
|
||||
|
||||
If your PR is going to take a lot of work, it may be best to make an issue so we can discuss the feature before you create it.
|
||||
|
||||
See the [CONTRIBUTING](CONTRIBUTING.md) file for more details.
|
||||
|
||||
Issue Reporting
|
||||
----------------
|
||||
If you wish to report an issue with the mod, please submit one to the issue tracker in this repository. When creating an
|
||||
issue, please be sure to include...
|
||||
If you wish to report an issue with the mod, please submit one to the issue tracker in this repository. When creating an
|
||||
issue, please be sure to include:
|
||||
|
||||
-the version of Chisel you are using<br />
|
||||
-the version of Forge you are using<br />
|
||||
-the crash report (preferrably via <a href="http://pastebin.com/">Pastebin</a>) generated by the error<br />
|
||||
-depending on the error, an image of the problem<br />
|
||||
- The version of Chisel 2 you are using ("latest" is not an acceptable version)
|
||||
- The version of Forge you are using
|
||||
- If applicable, the crash report (preferrably via [Pastebin](http://pastebin.com/)). generated by the error
|
||||
- Depending on the error, an image of the problem
|
||||
|
||||
Contributing
|
||||
-------------
|
||||
Chisel is open-source under the GPL v2 license. As a result, you may contribute to the development of the mod via pull requests.
|
||||
To set up the mod as to allow you to make changes, do the following:
|
||||
|
||||
1. Clone the repository onto your local system.
|
||||
2. Open a command prompt from the repository folder.
|
||||
3. 3. Run the command 'gradlew setupDecompWorkspace' if on a Windows, 'bash gradlew setupDecompWorkspace' on a Mac, and 'gradle setupDecompWorkspace' if you have Gradle installed, on any OS.
|
||||
|
||||
*The next steps vary based on what IDE you wish to use*
|
||||
|
||||
### IntelliJ IDEA
|
||||
4. Run 'gradlew idea'.
|
||||
5. Open IntelliJ and point to either the project folder or the build.gradle file.
|
||||
6. After opening the project in IntelliJ, run 'gradlew genIntellijRuns' in the command terminal you opened earlier.
|
||||
|
||||
### Eclipse
|
||||
|
||||
4b. Run 'gradlew eclipse' if on a Windows, 'bash gradlew eclipse' on a Mac, and 'gradle eclipse' if you have Gradle installed, on any OS.
|
||||
|
||||
5b. Open Eclipse and point it to the folder named 'eclipse' within the folder.
|
||||
|
||||
You now have a functional local copy of Chisel, ready to develop on.
|
||||
|
||||
|
||||
MAKE SURE TO UPDATE YOUR FORK BEFORE MAKING A PULL REQUEST.
|
||||
|
||||
Jenkins
|
||||
Development Builds
|
||||
----------------
|
||||
http://coloredlightscore.us.to:8080/job/Chisel-2%20v1.7.10-Dev/
|
||||
@@ -56,11 +56,12 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "mcp.mobius.waila:Waila:${waila_version}_${minecraft_version}:dev"
|
||||
//compile "mcp.mobius.waila:Waila:${waila_version}_${minecraft_version}:dev"
|
||||
compile "codechicken:CodeChickenLib:${minecraft_version}-${ccl_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${minecraft_version}-${ccc_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
||||
compile "codechicken:ForgeMultipart:${minecraft_version}-${fmp_version}:dev"
|
||||
compile "com.pahimar.ee3:EquivalentExchange3:1.7.10-0.3.505:dev"
|
||||
}
|
||||
|
||||
processResources
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
package com.cricketcraft.chisel;
|
||||
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.andesite;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.diorite;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.granite;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.jackolantern;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.planks;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.pumpkin;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.stainedGlass;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.stainedGlassPane;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.torches;
|
||||
import static com.cricketcraft.chisel.utils.General.sGNames;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -11,21 +22,52 @@ import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils.SimpleCarvingGroup;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.block.*;
|
||||
import com.cricketcraft.chisel.block.BlockAutoChisel;
|
||||
import com.cricketcraft.chisel.block.BlockBeaconBase;
|
||||
import com.cricketcraft.chisel.block.BlockCarvable;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableAntiBlock;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableBookshelf;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableCarpet;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableGlass;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableGlow;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableGlowstone;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableIce;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableIceStairs;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableLayered;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePackedIce;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePackedIceStairs;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePane;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePowered;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePumpkin;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableSlab;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableStairs;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableTorch;
|
||||
import com.cricketcraft.chisel.block.BlockCloud;
|
||||
import com.cricketcraft.chisel.block.BlockConcrete;
|
||||
import com.cricketcraft.chisel.block.BlockEldritch;
|
||||
import com.cricketcraft.chisel.block.BlockGrimstone;
|
||||
import com.cricketcraft.chisel.block.BlockHolystone;
|
||||
import com.cricketcraft.chisel.block.BlockLavastone;
|
||||
import com.cricketcraft.chisel.block.BlockLeaf;
|
||||
import com.cricketcraft.chisel.block.BlockPresent;
|
||||
import com.cricketcraft.chisel.block.BlockRoadLine;
|
||||
import com.cricketcraft.chisel.block.BlockSnakestone;
|
||||
import com.cricketcraft.chisel.block.BlockSnakestoneObsidian;
|
||||
import com.cricketcraft.chisel.block.BlockWaterstone;
|
||||
import com.cricketcraft.chisel.block.CarvableStairsMaker;
|
||||
import com.cricketcraft.chisel.block.IStairsCreator;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerAntiblock;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerCarpetFloor;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerFakeController;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerLeaves;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerSlab;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerVoidstone;
|
||||
import com.cricketcraft.chisel.compat.fmp.ItemBlockChiselTorchPart;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.entity.EntityBallOMoss;
|
||||
@@ -50,8 +92,10 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.*;
|
||||
import static com.cricketcraft.chisel.utils.General.sGNames;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public enum Features {
|
||||
|
||||
@@ -113,13 +157,14 @@ public enum Features {
|
||||
BlockCarvable andesite = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
andesite.carverHelper.addVariation("tile.andesite.0.desc", 0, "andesite/andesite");
|
||||
andesite.carverHelper.addVariation("tile.andesite.1.desc", 1, "andesite/andesitePolished");
|
||||
andesite.carverHelper.addVariation("tile.andesite.2.desc", 2, "andesite/andesitePillar");
|
||||
andesite.carverHelper.addVariation("tile.andesite.3.desc", 3, "andesite/andesiteLBrick");
|
||||
andesite.carverHelper.addVariation("tile.andesite.4.desc", 4, "andesite/andesiteOrnate");
|
||||
andesite.carverHelper.addVariation("tile.andesite.5.desc", 5, "andesite/andesitePrism");
|
||||
andesite.carverHelper.addVariation("tile.andesite.6.desc", 6, "andesite/andesiteTiles");
|
||||
andesite.carverHelper.addVariation("tile.andesite.2.desc", 2, "andesite/andesitePillar");
|
||||
andesite.carverHelper.addVariation("tile.andesite.3.desc", 3, "andesite/andesiteLBrick");
|
||||
andesite.carverHelper.addVariation("tile.andesite.4.desc", 4, "andesite/andesiteOrnate");
|
||||
andesite.carverHelper.addVariation("tile.andesite.5.desc", 5, "andesite/andesitePrism");
|
||||
andesite.carverHelper.addVariation("tile.andesite.6.desc", 6, "andesite/andesiteTiles");
|
||||
andesite.carverHelper.registerAll(andesite, "andesite");
|
||||
Carving.chisel.registerOre("andesite", "blockAndesite");
|
||||
Carving.chisel.registerOre("andesite", "stoneAndesite");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -175,11 +220,11 @@ public enum Features {
|
||||
arcane.carverHelper.addVariation("tile.arcane.4.desc", 4, "arcane/runesGlow");
|
||||
arcane.carverHelper.addVariation("tile.arcane.5.desc", 5, "arcane/bigBrick");
|
||||
arcane.carverHelper.addVariation("tile.arcane.6.desc", 6, "arcane/conduitGlowAnim");
|
||||
arcane.carverHelper.addVariation("tile.arcane.7.desc", 7, "arcane/BorderBrain");
|
||||
arcane.carverHelper.addVariation("tile.arcane.8.desc", 8, "arcane/ArcaneBorder");
|
||||
arcane.carverHelper.addVariation("tile.arcane.9.desc", 9, "arcane/arcaneMatrix");
|
||||
arcane.carverHelper.addVariation("tile.arcane.10.desc", 10, "arcane/thaumcraftLogo");
|
||||
arcane.carverHelper.addVariation("tile.arcane.11.desc", 11, "arcane/arcaneCrackAnim");
|
||||
arcane.carverHelper.addVariation("tile.arcane.7.desc", 7, "arcane/BorderBrain");
|
||||
arcane.carverHelper.addVariation("tile.arcane.8.desc", 8, "arcane/ArcaneBorder");
|
||||
arcane.carverHelper.addVariation("tile.arcane.9.desc", 9, "arcane/arcaneMatrix");
|
||||
arcane.carverHelper.addVariation("tile.arcane.10.desc", 10, "arcane/thaumcraftLogo");
|
||||
arcane.carverHelper.addVariation("tile.arcane.11.desc", 11, "arcane/arcaneCrackAnim");
|
||||
arcane.carverHelper.registerAll(arcane, "arcane");
|
||||
Carving.chisel.registerOre("arcane", "arcane");
|
||||
}
|
||||
@@ -552,22 +597,22 @@ public enum Features {
|
||||
},
|
||||
|
||||
COPPER
|
||||
{
|
||||
{
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable copper = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
copper.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/copper/caution", 20);
|
||||
copper.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/copper/crate", 21);
|
||||
copper.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/copper/thermal", 22);
|
||||
copper.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/copper/adv", 23);
|
||||
copper.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/copper/egregious", 24);
|
||||
copper.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/copper/bolted", 25);
|
||||
copper.carverHelper.registerAll(copper, "copperblock");
|
||||
Carving.chisel.registerOre("copperblock", "blockCopper");
|
||||
}
|
||||
},
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable copper = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
copper.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/copper/caution", 20);
|
||||
copper.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/copper/crate", 21);
|
||||
copper.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/copper/thermal", 22);
|
||||
copper.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/copper/adv", 23);
|
||||
copper.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/copper/egregious", 24);
|
||||
copper.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/copper/bolted", 25);
|
||||
copper.carverHelper.registerAll(copper, "copperblock");
|
||||
Carving.chisel.registerOre("copperblock", "blockCopper");
|
||||
}
|
||||
},
|
||||
|
||||
DIAMOND_BLOCK {
|
||||
|
||||
@@ -588,7 +633,7 @@ public enum Features {
|
||||
diamond_block.carverHelper.addVariation("tile.diamond.10.desc", 10, "diamond/terrain-diamond-fourornate");
|
||||
diamond_block.carverHelper.addVariation("tile.diamond.11.desc", 11, "diamond/terrain-diamond-zelda");
|
||||
diamond_block.carverHelper.addVariation("tile.diamond.12.desc", 12, "diamond/terrain-diamond-ornatelayer");
|
||||
diamond_block.carverHelper.registerAll(diamond_block, "diamond_block");
|
||||
diamond_block.carverHelper.registerAll(diamond_block, "diamond_block");
|
||||
Carving.chisel.registerOre("diamond_block", "diamond");
|
||||
}
|
||||
},
|
||||
@@ -602,12 +647,13 @@ public enum Features {
|
||||
diorite.carverHelper.addVariation("tile.diorite.0.desc", 0, "diorite/diorite");
|
||||
diorite.carverHelper.addVariation("tile.diorite.1.desc", 1, "diorite/dioritePolished");
|
||||
diorite.carverHelper.addVariation("tile.diorite.2.desc", 2, "diorite/dioritePillar");
|
||||
diorite.carverHelper.addVariation("tile.diorite.3.desc", 3, "diorite/dioriteLBrick");
|
||||
diorite.carverHelper.addVariation("tile.diorite.4.desc", 4, "diorite/dioriteOrnate");
|
||||
diorite.carverHelper.addVariation("tile.diorite.5.desc", 5, "diorite/dioritePrism");
|
||||
diorite.carverHelper.addVariation("tile.diorite.6.desc", 6, "diorite/dioriteTiles");
|
||||
diorite.carverHelper.addVariation("tile.diorite.3.desc", 3, "diorite/dioriteLBrick");
|
||||
diorite.carverHelper.addVariation("tile.diorite.4.desc", 4, "diorite/dioriteOrnate");
|
||||
diorite.carverHelper.addVariation("tile.diorite.5.desc", 5, "diorite/dioritePrism");
|
||||
diorite.carverHelper.addVariation("tile.diorite.6.desc", 6, "diorite/dioriteTiles");
|
||||
diorite.carverHelper.registerAll(diorite, "diorite");
|
||||
Carving.chisel.registerOre("diorite", "diorite");
|
||||
Carving.chisel.registerOre("diorite", "blockDiorite");
|
||||
Carving.chisel.registerOre("diorite", "stoneDiorite");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -671,16 +717,16 @@ public enum Features {
|
||||
}
|
||||
},
|
||||
|
||||
END_STONE {
|
||||
END_STONE {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
//BlockCarvable end_stone = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
Carving.chisel.addVariation("end_stone", Blocks.end_stone , 0, 0);
|
||||
//end_stone.carverHelper.registerAll(emerald_block, "endStone");
|
||||
Carving.chisel.registerOre("end_stone", "end_stone");
|
||||
}
|
||||
},
|
||||
@Override
|
||||
void addBlocks() {
|
||||
//BlockCarvable end_stone = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
Carving.chisel.addVariation("end_stone", Blocks.end_stone , 0, 0);
|
||||
//end_stone.carverHelper.registerAll(emerald_block, "endStone");
|
||||
Carving.chisel.registerOre("end_stone", "end_stone");
|
||||
}
|
||||
},
|
||||
|
||||
FACTORY {
|
||||
|
||||
@@ -715,7 +761,7 @@ public enum Features {
|
||||
factoryblock2.carverHelper.addVariation("tile.factory2.2.desc", 2, "factory/tilemosaic", 22);
|
||||
factoryblock2.carverHelper.addVariation("tile.factory2.3.desc", 3, "factory/wireframeblue", 23);
|
||||
factoryblock2.carverHelper.registerAll(factoryblock2, "factoryblock2");
|
||||
factoryblock2.carverHelper.registerVariations("factoryblock", factoryblock2);
|
||||
factoryblock2.carverHelper.registerVariations("factoryblock");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -769,7 +815,7 @@ public enum Features {
|
||||
fantasyblock2.carverHelper.addVariation("tile.fantasyblock2.15.desc", 15, "fantasy2/bricks-wear");
|
||||
|
||||
fantasyblock2.carverHelper.registerBlock(fantasyblock2, "fantasyblock2");
|
||||
fantasyblock2.carverHelper.registerVariations("fantasyblock", fantasyblock2);
|
||||
fantasyblock2.carverHelper.registerVariations("fantasy");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -793,14 +839,14 @@ public enum Features {
|
||||
futura.carverHelper.addVariation("tile.futura.3.desc", 3, "futura/WIP/wavyWIP");
|
||||
futura.carverHelper.registerAll(futura, "futura");
|
||||
|
||||
BlockCarvable circuits = (BlockCarvable) new BlockCarvableGlow("animations/strobe").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
circuits.carverHelper.addVariation("tile.futuraCircuit." + ItemDye.field_150921_b[i] + ".desc", i, "futura/circuitPlate", (i+20));
|
||||
}
|
||||
circuits.carverHelper.registerBlock(circuits, "futuraCircuit");
|
||||
circuits.carverHelper.registerVariations("futura", circuits);
|
||||
BlockCarvable circuits = (BlockCarvable) new BlockCarvableGlow("animations/strobe").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
circuits.carverHelper.addVariation("tile.futuraCircuit." + ItemDye.field_150921_b[i] + ".desc", i, "futura/circuitPlate", (i+20));
|
||||
}
|
||||
|
||||
Carving.chisel.registerOre("futura", "futura");
|
||||
circuits.carverHelper.registerBlock(circuits, "futuraCircuit");
|
||||
circuits.carverHelper.registerVariations("futura");
|
||||
Carving.chisel.registerOre("futura", "futura");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -835,8 +881,8 @@ public enum Features {
|
||||
|
||||
BlockCarvableGlass glass2 = (BlockCarvableGlass) new BlockCarvableGlass().setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.3F).setStepSound(Block.soundTypeGlass);
|
||||
glass2.carverHelper.addVariation("tile.glass2.0.desc", 0, "glass/chrono", 20);
|
||||
glass2.carverHelper.registerBlock(glass2, "glass2");
|
||||
glass2.carverHelper.registerVariations("glass", glass2);
|
||||
glass2.carverHelper.registerBlock(glass2, "glass2");
|
||||
glass2.carverHelper.registerVariations("glass");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -971,18 +1017,18 @@ public enum Features {
|
||||
gold_block.carverHelper.addVariation("tile.gold.13.desc", 13, "gold/terrain-gold-spaceblack");
|
||||
gold_block.carverHelper.addVariation("tile.gold.14.desc", 14, "gold/terrain-gold-simple");
|
||||
|
||||
BlockCarvable gold2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/gold/caution", 20);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/gold/crate", 21);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/gold/thermal", 22);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/gold/adv", 23);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/gold/egregious", 24);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/gold/bolted", 25);
|
||||
gold2.carverHelper.registerBlock(gold2, "gold2");
|
||||
gold2.carverHelper.registerVariations("gold_block", gold2);
|
||||
BlockCarvable gold2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/gold/caution", 20);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/gold/crate", 21);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/gold/thermal", 22);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/gold/adv", 23);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/gold/egregious", 24);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/gold/bolted", 25);
|
||||
gold2.carverHelper.registerBlock(gold2, "gold2");
|
||||
gold2.carverHelper.registerVariations("gold_block");
|
||||
|
||||
gold_block.carverHelper.registerAll(gold_block, "gold_block");
|
||||
gold_block.carverHelper.registerAll(gold_block, "gold_block");
|
||||
Carving.chisel.registerOre("gold_block", "blockGold");
|
||||
}
|
||||
},
|
||||
@@ -996,12 +1042,13 @@ public enum Features {
|
||||
granite.carverHelper.addVariation("tile.granite.0.desc", 0, "granite/granite");
|
||||
granite.carverHelper.addVariation("tile.granite.1.desc", 1, "granite/granitePolished");
|
||||
granite.carverHelper.addVariation("tile.granite.2.desc", 2, "granite/granitePillar");
|
||||
granite.carverHelper.addVariation("tile.granite.3.desc", 3, "granite/graniteLBrick");
|
||||
granite.carverHelper.addVariation("tile.granite.4.desc", 4, "granite/graniteOrnate");
|
||||
granite.carverHelper.addVariation("tile.granite.5.desc", 5, "granite/granitePrism");
|
||||
granite.carverHelper.addVariation("tile.granite.6.desc", 6, "granite/graniteTiles");
|
||||
granite.carverHelper.addVariation("tile.granite.3.desc", 3, "granite/graniteLBrick");
|
||||
granite.carverHelper.addVariation("tile.granite.4.desc", 4, "granite/graniteOrnate");
|
||||
granite.carverHelper.addVariation("tile.granite.5.desc", 5, "granite/granitePrism");
|
||||
granite.carverHelper.addVariation("tile.granite.6.desc", 6, "granite/graniteTiles");
|
||||
granite.carverHelper.registerAll(granite, "granite");
|
||||
Carving.chisel.registerOre("granite", "granite");
|
||||
Carving.chisel.registerOre("granite", "blockGranite");
|
||||
Carving.chisel.registerOre("granite", "stoneGranite");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1044,21 +1091,21 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable hexPlating = (BlockCarvable) new BlockCarvableGlow("animations/archetype2").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
hexPlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexBase");
|
||||
}
|
||||
hexPlating.carverHelper.registerAll(hexPlating, "hexPlating");
|
||||
Carving.chisel.registerOre("hexPlating", "hexPlating");
|
||||
BlockCarvable hexPlating = (BlockCarvable) new BlockCarvableGlow("animations/archetype2").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
hexPlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexBase");
|
||||
}
|
||||
hexPlating.carverHelper.registerAll(hexPlating, "hexPlating");
|
||||
Carving.chisel.registerOre("hexPlating", "hexPlating");
|
||||
|
||||
BlockCarvable hexLargePlating = (BlockCarvable) new BlockCarvableGlow("animations/archetype2").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
hexLargePlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexNew", (i+20));
|
||||
}
|
||||
BlockCarvable hexLargePlating = (BlockCarvable) new BlockCarvableGlow("animations/archetype2").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
hexLargePlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexNew", (i+20));
|
||||
}
|
||||
|
||||
hexLargePlating.carverHelper.registerBlock(hexLargePlating, "hexLargePlating");
|
||||
hexLargePlating.carverHelper.registerVariations("hexPlating", hexLargePlating);
|
||||
Carving.chisel.registerOre("hexPlating", "hexPlating");
|
||||
hexLargePlating.carverHelper.registerBlock(hexLargePlating, "hexLargePlating");
|
||||
hexLargePlating.carverHelper.registerVariations("hexPlating");
|
||||
Carving.chisel.registerOre("hexPlating", "hexPlating");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1133,7 +1180,7 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvableIcePillar ice_pillar = (BlockCarvableIcePillar) new BlockCarvableIcePillar(Material.ice).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.5F).setLightOpacity(3)
|
||||
BlockCarvableIce ice_pillar = (BlockCarvableIce) new BlockCarvableIce().setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.5F).setLightOpacity(3)
|
||||
.setStepSound(Block.soundTypeGlass);
|
||||
|
||||
ice_pillar.carverHelper.addVariation("tile.icePillar.0.desc", 0, "icepillar/plainplain");
|
||||
@@ -1143,8 +1190,12 @@ public enum Features {
|
||||
ice_pillar.carverHelper.addVariation("tile.icePillar.4.desc", 4, "icepillar/convexplain");
|
||||
ice_pillar.carverHelper.addVariation("tile.icePillar.5.desc", 5, "icepillar/carved");
|
||||
ice_pillar.carverHelper.addVariation("tile.icePillar.6.desc", 6, "icepillar/ornamental");
|
||||
ice_pillar.carverHelper.registerBlock(ice_pillar, "ice_pillar");
|
||||
ice_pillar.carverHelper.registerVariations("ice", ice_pillar);
|
||||
ice_pillar.carverHelper.registerAll(ice_pillar, "ice_pillar");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(new ItemStack(ChiselBlocks.ice_pillar, 6, 0), "XX", "XX", "XX", 'X', new ItemStack(ChiselBlocks.ice, 1, OreDictionary.WILDCARD_VALUE));
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1225,18 +1276,18 @@ public enum Features {
|
||||
iron_block.carverHelper.addVariation("tile.iron.14.desc", 14, "iron/terrain-iron-vents");
|
||||
iron_block.carverHelper.addVariation("tile.iron.15.desc", 15, "iron/terrain-iron-simple");
|
||||
|
||||
BlockCarvable iron2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/iron/caution", 20);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/iron/crate", 21);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/iron/thermal", 22);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/iron/adv", 23);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/iron/egregious", 24);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/iron/bolted", 25);
|
||||
iron2.carverHelper.registerBlock(iron2, "iron2");
|
||||
iron2.carverHelper.registerVariations("iron_block", iron2);
|
||||
BlockCarvable iron2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/iron/caution", 20);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/iron/crate", 21);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/iron/thermal", 22);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/iron/adv", 23);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/iron/egregious", 24);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/iron/bolted", 25);
|
||||
iron2.carverHelper.registerBlock(iron2, "iron2");
|
||||
iron2.carverHelper.registerVariations("iron_block");
|
||||
|
||||
iron_block.carverHelper.registerAll(iron_block, "iron_block");
|
||||
iron_block.carverHelper.registerAll(iron_block, "iron_block");
|
||||
Carving.chisel.registerOre("iron_block", "blockIron");
|
||||
}
|
||||
},
|
||||
@@ -1306,7 +1357,7 @@ public enum Features {
|
||||
lapis_block.carverHelper.addVariation("tile.lapis.7.desc", 7, "lapis/a1-blocklapis-smooth");
|
||||
lapis_block.carverHelper.addVariation("tile.lapis.8.desc", 8, "lapis/a1-blocklapis-ornatelayer");
|
||||
|
||||
lapis_block.carverHelper.registerAll(lapis_block, "lapis_block");
|
||||
lapis_block.carverHelper.registerAll(lapis_block, "lapis_block");
|
||||
Carving.chisel.registerOre("lapis_block", "lapis");
|
||||
}
|
||||
},
|
||||
@@ -1341,12 +1392,12 @@ public enum Features {
|
||||
void addBlocks() {
|
||||
BlockCarvable lead = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
lead.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/lead/caution", 20);
|
||||
lead.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/lead/crate", 21);
|
||||
lead.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/lead/thermal", 22);
|
||||
lead.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/lead/adv", 23);
|
||||
lead.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/lead/egregious", 24);
|
||||
lead.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/lead/bolted", 25);
|
||||
lead.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/lead/caution");
|
||||
lead.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/lead/crate");
|
||||
lead.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/lead/thermal");
|
||||
lead.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/lead/adv");
|
||||
lead.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/lead/egregious");
|
||||
lead.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/lead/bolted");
|
||||
lead.carverHelper.registerAll(lead, "leadblock");
|
||||
Carving.chisel.registerOre("leadblock", "blockLead");
|
||||
}
|
||||
@@ -1379,23 +1430,14 @@ public enum Features {
|
||||
Carving.chisel.addVariation("leaves", Blocks.leaves, 3, 0);
|
||||
Carving.chisel.addVariation("leaves", Blocks.leaves2, 0, 0);
|
||||
Carving.chisel.addVariation("leaves", Blocks.leaves2, 1, 0);
|
||||
if (Configurations.fancy) { //TODO: This looks problematic -Drullkus
|
||||
leaves.carverHelper.addVariation("tile.leaves.6.desc", 6, "leaves/dead");
|
||||
leaves.carverHelper.addVariation("tile.leaves.7.desc", 7, "leaves/fancy");
|
||||
leaves.carverHelper.addVariation("tile.leaves.8.desc", 8, "leaves/pinkpetal");
|
||||
leaves.carverHelper.addVariation("tile.leaves.9.desc", 9, "leaves/red_roses");
|
||||
leaves.carverHelper.addVariation("tile.leaves.10.desc", 10, "leaves/roses");
|
||||
leaves.carverHelper.addVariation("tile.leaves.11.desc", 11, "leaves/christmasBalls");
|
||||
leaves.carverHelper.addVariation("tile.leaves.12.desc", 12, "leaves/christmasLights");
|
||||
} else {
|
||||
leaves.carverHelper.addVariation("tile.leaves.6.desc", 6, "leaves/dead_opaque");
|
||||
leaves.carverHelper.addVariation("tile.leaves.7.desc", 7, "leaves/fancy_opaque");
|
||||
leaves.carverHelper.addVariation("tile.leaves.8.desc", 8, "leaves/pinkpetal_opaque");
|
||||
leaves.carverHelper.addVariation("tile.leaves.9.desc", 9, "leaves/red_roses_opaque");
|
||||
leaves.carverHelper.addVariation("tile.leaves.10.desc", 10, "leaves/roses_opaque");
|
||||
leaves.carverHelper.addVariation("tile.leaves.11.desc", 11, "leaves/christmasBalls_opaque");
|
||||
leaves.carverHelper.addVariation("tile.leaves.12.desc", 12, "leaves/christmasLights_opaque");
|
||||
}
|
||||
|
||||
leaves.carverHelper.addVariation("tile.leaves.6.desc", 6, new SubmapManagerLeaves("leaves/dead"));
|
||||
leaves.carverHelper.addVariation("tile.leaves.7.desc", 7, new SubmapManagerLeaves("leaves/fancy"));
|
||||
leaves.carverHelper.addVariation("tile.leaves.8.desc", 8, new SubmapManagerLeaves("leaves/pinkpetal"));
|
||||
leaves.carverHelper.addVariation("tile.leaves.9.desc", 9, new SubmapManagerLeaves("leaves/red_roses"));
|
||||
leaves.carverHelper.addVariation("tile.leaves.10.desc", 10, new SubmapManagerLeaves("leaves/roses"));
|
||||
leaves.carverHelper.addVariation("tile.leaves.11.desc", 11, new SubmapManagerLeaves("leaves/christmasBalls"));
|
||||
leaves.carverHelper.addVariation("tile.leaves.12.desc", 12, new SubmapManagerLeaves("leaves/christmasLights"));
|
||||
|
||||
leaves.carverHelper.registerAll(leaves, "leaves");
|
||||
Carving.chisel.registerOre("leaves", "leaves");
|
||||
@@ -1584,7 +1626,7 @@ public enum Features {
|
||||
marble_pillar.carverHelper.addVariation("tile.marblePillarOld.14.desc", 14, "marblepillarold/a1-stonepillar-greekbottomgreek");
|
||||
marble_pillar.carverHelper.addVariation("tile.marblePillarOld.15.desc", 15, "marblepillarold/a1-stonepillar-plainbottomgreek");
|
||||
} else {
|
||||
marble_pillar = (BlockCarvable) new BlockCarvablePillar(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(2.0F).setResistance(10F)
|
||||
marble_pillar = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(2.0F).setResistance(10F)
|
||||
.setStepSound(Block.soundTypeStone);
|
||||
|
||||
marble_pillar.carverHelper.addVariation("tile.marblePillar.0.desc", 0, "marblepillar/pillar");
|
||||
@@ -1650,42 +1692,43 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
//GameRegistry.addRecipe(new ItemStack(ChiselBlocks.marble_pillar, 6), "XX", "XX", "XX", 'X', new ItemStack(ChiselBlocks.marble, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addRecipe(new ItemStack(ChiselBlocks.marble_pillar, 6), "XX", "XX", "XX", 'X', new ItemStack(ChiselBlocks.marble, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addRecipe(new ItemStack(ChiselBlocks.marble_pillar_slab, 6, 0), "***", '*', new ItemStack(ChiselBlocks.marble_pillar, 1, OreDictionary.WILDCARD_VALUE));
|
||||
}
|
||||
},
|
||||
|
||||
NATION {
|
||||
NATION {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable imperial = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
imperial.carverHelper.addVariation("tile.rebel.0.desc", 0, "rebel/imperialCamo");
|
||||
imperial.carverHelper.addVariation("tile.rebel.1.desc", 1, "rebel/imperialCamoSecluded");
|
||||
imperial.carverHelper.addVariation("tile.rebel.2.desc", 2, "rebel/imperialPlate");
|
||||
imperial.carverHelper.addVariation("tile.rebel.3.desc", 3, "rebel/imperialCautionWhite");
|
||||
imperial.carverHelper.addVariation("tile.rebel.4.desc", 4, "rebel/imperialCautionOrange");
|
||||
//imperial.carverHelper.registerBlock(imperial, "imperial");
|
||||
imperial.carverHelper.registerAll(imperial, "rebel");
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable imperial = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
imperial.carverHelper.addVariation("tile.imperial.0.desc", 0, "military/imperialCamo");
|
||||
imperial.carverHelper.addVariation("tile.imperial.1.desc", 1, "military/imperialCamoSecluded");
|
||||
imperial.carverHelper.addVariation("tile.imperial.2.desc", 2, "military/imperialPlate");
|
||||
imperial.carverHelper.addVariation("tile.imperial.3.desc", 3, "military/imperialCautionWhite");
|
||||
imperial.carverHelper.addVariation("tile.imperial.4.desc", 4, "military/imperialCautionOrange");
|
||||
imperial.carverHelper.registerBlock(imperial, "nation");
|
||||
|
||||
BlockCarvable rebel = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
rebel.carverHelper.addVariation("tile.rebel.0.desc", 0, "rebel/rebelCamo");
|
||||
rebel.carverHelper.addVariation("tile.rebel.1.desc", 1, "rebel/rebelCamoSecluded");
|
||||
rebel.carverHelper.addVariation("tile.rebel.2.desc", 2, "rebel/rebelPlate");
|
||||
rebel.carverHelper.addVariation("tile.rebel.3.desc", 3, "rebel/rebelCautionWhite");
|
||||
rebel.carverHelper.addVariation("tile.rebel.4.desc", 4, "rebel/rebelCautionRed");
|
||||
rebel.carverHelper.registerBlock(rebel, "rebel");
|
||||
rebel.carverHelper.registerVariations("rebel", rebel);
|
||||
BlockCarvable rebel = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
rebel.carverHelper.addVariation("tile.rebel.0.desc", 0, "military/rebelCamo", 20);
|
||||
rebel.carverHelper.addVariation("tile.rebel.1.desc", 1, "military/rebelCamoSecluded", 21);
|
||||
rebel.carverHelper.addVariation("tile.rebel.2.desc", 2, "military/rebelPlate", 22);
|
||||
rebel.carverHelper.addVariation("tile.rebel.3.desc", 3, "military/rebelCautionWhite", 23);
|
||||
rebel.carverHelper.addVariation("tile.rebel.4.desc", 4, "military/rebelCautionRed", 24);
|
||||
rebel.carverHelper.registerBlock(rebel, "rebel");
|
||||
|
||||
Carving.chisel.registerOre("rebel", "rebel");
|
||||
}
|
||||
imperial.carverHelper.registerVariations("military");
|
||||
rebel.carverHelper.registerVariations("military");
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.rebel, 32, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y',
|
||||
Items.iron_ingot, 'z', Items.gold_nugget }));
|
||||
}
|
||||
},
|
||||
Carving.chisel.registerOre("military", "military");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.rebel, 32, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y',
|
||||
Items.iron_ingot, 'z', Items.gold_nugget }));
|
||||
}
|
||||
},
|
||||
|
||||
NETHER_BRICK {
|
||||
|
||||
@@ -1773,7 +1816,7 @@ public enum Features {
|
||||
obsidian.carverHelper.addVariation("tile.obsidian.14.desc", 14, "obsidian/greek");
|
||||
obsidian.carverHelper.addVariation("tile.obsidian.15.desc", 15, "obsidian/crate");
|
||||
|
||||
obsidian.carverHelper.registerAll(obsidian, "obsidian");
|
||||
obsidian.carverHelper.registerAll(obsidian, "obsidian");
|
||||
Carving.chisel.registerOre("obsidian", "obsidian");
|
||||
}
|
||||
},
|
||||
@@ -1813,7 +1856,7 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvablePackedIcePillar packedice_pillar = (BlockCarvablePackedIcePillar) new BlockCarvablePackedIcePillar(Material.ice).setCreativeTab(ChiselTabs.tabOtherChiselBlocks)
|
||||
BlockCarvablePackedIce packedice_pillar = (BlockCarvablePackedIce) new BlockCarvablePackedIce().setCreativeTab(ChiselTabs.tabOtherChiselBlocks)
|
||||
.setHardness(0.5F).setLightOpacity(3).setStepSound(Block.soundTypeGlass);
|
||||
|
||||
packedice_pillar.carverHelper.addVariation("tile.packedice_pillar.0.desc", 0, "icepillar/plainplain");
|
||||
@@ -2122,7 +2165,7 @@ public enum Features {
|
||||
redstone_block.carverHelper.addVariation("tile.redstone_block.14.desc", 14, "redstone/a1-blockredstone-skullred");
|
||||
redstone_block.carverHelper.addVariation("tile.redstone_block.15.desc", 15, "redstone/a1-blockredstone-redstonezelda");
|
||||
|
||||
redstone_block.carverHelper.registerAll(redstone_block, "redstone_block");
|
||||
redstone_block.carverHelper.registerAll(redstone_block, "redstone_block");
|
||||
Carving.chisel.registerOre("redstone_block", "redstone");
|
||||
}
|
||||
},
|
||||
@@ -2177,7 +2220,7 @@ public enum Features {
|
||||
sandstone2.carverHelper.addVariation("tile.sandstone.16.desc", 0, "sandstone2/terrain-sandstone-brickflat", 19);
|
||||
sandstone2.carverHelper.addVariation("tile.sandstone.17.desc", 1, "sandstone2/a0-sandstonepreview-smoothflat", 20);
|
||||
sandstone2.carverHelper.registerBlock(sandstone2, "sandstone2");
|
||||
sandstone2.carverHelper.registerVariations("sandstone", sandstone2);
|
||||
sandstone2.carverHelper.registerVariations("sandstone");
|
||||
|
||||
BlockCarvable sandstone_scribbles = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setStepSound(Block.soundTypeStone).setHardness(0.8F);
|
||||
sandstone_scribbles.carverHelper.addVariation("tile.sandstoneScribbles.desc", 0, "sandstone-scribbles/scribbles-0", 36);
|
||||
@@ -2197,7 +2240,7 @@ public enum Features {
|
||||
sandstone_scribbles.carverHelper.addVariation("tile.sandstoneScribbles.desc", 14, "sandstone-scribbles/scribbles-14", 50);
|
||||
sandstone_scribbles.carverHelper.addVariation("tile.sandstoneScribbles.desc", 15, "sandstone-scribbles/scribbles-15", 51);
|
||||
sandstone_scribbles.carverHelper.registerBlock(sandstone_scribbles, "sandstone_scribbles");
|
||||
sandstone_scribbles.carverHelper.registerVariations("sandstone", sandstone_scribbles);
|
||||
sandstone_scribbles.carverHelper.registerVariations("sandstone");
|
||||
|
||||
Carving.chisel.registerOre("sandstone", "sandstone");
|
||||
}
|
||||
@@ -2330,10 +2373,10 @@ public enum Features {
|
||||
}
|
||||
}
|
||||
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.0.desc", 0, "stonebrick2/masonBricksPlain", 16);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.1.desc", 1, "stonebrick2/masonBricksFelsic", 17);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.2.desc", 2, "stonebrick2/masonBricksMafic", 18);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.3.desc", 3, "stonebrick2/masonBricksMixed", 19);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.0.desc", 0, "stonebrick2/masonBricksPlain", 16);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.1.desc", 1, "stonebrick2/masonBricksFelsic", 17);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.2.desc", 2, "stonebrick2/masonBricksMafic", 18);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.3.desc", 3, "stonebrick2/masonBricksMixed", 19);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.4.desc", 4, "stonebrick/smallbricks");
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.5.desc", 5, "stonebrick/largebricks");
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.6.desc", 6, "stonebrick/smallchaotic");
|
||||
@@ -2348,9 +2391,9 @@ public enum Features {
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.15.desc", 15, "stonebrick/poison");
|
||||
|
||||
stonebricksmooth.carverHelper.registerAll(stonebricksmooth, "stonebricksmooth");
|
||||
Carving.chisel.registerOre("stonebricksmooth", "stonebricksmooth");
|
||||
Carving.chisel.registerOre("stonebricksmooth", "stonebricksmooth");
|
||||
|
||||
//Carving.chisel.addVariation("stonebricksmooth", GameRegistry.findBlock("Chisel-2", "tile.TFTowerStone"), 0, 0);
|
||||
//Carving.chisel.addVariation("stonebricksmooth", GameRegistry.findBlock("Chisel-2", "tile.TFTowerStone"), 0, 0);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2388,23 +2431,23 @@ public enum Features {
|
||||
technical.carverHelper.addVariation("tile.technical.13.desc", 13, "technical/grate");
|
||||
technical.carverHelper.addVariation("tile.technical.14.desc", 14, "technical/malfunctionFan");
|
||||
technical.carverHelper.addVariation("tile.technical.15.desc", 15, "technical/grateRusty");
|
||||
technical.carverHelper.registerAll(technical, "technical");
|
||||
technical.carverHelper.registerAll(technical, "technical");
|
||||
|
||||
BlockCarvableGlass technical2 = (BlockCarvableGlass) new BlockCarvableGlass().setHardness(2.0F).setResistance(10F);
|
||||
technical2.carverHelper.addVariation("tile.technical.0.desc", 0, "technical/scaffoldTransparent", 20);
|
||||
technical2.carverHelper.addVariation("tile.technical.4.desc", 1, "technical/fanFastTransparent", 21);
|
||||
technical2.carverHelper.addVariation("tile.technical.6.desc", 2, "technical/fanStillTransparent", 22);
|
||||
technical2.carverHelper.addVariation("tile.technical.14.desc", 3, "technical/fanStillTransparent", 23);
|
||||
technical2.carverHelper.registerBlock(technical2, "technical2");
|
||||
technical2.carverHelper.registerVariations("technical", technical2);
|
||||
technical2.carverHelper.registerBlock(technical2, "technical2");
|
||||
technical2.carverHelper.registerVariations("technical");
|
||||
|
||||
BlockCarvable technical3 = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
technical3.carverHelper.addVariation("tile.technical3.0.desc", 0, "technical/massiveFan", 40);
|
||||
technical3.carverHelper.addVariation("tile.technical3.1.desc", 1, "technical/massiveHexPlating", 41);
|
||||
technical2.carverHelper.registerBlock(technical3, "technical3");
|
||||
technical2.carverHelper.registerVariations("technical", technical3);
|
||||
BlockCarvable technical3 = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
technical3.carverHelper.addVariation("tile.technical3.0.desc", 0, "technical/massiveFan", 40);
|
||||
technical3.carverHelper.addVariation("tile.technical3.1.desc", 1, "technical/massiveHexPlating", 41);
|
||||
technical2.carverHelper.registerBlock(technical3, "technical3");
|
||||
technical2.carverHelper.registerVariations("technical");
|
||||
|
||||
Carving.chisel.registerOre("technical", "technical");
|
||||
Carving.chisel.registerOre("technical", "technical");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2663,39 +2706,39 @@ public enum Features {
|
||||
void addBlocks() {
|
||||
BlockCarvable voidstone = (BlockCarvable) new BlockCarvable().setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setStepSound(Block.soundTypeStone)
|
||||
.setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(5.0F).setResistance(10.0F);
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.0.desc", 0, "voidstone/raw");
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.1.desc", 1, "voidstone/quarters");
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.2.desc", 2, "voidstone/smooth");
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.3.desc", 3, "voidstone/skulls");
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.4.desc", 4, "voidstone/rune");
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.5.desc", 5, "voidstone/metalborder");
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.6.desc", 6, "voidstone/eye");
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.7.desc", 7, "voidstone/bevel");
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.0.desc", 0, new SubmapManagerVoidstone("voidstone/raw"));
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.1.desc", 1, new SubmapManagerVoidstone("voidstone/quarters"));
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.2.desc", 2, new SubmapManagerVoidstone("voidstone/smooth"));
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.3.desc", 3, new SubmapManagerVoidstone("voidstone/skulls"));
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.4.desc", 4, new SubmapManagerVoidstone("voidstone/rune"));
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.5.desc", 5, new SubmapManagerVoidstone("voidstone/metalborder"));
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.6.desc", 6, new SubmapManagerVoidstone("voidstone/eye"));
|
||||
voidstone.carverHelper.addVariation("tile.voidstone.7.desc", 7, new SubmapManagerVoidstone("voidstone/bevel"));
|
||||
|
||||
voidstone.carverHelper.registerAll(voidstone, "voidstone");
|
||||
Carving.chisel.registerOre("voidstone", "voidstone");
|
||||
|
||||
BlockMultiLayer voidstone2 = (BlockMultiLayer) new BlockMultiLayer(Material.rock, Chisel.MOD_ID + ":voidstone/animated/void").setStepSound(Block.soundTypeStone)
|
||||
BlockCarvable voidstone2 = (BlockCarvable) new BlockCarvable().setStepSound(Block.soundTypeStone)
|
||||
.setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(5.0F).setResistance(10.0F);
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.0.desc", 0, "voidstone/animated/raw");
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.1.desc", 1, "voidstone/animated/quarters");
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.2.desc", 2, "voidstone/animated/smooth");
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.3.desc", 3, "voidstone/animated/skulls");
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.4.desc", 4, "voidstone/animated/rune");
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.5.desc", 5, "voidstone/animated/metalborder");
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.6.desc", 6, "voidstone/animated/eye");
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.7.desc", 7, "voidstone/animated/bevel");
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.0.desc", 0, new SubmapManagerVoidstone("voidstone/animated/raw"));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.1.desc", 1, new SubmapManagerVoidstone("voidstone/animated/quarters"));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.2.desc", 2, new SubmapManagerVoidstone("voidstone/animated/smooth"));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.3.desc", 3, new SubmapManagerVoidstone("voidstone/animated/skulls"));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.4.desc", 4, new SubmapManagerVoidstone("voidstone/animated/rune"));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.5.desc", 5, new SubmapManagerVoidstone("voidstone/animated/metalborder"));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.6.desc", 6, new SubmapManagerVoidstone("voidstone/animated/eye"));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.7.desc", 7, new SubmapManagerVoidstone("voidstone/animated/bevel"));
|
||||
|
||||
voidstone2.carverHelper.registerAll(voidstone2, "voidstone2");
|
||||
Carving.chisel.registerOre("voidstone2", "voidstone2");
|
||||
|
||||
BlockCarvable voidstoneRunic = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(5.0F).setResistance(10.0F);
|
||||
BlockCarvable voidstonerunic = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(5.0F).setResistance(10.0F);
|
||||
|
||||
|
||||
for (int i = 1; i < 16; i++)
|
||||
voidstoneRunic.carverHelper.addVariation("tile.voidstoneRunic." + sGNames[i].replaceAll(" ", "").toLowerCase() + ".desc", i, "voidstone/runes/rune" + sGNames[i].replaceAll(" ", ""));
|
||||
voidstoneRunic.carverHelper.registerAll(voidstoneRunic, "voidstoneRunic");
|
||||
voidstoneRunic.carverHelper.registerVariations("voidstone", voidstoneRunic);
|
||||
voidstonerunic.carverHelper.addVariation("tile.voidstoneRunic." + sGNames[i].replaceAll(" ", "").toLowerCase() + ".desc", i, "voidstone/runes/rune" + sGNames[i].replaceAll(" ", ""));
|
||||
voidstonerunic.carverHelper.registerAll(voidstonerunic, "voidstoneRunic");
|
||||
voidstonerunic.carverHelper.registerVariations("voidstone");
|
||||
|
||||
Carving.chisel.registerOre("voidstoneRunic", "voidstoneRunic");
|
||||
}
|
||||
@@ -2713,12 +2756,12 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvablePillar voidstonePillar = (BlockCarvablePillar) new BlockCarvablePillar(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setStepSound(Block.soundTypeStone);
|
||||
BlockCarvable voidstonePillar = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setStepSound(Block.soundTypeStone);
|
||||
voidstonePillar.carverHelper.addVariation("tile.voidstonePillar.0.desc", 0, "voidstone/pillar");
|
||||
voidstonePillar.carverHelper.registerAll(voidstonePillar, "voidstonePillar");
|
||||
Carving.chisel.registerOre("voidstonePillar", "voidstonePillar");
|
||||
|
||||
BlockCarvablePillar voidstonePillar2 = (BlockCarvablePillar) new BlockCarvablePillar(Material.rock).setStepSound(Block.soundTypeStone);
|
||||
BlockCarvable voidstonePillar2 = (BlockCarvable) new BlockCarvable(Material.rock).setStepSound(Block.soundTypeStone);
|
||||
voidstonePillar2.carverHelper.addVariation("tile.voidstonePillar2.0.desc", 0, "voidstone/animated/pillar");
|
||||
voidstonePillar2.carverHelper.registerAll(voidstonePillar2, "voidstonePillar2");
|
||||
Carving.chisel.registerOre("voidstonePillar2", "voidstonePillar2");
|
||||
@@ -2998,4 +3041,4 @@ public enum Features {
|
||||
name = name.substring(name.indexOf(':') + 1) + "_top";
|
||||
GameRegistry.registerBlock(top, ItemCarvableSlab.class, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.cricketcraft.chisel.api;
|
||||
|
||||
|
||||
/**
|
||||
* Use the enum constants (using {@link #key} or calling {@link #toString()}) in this class as keys for IMC messages sent to chisel
|
||||
* <p>
|
||||
* It is also acceptable to copy the Strings in this class to avoid referencing this API.
|
||||
*/
|
||||
public enum IMC {
|
||||
|
||||
@@ -56,7 +57,7 @@ public enum IMC {
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String CHISEL_MODID = "chisel";
|
||||
|
||||
|
||||
public static final String getModid() {
|
||||
return ChiselAPIProps.MOD_ID;
|
||||
}
|
||||
|
||||
@@ -173,10 +173,10 @@ public class CarvableHelper {
|
||||
|
||||
public void registerAll(Block block, String name, Class<? extends ItemBlock> cl) {
|
||||
registerBlock(block, name, cl);
|
||||
registerVariations(name, block);
|
||||
registerVariations(name);
|
||||
}
|
||||
|
||||
public void registerVariations(String name, Block block) {
|
||||
public void registerVariations(String name) {
|
||||
for (IVariationInfo info : infoList) {
|
||||
registerVariation(name, info);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
|
||||
private static double u, v, xDiff, yDiff, zDiff, uDiff, vDiff;
|
||||
|
||||
void render(RenderBlocksCTM inst, ForgeDirection normal, int cacheID) {
|
||||
@@ -66,7 +66,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
}
|
||||
u = cacheID == 1 || cacheID == 2 ? inst.maxU : inst.minU;
|
||||
v = cacheID < 2 ? inst.maxV : inst.minV;
|
||||
|
||||
|
||||
uDiff = inst.maxU - inst.minU;
|
||||
vDiff = inst.maxV - inst.minV;
|
||||
|
||||
@@ -163,7 +163,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
renderMaxX = renderMaxY = renderMaxZ = 1;
|
||||
}
|
||||
|
||||
protected Tessellator tessellator;
|
||||
protected Tessellator tessellator = Tessellator.instance;
|
||||
protected double minU, maxU;
|
||||
protected double minV, maxV;
|
||||
protected int[] lightingCache = new int[4];
|
||||
@@ -181,6 +181,8 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
protected float[][] blumap = new float[3][3];
|
||||
|
||||
protected int bx, by, bz;
|
||||
|
||||
private boolean inWorld = false;
|
||||
|
||||
@Override
|
||||
public boolean renderStandardBlock(Block block, int x, int y, int z) {
|
||||
@@ -188,13 +190,11 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
by = y;
|
||||
bz = z;
|
||||
|
||||
tessellator = Tessellator.instance;
|
||||
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
|
||||
tessellator.addTranslation(x, y, z);
|
||||
|
||||
inWorld = true;
|
||||
boolean res = super.renderStandardBlock(block, x, y, z);
|
||||
|
||||
inWorld = false;
|
||||
tessellator.addTranslation(-x, -y, -z);
|
||||
|
||||
return res;
|
||||
@@ -289,8 +289,8 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
| ((blueBitChannel / lightVals.length) & 0xF0000) | ((sunlightBitChannel / lightVals.length) & 0xF00000);
|
||||
}
|
||||
|
||||
protected void side(SubSide side, int iconIndex) {
|
||||
|
||||
protected void side(Block block, SubSide side, int iconIndex) {
|
||||
|
||||
IIcon icon;
|
||||
TextureSubmap map;
|
||||
if (iconIndex >= 16) {
|
||||
@@ -299,9 +299,14 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
} else {
|
||||
map = submap;
|
||||
}
|
||||
int x = iconIndex % map.getWidth();
|
||||
int y = iconIndex / map.getHeight();
|
||||
icon = map.getSubIcon(x, y);
|
||||
|
||||
if (map == null) {
|
||||
icon = getBlockIconFromSide(block, side.normal.ordinal());
|
||||
} else {
|
||||
int x = iconIndex % map.getWidth();
|
||||
int y = iconIndex / map.getHeight();
|
||||
icon = map.getSubIcon(x, y);
|
||||
}
|
||||
|
||||
double umax = icon.getMaxU();
|
||||
double umin = icon.getMinU();
|
||||
@@ -328,8 +333,8 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
|
||||
@Override
|
||||
public void renderFaceXNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
if (rendererOld != null && rendererOld.hasOverrideBlockTexture()) {
|
||||
IIcon i = rendererOld.overrideBlockTexture;
|
||||
if (!inWorld || (rendererOld != null && rendererOld.hasOverrideBlockTexture())) {
|
||||
IIcon i = rendererOld.hasOverrideBlockTexture() ? rendererOld.overrideBlockTexture : icon;
|
||||
|
||||
tessellator.addVertexWithUV(renderMinX, renderMaxY, renderMinZ, i.getMinU(), i.getMinV());
|
||||
tessellator.addVertexWithUV(renderMinX, renderMinY, renderMinZ, i.getMinU(), i.getMaxV());
|
||||
@@ -346,22 +351,22 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
fillColormap(colorBlueBottomRight, colorBlueTopRight, colorBlueTopLeft, colorBlueBottomLeft, blumap);
|
||||
|
||||
getLight(0, 0);
|
||||
side(XNEG_LB, tex[0]);
|
||||
side(block, XNEG_LB, tex[0]);
|
||||
getLight(1, 0);
|
||||
side(XNEG_RB, tex[1]);
|
||||
side(block, XNEG_RB, tex[1]);
|
||||
getLight(1, 1);
|
||||
side(XNEG_RT, tex[2]);
|
||||
side(block, XNEG_RT, tex[2]);
|
||||
getLight(0, 1);
|
||||
side(XNEG_LT, tex[3]);
|
||||
|
||||
side(block, XNEG_LT, tex[3]);
|
||||
|
||||
post(ForgeDirection.WEST);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceXPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
if (rendererOld != null && rendererOld.hasOverrideBlockTexture()) {
|
||||
IIcon i = rendererOld.overrideBlockTexture;
|
||||
if (!inWorld || (rendererOld != null && rendererOld.hasOverrideBlockTexture())) {
|
||||
IIcon i = rendererOld.hasOverrideBlockTexture() ? rendererOld.overrideBlockTexture : icon;
|
||||
|
||||
tessellator.addVertexWithUV(renderMaxX, renderMaxY, renderMaxZ, i.getMaxU(), i.getMinV());
|
||||
tessellator.addVertexWithUV(renderMaxX, renderMinY, renderMaxZ, i.getMaxU(), i.getMaxV());
|
||||
@@ -376,24 +381,24 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
fillColormap(colorRedTopLeft, colorRedBottomLeft, colorRedBottomRight, colorRedTopRight, redmap);
|
||||
fillColormap(colorGreenTopLeft, colorGreenBottomLeft, colorGreenBottomRight, colorGreenTopRight, grnmap);
|
||||
fillColormap(colorBlueTopLeft, colorBlueBottomLeft, colorBlueBottomRight, colorBlueTopRight, blumap);
|
||||
|
||||
|
||||
getLight(0, 0);
|
||||
side(XPOS_LB, tex[0]);
|
||||
side(block, XPOS_LB, tex[0]);
|
||||
getLight(1, 0);
|
||||
side(XPOS_RB, tex[1]);
|
||||
side(block, XPOS_RB, tex[1]);
|
||||
getLight(1, 1);
|
||||
side(XPOS_RT, tex[2]);
|
||||
side(block, XPOS_RT, tex[2]);
|
||||
getLight(0, 1);
|
||||
side(XPOS_LT, tex[3]);
|
||||
|
||||
side(block, XPOS_LT, tex[3]);
|
||||
|
||||
post(ForgeDirection.EAST);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
if (rendererOld != null && rendererOld.hasOverrideBlockTexture()) {
|
||||
IIcon i = rendererOld.overrideBlockTexture;
|
||||
if (!inWorld || (rendererOld != null && rendererOld.hasOverrideBlockTexture())) {
|
||||
IIcon i = rendererOld.hasOverrideBlockTexture() ? rendererOld.overrideBlockTexture : icon;
|
||||
|
||||
tessellator.addVertexWithUV(renderMaxX, renderMaxY, renderMinZ, i.getMaxU(), i.getMinV());
|
||||
tessellator.addVertexWithUV(renderMaxX, renderMinY, renderMinZ, i.getMaxU(), i.getMaxV());
|
||||
@@ -408,24 +413,24 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
fillColormap(colorRedBottomRight, colorRedTopRight, colorRedTopLeft, colorRedBottomLeft, redmap);
|
||||
fillColormap(colorGreenBottomRight, colorGreenTopRight, colorGreenTopLeft, colorGreenBottomLeft, grnmap);
|
||||
fillColormap(colorBlueBottomRight, colorBlueTopRight, colorBlueTopLeft, colorBlueBottomLeft, blumap);
|
||||
|
||||
|
||||
getLight(0, 0);
|
||||
side(ZNEG_LB, tex[0]);
|
||||
side(block, ZNEG_LB, tex[0]);
|
||||
getLight(1, 0);
|
||||
side(ZNEG_RB, tex[1]);
|
||||
side(block, ZNEG_RB, tex[1]);
|
||||
getLight(1, 1);
|
||||
side(ZNEG_RT, tex[2]);
|
||||
side(block, ZNEG_RT, tex[2]);
|
||||
getLight(0, 1);
|
||||
side(ZNEG_LT, tex[3]);
|
||||
|
||||
side(block, ZNEG_LT, tex[3]);
|
||||
|
||||
post(ForgeDirection.NORTH);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
if (rendererOld != null && rendererOld.hasOverrideBlockTexture()) {
|
||||
IIcon i = rendererOld.overrideBlockTexture;
|
||||
if (!inWorld || (rendererOld != null && rendererOld.hasOverrideBlockTexture())) {
|
||||
IIcon i = rendererOld.hasOverrideBlockTexture() ? rendererOld.overrideBlockTexture : icon;
|
||||
|
||||
tessellator.addVertexWithUV(renderMinX, renderMaxY, renderMaxZ, i.getMinU(), i.getMinV());
|
||||
tessellator.addVertexWithUV(renderMinX, renderMinY, renderMaxZ, i.getMinU(), i.getMaxV());
|
||||
@@ -440,24 +445,24 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
fillColormap(colorRedBottomLeft, colorRedBottomRight, colorRedTopRight, colorRedTopLeft, redmap);
|
||||
fillColormap(colorGreenBottomLeft, colorGreenBottomRight, colorGreenTopRight, colorGreenTopLeft, grnmap);
|
||||
fillColormap(colorBlueBottomLeft, colorBlueBottomRight, colorBlueTopRight, colorBlueTopLeft, blumap);
|
||||
|
||||
|
||||
getLight(0, 0);
|
||||
side(ZPOS_LB, tex[0]);
|
||||
side(block, ZPOS_LB, tex[0]);
|
||||
getLight(1, 0);
|
||||
side(ZPOS_RB, tex[1]);
|
||||
side(block, ZPOS_RB, tex[1]);
|
||||
getLight(1, 1);
|
||||
side(ZPOS_RT, tex[2]);
|
||||
side(block, ZPOS_RT, tex[2]);
|
||||
getLight(0, 1);
|
||||
side(ZPOS_LT, tex[3]);
|
||||
|
||||
side(block, ZPOS_LT, tex[3]);
|
||||
|
||||
post(ForgeDirection.SOUTH);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
if (rendererOld != null && rendererOld.hasOverrideBlockTexture()) {
|
||||
IIcon i = rendererOld.overrideBlockTexture;
|
||||
if (!inWorld || (rendererOld != null && rendererOld.hasOverrideBlockTexture())) {
|
||||
IIcon i = rendererOld.hasOverrideBlockTexture() ? rendererOld.overrideBlockTexture : icon;
|
||||
|
||||
tessellator.addVertexWithUV(renderMinX, renderMinY, renderMaxZ, i.getMinU(), i.getMaxV());
|
||||
tessellator.addVertexWithUV(renderMinX, renderMinY, renderMinZ, i.getMinU(), i.getMinV());
|
||||
@@ -472,24 +477,24 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
fillColormap(colorRedBottomLeft, colorRedBottomRight, colorRedTopRight, colorRedTopLeft, redmap);
|
||||
fillColormap(colorGreenBottomLeft, colorGreenBottomRight, colorGreenTopRight, colorGreenTopLeft, grnmap);
|
||||
fillColormap(colorBlueBottomLeft, colorBlueBottomRight, colorBlueTopRight, colorBlueTopLeft, blumap);
|
||||
|
||||
|
||||
getLight(0, 0);
|
||||
side(YNEG_LB, tex[0]);
|
||||
side(block, YNEG_LB, tex[0]);
|
||||
getLight(1, 0);
|
||||
side(YNEG_RB, tex[1]);
|
||||
side(block, YNEG_RB, tex[1]);
|
||||
getLight(1, 1);
|
||||
side(YNEG_RT, tex[2]);
|
||||
side(block, YNEG_RT, tex[2]);
|
||||
getLight(0, 1);
|
||||
side(YNEG_LT, tex[3]);
|
||||
|
||||
side(block, YNEG_LT, tex[3]);
|
||||
|
||||
post(ForgeDirection.DOWN);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
if (rendererOld != null && rendererOld.hasOverrideBlockTexture()) {
|
||||
IIcon i = rendererOld.overrideBlockTexture;
|
||||
if (!inWorld || (rendererOld != null && rendererOld.hasOverrideBlockTexture())) {
|
||||
IIcon i = rendererOld.hasOverrideBlockTexture() ? rendererOld.overrideBlockTexture : icon;
|
||||
|
||||
tessellator.addVertexWithUV(renderMinX, renderMaxY, renderMinZ, i.getMinU(), i.getMinV());
|
||||
tessellator.addVertexWithUV(renderMinX, renderMaxY, renderMaxZ, i.getMinU(), i.getMaxV());
|
||||
@@ -504,16 +509,16 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
fillColormap(colorRedTopRight, colorRedTopLeft, colorRedBottomLeft, colorRedBottomRight, redmap);
|
||||
fillColormap(colorGreenTopRight, colorGreenTopLeft, colorGreenBottomLeft, colorGreenBottomRight, grnmap);
|
||||
fillColormap(colorBlueTopRight, colorBlueTopLeft, colorBlueBottomLeft, colorBlueBottomRight, blumap);
|
||||
|
||||
|
||||
getLight(0, 0);
|
||||
side(YPOS_LB, tex[0]);
|
||||
side(block, YPOS_LB, tex[0]);
|
||||
getLight(1, 0);
|
||||
side(YPOS_RB, tex[1]);
|
||||
side(block, YPOS_RB, tex[1]);
|
||||
getLight(1, 1);
|
||||
side(YPOS_RT, tex[2]);
|
||||
side(block, YPOS_RT, tex[2]);
|
||||
getLight(0, 1);
|
||||
side(YPOS_LT, tex[3]);
|
||||
|
||||
side(block, YPOS_LT, tex[3]);
|
||||
|
||||
post(ForgeDirection.UP);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,32 +124,35 @@ public class RenderBlocksColumn extends RenderBlocks {
|
||||
|
||||
@Override
|
||||
public void renderFaceXNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceXNeg(block, x, y, z, sides[4]);
|
||||
super.renderFaceXNeg(block, x, y, z, getIcon(icon, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceXPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceXPos(block, x, y, z, sides[5]);
|
||||
super.renderFaceXPos(block, x, y, z, getIcon(icon, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceZNeg(block, x, y, z, sides[2]);
|
||||
super.renderFaceZNeg(block, x, y, z, getIcon(icon, 2));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceZPos(block, x, y, z, sides[3]);
|
||||
super.renderFaceZPos(block, x, y, z, getIcon(icon, 3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceYNeg(block, x, y, z, sides[0]);
|
||||
super.renderFaceYNeg(block, x, y, z, getIcon(icon, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceYPos(block, x, y, z, sides[1]);
|
||||
super.renderFaceYPos(block, x, y, z, getIcon(icon, 1));
|
||||
}
|
||||
|
||||
}
|
||||
private IIcon getIcon(IIcon defaultIcon, int side) {
|
||||
return sides[side] == null ? defaultIcon : sides[side];
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,7 @@ public enum TextureType {
|
||||
}
|
||||
},
|
||||
CTMV("ctmv", "top"){
|
||||
|
||||
@Override
|
||||
protected Object registerIcons(ICarvingVariation variation, String modName, String texturePath, IIconRegister register) {
|
||||
return Pair.of(new TextureSubmap(register.registerIcon(modName + ":" + texturePath + "-ctmv"), 2, 2), register.registerIcon(modName + ":" + texturePath + "-top"));
|
||||
@@ -95,15 +96,15 @@ public enum TextureType {
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected RenderBlocks createRenderContext(RenderBlocks rendererOld, IBlockAccess world, Object cachedObject) {
|
||||
RenderBlocksColumn ret = theRenderBlocksColumn;
|
||||
Pair<IIcon, TextureSubmap> data = (Pair<IIcon, TextureSubmap>) cachedObject;
|
||||
Pair<TextureSubmap, IIcon> data = (Pair<TextureSubmap, IIcon>) cachedObject;
|
||||
|
||||
ret.blockAccess = world;
|
||||
ret.renderMaxX = 1.0;
|
||||
ret.renderMaxY = 1.0;
|
||||
ret.renderMaxZ = 1.0;
|
||||
|
||||
ret.submap = data.getRight();
|
||||
ret.iconTop = data.getLeft();
|
||||
ret.submap = data.getLeft();
|
||||
ret.iconTop = data.getRight();
|
||||
return ret;
|
||||
}
|
||||
},
|
||||
@@ -128,7 +129,7 @@ public enum TextureType {
|
||||
|
||||
boolean p;
|
||||
boolean n;
|
||||
boolean reverse = side == 2 || side == 5;
|
||||
boolean reverse = side == 3 || side == 4;
|
||||
|
||||
if (side < 4) {
|
||||
p = ctm.isConnected(world, x - 1, y, z, side, block, meta);
|
||||
@@ -142,7 +143,7 @@ public enum TextureType {
|
||||
if (p && n)
|
||||
return map.getSubIcon(1, 0);
|
||||
else if (p)
|
||||
return map.getSubIcon(reverse ? 0 : 1, 1);
|
||||
return map.getSubIcon(reverse ? 1 : 0, 1);
|
||||
else if (n)
|
||||
return map.getSubIcon(reverse ? 0 : 1, 1);
|
||||
return map.getSubIcon(0, 0);
|
||||
@@ -161,45 +162,13 @@ public enum TextureType {
|
||||
|
||||
@Override
|
||||
protected IIcon getIcon(ICarvingVariation variation, Object cachedObject, IBlockAccess world, int x, int y, int z, int side, int meta) {
|
||||
int variationSize = (this == TextureType.V9) ? 3 : 2;
|
||||
TextureSubmap map = (TextureSubmap) cachedObject;
|
||||
|
||||
int xModulus = x % variationSize;
|
||||
int zModulus = z % variationSize;
|
||||
//This ensures that blocks placed near 0,0 or it's axis' do not misbehave
|
||||
int textureX = (xModulus < 0) ? (xModulus + variationSize) : xModulus;
|
||||
int textureZ = (zModulus < 0) ? (zModulus + variationSize) : zModulus;
|
||||
//Always invert the y index
|
||||
int textureY = (variationSize - (y % variationSize) - 1);
|
||||
|
||||
if (side == 2 || side == 5) {
|
||||
//For WEST, SOUTH reverse the indexes for both X and Z
|
||||
textureX = (variationSize - textureX - 1);
|
||||
textureZ = (variationSize - textureZ - 1);
|
||||
} /*else if (side == 0) {
|
||||
//For DOWN, reverse the indexes for only Z
|
||||
textureZ = (variationSize - textureZ - 1);
|
||||
}*/
|
||||
|
||||
int index;
|
||||
if (side == 0 || side == 1) {
|
||||
// DOWN || UP
|
||||
index = textureX + textureZ * variationSize;
|
||||
} else if (side == 2 || side == 3) {
|
||||
// NORTH || SOUTH
|
||||
index = textureX + textureY * variationSize;
|
||||
} else {
|
||||
// WEST || EAST
|
||||
index = textureZ + textureY * variationSize;
|
||||
}
|
||||
|
||||
return map.getSubIcon(index % variationSize, index / variationSize);
|
||||
return getVIcon(this, (TextureSubmap) cachedObject, x, y, z, side);
|
||||
}
|
||||
},
|
||||
V4("v4"){
|
||||
@Override
|
||||
protected Object registerIcons(ICarvingVariation variation, String modName, String texturePath, IIconRegister register) {
|
||||
return new TextureSubmap(register.registerIcon(modName + ":" + texturePath + "-v4"), 3, 3);
|
||||
return new TextureSubmap(register.registerIcon(modName + ":" + texturePath + "-v4"), 2, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -209,7 +178,7 @@ public enum TextureType {
|
||||
|
||||
@Override
|
||||
protected IIcon getIcon(ICarvingVariation variation, Object cachedObject, IBlockAccess world, int x, int y, int z, int side, int meta) {
|
||||
return V9.getIcon(variation, cachedObject, world, x, y, z, side, meta);
|
||||
return getVIcon(this, (TextureSubmap) cachedObject, x, y, z, side);
|
||||
}
|
||||
},
|
||||
CTMX("", "ctm"){
|
||||
@@ -252,6 +221,11 @@ public enum TextureType {
|
||||
protected IIcon getIcon(ICarvingVariation variation, Object cachedObject, int side, int meta) {
|
||||
return V9.getIcon(variation, cachedObject, side, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IIcon getIcon(ICarvingVariation variation, Object cachedObject, IBlockAccess world, int x, int y, int z, int side, int meta) {
|
||||
return getRIcon(this, (TextureSubmap) cachedObject, x, y, z, side);
|
||||
}
|
||||
},
|
||||
R9("r9"){
|
||||
@Override
|
||||
@@ -266,7 +240,7 @@ public enum TextureType {
|
||||
|
||||
@Override
|
||||
protected IIcon getIcon(ICarvingVariation variation, Object cachedObject, IBlockAccess world, int x, int y, int z, int side, int meta) {
|
||||
return R4.getIcon(variation, cachedObject, side, meta);
|
||||
return getRIcon(this, (TextureSubmap) cachedObject, x, y, z, side);
|
||||
}
|
||||
},
|
||||
R4("r4"){
|
||||
@@ -283,15 +257,65 @@ public enum TextureType {
|
||||
|
||||
@Override
|
||||
protected IIcon getIcon(ICarvingVariation variation, Object cachedObject, IBlockAccess world, int x, int y, int z, int side, int meta) {
|
||||
rand.setSeed(x + y + z + side);
|
||||
rand.nextBoolean();
|
||||
int size = this == TextureType.R4 ? 2 : 3;
|
||||
return ((TextureSubmap)cachedObject).getSubIcon(rand.nextInt(size), rand.nextInt(size));
|
||||
return getRIcon(this, (TextureSubmap) cachedObject, x, y, z, side);
|
||||
}
|
||||
},
|
||||
NORMAL,
|
||||
CUSTOM;
|
||||
|
||||
/* Some util stuff for shared code between v* and r* */
|
||||
|
||||
public static IIcon getVIcon(TextureType type, TextureSubmap map, int x, int y, int z, int side) {
|
||||
int variationSize = (type == TextureType.V9) ? 3 : 2;
|
||||
|
||||
int xModulus = x % variationSize;
|
||||
int zModulus = z % variationSize;
|
||||
//This ensures that blocks placed near 0,0 or it's axis' do not misbehave
|
||||
int textureX = (xModulus < 0) ? (xModulus + variationSize) : xModulus;
|
||||
int textureZ = (zModulus < 0) ? (zModulus + variationSize) : zModulus;
|
||||
//Always invert the y index
|
||||
int textureY = (variationSize - (y % variationSize) - 1);
|
||||
|
||||
if (side == 2 || side == 5) {
|
||||
//For WEST, SOUTH reverse the indexes for both X and Z
|
||||
textureX = (variationSize - textureX - 1);
|
||||
textureZ = (variationSize - textureZ - 1);
|
||||
} /*else if (side == 0) {
|
||||
//For DOWN, reverse the indexes for only Z
|
||||
textureZ = (variationSize - textureZ - 1);
|
||||
}*/
|
||||
|
||||
int index;
|
||||
if (side == 0 || side == 1) {
|
||||
// DOWN || UP
|
||||
index = textureX + textureZ * variationSize;
|
||||
} else if (side == 2 || side == 3) {
|
||||
// NORTH || SOUTH
|
||||
index = textureX + textureY * variationSize;
|
||||
} else {
|
||||
// WEST || EAST
|
||||
index = textureZ + textureY * variationSize;
|
||||
}
|
||||
|
||||
return map.getSubIcon(index % variationSize, index / variationSize);
|
||||
}
|
||||
|
||||
public static IIcon getRIcon(TextureType type, TextureSubmap map, int x, int y, int z, int side) {
|
||||
rand.setSeed(getCoordinateRandom(x, y, z));
|
||||
rand.nextBoolean();
|
||||
int size = type == TextureType.R4 ? 2 : type == TextureType.R9 ? 3 : 4;
|
||||
return map.getSubIcon(rand.nextInt(size), rand.nextInt(size));
|
||||
}
|
||||
|
||||
private static long getCoordinateRandom(int x, int y, int z) {
|
||||
// MC 1.8 code...
|
||||
long l = (x * 3129871) ^ z * 116129781L ^ y;
|
||||
l = l * l * 42317861L + l * 11L;
|
||||
return l;
|
||||
}
|
||||
|
||||
/* End of that mess */
|
||||
|
||||
private static final TextureType[] VALUES;
|
||||
private static final CTM ctm = CTM.getInstance();
|
||||
private static final Random rand = new Random();
|
||||
@@ -341,7 +365,7 @@ public enum TextureType {
|
||||
protected RenderBlocks createRenderContext(RenderBlocks rendererOld, IBlockAccess world, Object cachedObject) {
|
||||
return rendererOld;
|
||||
}
|
||||
|
||||
|
||||
public static TextureType getTypeFor(CarvableHelper inst, String modid, String path) {
|
||||
if (path == null) {
|
||||
return CUSTOM;
|
||||
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.world.World;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
public class BlockCarvableIce extends BlockIce implements ICarvable {
|
||||
|
||||
@@ -26,6 +27,11 @@ public class BlockCarvableIce extends BlockIce implements ICarvable {
|
||||
super();
|
||||
carverHelper = new CarvableHelper(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return ClientUtils.renderCTMId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCarvableIcePillar extends BlockCarvablePillar {
|
||||
|
||||
public BlockCarvableIcePillar(Material m) {
|
||||
super(m);
|
||||
this.slipperiness = 0.98F;
|
||||
this.setTickRandomly(true);
|
||||
setStained(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_)
|
||||
{
|
||||
Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
|
||||
return block == this ? false : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the block and l is the block's subtype/damage.
|
||||
*/
|
||||
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
|
||||
{
|
||||
p_149636_2_.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
|
||||
p_149636_2_.addExhaustion(0.025F);
|
||||
|
||||
if (this.canSilkHarvest(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_) && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
|
||||
{
|
||||
ArrayList<ItemStack> items = new ArrayList<ItemStack>();
|
||||
ItemStack itemstack = this.createStackedBlock(p_149636_6_);
|
||||
|
||||
if (itemstack != null)
|
||||
items.add(itemstack);
|
||||
|
||||
ForgeEventFactory.fireBlockHarvesting(items, p_149636_1_, this, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, 0, 1.0f, true, p_149636_2_);
|
||||
for (ItemStack is : items)
|
||||
this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, is);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_149636_1_.provider.isHellWorld)
|
||||
{
|
||||
p_149636_1_.setBlockToAir(p_149636_3_, p_149636_4_, p_149636_5_);
|
||||
return;
|
||||
}
|
||||
|
||||
int i1 = EnchantmentHelper.getFortuneModifier(p_149636_2_);
|
||||
harvesters.set(p_149636_2_);
|
||||
this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, i1);
|
||||
harvesters.set(null);
|
||||
Material material = p_149636_1_.getBlock(p_149636_3_, p_149636_4_ - 1, p_149636_5_).getMaterial();
|
||||
|
||||
if (material.blocksMovement() || material.isLiquid())
|
||||
{
|
||||
p_149636_1_.setBlock(p_149636_3_, p_149636_4_, p_149636_5_, Blocks.flowing_water);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the quantity of items to drop on block destruction.
|
||||
*/
|
||||
public int quantityDropped(Random p_149745_1_)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
if (p_149674_1_.getSavedLightValue(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11 - this.getLightOpacity())
|
||||
{
|
||||
if (p_149674_1_.provider.isHellWorld)
|
||||
{
|
||||
p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
return;
|
||||
}
|
||||
|
||||
this.dropBlockAsItem(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_), 0);
|
||||
p_149674_1_.setBlock(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.water);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons
|
||||
*/
|
||||
public int getMobilityFlag()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
@@ -18,6 +19,7 @@ import net.minecraft.world.World;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
public class BlockCarvablePackedIce extends Block implements ICarvable {
|
||||
|
||||
@@ -26,8 +28,14 @@ public class BlockCarvablePackedIce extends Block implements ICarvable {
|
||||
public BlockCarvablePackedIce() {
|
||||
super(Material.ice);
|
||||
carverHelper = new CarvableHelper(this);
|
||||
this.slipperiness = Blocks.packed_ice.slipperiness;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return ClientUtils.renderCTMId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return carverHelper.getIcon(side, metadata);
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockCarvablePackedIcePillar extends BlockCarvablePillar {
|
||||
|
||||
public BlockCarvablePackedIcePillar(Material m) {
|
||||
super(m);
|
||||
this.slipperiness = 0.98F;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.client.render.RendererPillar;
|
||||
|
||||
public class BlockCarvablePillar extends BlockCarvable {
|
||||
|
||||
public IIcon sides[] = new IIcon[6];
|
||||
|
||||
public BlockCarvablePillar(Material m) {
|
||||
super(m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return RendererPillar.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return sides[side];
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return sides[side];
|
||||
}
|
||||
|
||||
public IIcon getCtmIcon(int index, int metadata) {
|
||||
// Workaround to prevent crash with invalid meta
|
||||
IVariationInfo var = null;
|
||||
if (metadata <= carverHelper.infoList.size())
|
||||
var = carverHelper.infoList.get(metadata);
|
||||
else
|
||||
var = carverHelper.infoList.get(0);
|
||||
return var.getSubmapManager().getIcon(0, metadata);
|
||||
|
||||
// TODO fix pillars
|
||||
// if (index >= 4)
|
||||
// return var.iconTop;
|
||||
// if (var.seamsCtmVert == null)
|
||||
// return var.icon;
|
||||
// return var.seamsCtmVert.getSubIcon(index % 2, index / 2);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BlockLeaf extends BlockCarvable {
|
||||
|
||||
@@ -10,6 +11,6 @@ public class BlockLeaf extends BlockCarvable {
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
return Blocks.leaves.isOpaqueCube();
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
|
||||
public class GuiEdit extends GuiElement {
|
||||
|
||||
GuiTextField field;
|
||||
String tempString = "";
|
||||
|
||||
public GuiEdit(int x, int y, int w, int h) {
|
||||
super(x, y, w, h);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdded() {
|
||||
field = new GuiTextField(gui.fontRendererObj(), x, y, w, h);
|
||||
setText(tempString);
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
if (field == null) {
|
||||
return tempString;
|
||||
} else {
|
||||
return field.getText();
|
||||
}
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
if (field == null) {
|
||||
tempString = text;
|
||||
} else {
|
||||
field.setText(text);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
field.drawTextBox();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseDown(InputMouseEvent ev) {
|
||||
field.mouseClicked(ev.x, ev.y, ev.button);
|
||||
|
||||
if (isMouseOver(ev)) {
|
||||
ev.handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyPressed(InputKeyboardEvent ev) {
|
||||
field.textboxKeyTyped(ev.character, ev.key);
|
||||
|
||||
if (field.isFocused()) {
|
||||
ev.handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiElement {
|
||||
|
||||
public int x;
|
||||
public int y;
|
||||
public int w;
|
||||
public int h;
|
||||
|
||||
public GuiScreenPlus gui;
|
||||
public GuiElement parent, addedParent;
|
||||
private ArrayList<GuiElement> children = null;
|
||||
|
||||
public GuiElement(int x, int y, int w, int h) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.w = w;
|
||||
this.h = h;
|
||||
}
|
||||
|
||||
public GuiElement addChild(GuiElement e) {
|
||||
if (children == null) {
|
||||
children = new ArrayList<GuiElement>();
|
||||
}
|
||||
|
||||
if (e.parent != null) {
|
||||
e.parent.removeChild(e);
|
||||
}
|
||||
|
||||
children.add(e);
|
||||
e.x += x;
|
||||
e.y += y;
|
||||
e.parent = this;
|
||||
e.gui = gui;
|
||||
return e;
|
||||
}
|
||||
|
||||
public GuiElement removeChild(GuiElement e) {
|
||||
if (children == null) {
|
||||
return e;
|
||||
}
|
||||
|
||||
children.remove(e);
|
||||
e.x -= x;
|
||||
e.y -= y;
|
||||
e.parent = null;
|
||||
e.gui = null;
|
||||
return e;
|
||||
}
|
||||
|
||||
public void onAdded() {
|
||||
if (children == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (GuiElement e : children) {
|
||||
if (e.parent != e.addedParent) {
|
||||
e.onAdded();
|
||||
}
|
||||
|
||||
e.addedParent = e.parent;
|
||||
}
|
||||
}
|
||||
|
||||
boolean isMouseOver(InputMouseEvent ev) {
|
||||
return ev.x >= x && ev.x < x + w && ev.y >= y && ev.y < y + h;
|
||||
}
|
||||
|
||||
public void mouseDown(InputMouseEvent ev) {
|
||||
if (children == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (GuiElement e : children) {
|
||||
e.mouseDown(ev);
|
||||
|
||||
if (ev.handled) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void mouseUp(InputMouseEvent ev) {
|
||||
if (children == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (GuiElement e : children) {
|
||||
e.mouseUp(ev);
|
||||
|
||||
if (ev.handled) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void mouseMove(InputMouseEvent ev) {
|
||||
if (children == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (GuiElement e : children) {
|
||||
e.mouseMove(ev);
|
||||
|
||||
if (ev.handled) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void mouseWheel(InputMouseEvent ev) {
|
||||
if (children == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (GuiElement e : children) {
|
||||
e.mouseWheel(ev);
|
||||
|
||||
if (ev.handled) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void render() {
|
||||
if (children == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (GuiElement e : children) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
e.render();
|
||||
}
|
||||
}
|
||||
|
||||
public void keyPressed(InputKeyboardEvent ev) {
|
||||
if (children == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (GuiElement e : children) {
|
||||
e.keyPressed(ev);
|
||||
|
||||
if (ev.handled) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
public class GuiExButton extends GuiElement {
|
||||
|
||||
protected String caption;
|
||||
|
||||
int u, v, texw, texh;
|
||||
int borderTop, borderRight, borderBottom, borderLeft;
|
||||
|
||||
boolean over;
|
||||
public boolean disabled;
|
||||
|
||||
public TexturedBox boxDisabled;
|
||||
public TexturedBox boxNormal;
|
||||
public TexturedBox boxOver;
|
||||
|
||||
public GuiExButton(int x, int y, int w, int h, String caption) {
|
||||
this(x, y, w, h, caption, "textures/gui/widgets.png");
|
||||
}
|
||||
|
||||
public GuiExButton(int x, int y, int w, int h, String caption, String texture) {
|
||||
super(x, y, w, h);
|
||||
this.caption = caption;
|
||||
disabled = false;
|
||||
u = 0;
|
||||
v = 46;
|
||||
texw = 200;
|
||||
texh = 20;
|
||||
borderTop = 2;
|
||||
borderRight = 2;
|
||||
borderBottom = 3;
|
||||
borderLeft = 2;
|
||||
|
||||
boxDisabled = new TexturedBox(texture, 0, 46, 200, 20, 2, 2, 3, 2);
|
||||
boxNormal = new TexturedBox(texture, 0, 66, 200, 20, 2, 2, 3, 2);
|
||||
boxOver = new TexturedBox(texture, 0, 86, 200, 20, 2, 2, 3, 2);
|
||||
|
||||
}
|
||||
|
||||
public void onClick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
int color = 0xffe0e0e0;
|
||||
TexturedBox box = boxDisabled;
|
||||
|
||||
if (!disabled && !over) {
|
||||
box = boxNormal;
|
||||
color = 0xffffffff;
|
||||
} else if (!disabled && over) {
|
||||
box = boxOver;
|
||||
color = 0xffffff70;
|
||||
}
|
||||
|
||||
box.render(gui, x, y, w, h);
|
||||
gui.drawCenteredStringWithShadow(caption, x + w / 2, y + h / 2, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseMove(InputMouseEvent ev) {
|
||||
over = isMouseOver(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseDown(InputMouseEvent ev) {
|
||||
if (!isMouseOver(ev)) {
|
||||
return;
|
||||
}
|
||||
|
||||
gui.playSound("random.click", 1.0f, 1.0f);
|
||||
onClick();
|
||||
}
|
||||
}
|
||||
@@ -27,4 +27,4 @@ public class GuiFactory implements IModGuiFactory {
|
||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
public class GuiLabel extends GuiElement {
|
||||
|
||||
String caption;
|
||||
|
||||
public GuiLabel(int x, int y, int w, int h, String caption) {
|
||||
super(x, y, w, h);
|
||||
this.caption = caption;
|
||||
}
|
||||
|
||||
public GuiLabel(int x, int y, String string) {
|
||||
this(x, y, 0, 0, string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
gui.drawString(caption, x, y, 0x404040);
|
||||
}
|
||||
}
|
||||
@@ -1,235 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.utils.DummyContainer;
|
||||
import com.cricketcraft.chisel.utils.GeneralClient;
|
||||
|
||||
public class GuiScreenPlus extends GuiContainer {
|
||||
|
||||
public int screenW;
|
||||
public int screenH;
|
||||
public int screenX;
|
||||
public int screenY;
|
||||
|
||||
public GuiElement root;
|
||||
|
||||
String backgroundTexture;
|
||||
|
||||
public GuiScreenPlus(Container container, int w, int h, String backgroundTexture) {
|
||||
super(container);
|
||||
root = new GuiElement(0, 0, w, h);
|
||||
root.gui = this;
|
||||
this.screenW = w;
|
||||
this.screenH = h;
|
||||
this.backgroundTexture = backgroundTexture;
|
||||
}
|
||||
|
||||
public GuiScreenPlus(int w, int h, String backgroundTexture) {
|
||||
this(new DummyContainer(), w, h, backgroundTexture);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
xSize = screenW;
|
||||
ySize = screenH;
|
||||
super.initGui();
|
||||
screenX = guiLeft;
|
||||
screenY = guiTop;
|
||||
root.onAdded();
|
||||
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleInput() {
|
||||
while (Mouse.next()) {
|
||||
this.handleMouseInput();
|
||||
}
|
||||
|
||||
while (Keyboard.next()) {
|
||||
this.handleKeyboardInput();
|
||||
}
|
||||
}
|
||||
|
||||
InputMouseEvent mouseEvent = new InputMouseEvent();
|
||||
int oldX = -1;
|
||||
int oldY = -1;
|
||||
|
||||
boolean[] downButtons = new boolean[12];
|
||||
|
||||
@Override
|
||||
public void handleMouseInput() {
|
||||
mouseEvent.handled = false;
|
||||
mouseEvent.x = Mouse.getEventX() * width / mc.displayWidth - this.screenX;
|
||||
mouseEvent.y = height - Mouse.getEventY() * height / mc.displayHeight - 1 - this.screenY;
|
||||
|
||||
if (oldX == -1) {
|
||||
oldX = mouseEvent.x;
|
||||
oldY = mouseEvent.y;
|
||||
}
|
||||
|
||||
mouseEvent.dx = mouseEvent.x - oldX;
|
||||
mouseEvent.dy = mouseEvent.y - oldY;
|
||||
oldX = mouseEvent.x;
|
||||
oldY = mouseEvent.y;
|
||||
mouseEvent.down = Mouse.getEventButtonState();
|
||||
mouseEvent.button = Mouse.getEventButton();
|
||||
mouseEvent.wheel = Mouse.getEventDWheel();
|
||||
|
||||
if (mouseEvent.wheel != 0) {
|
||||
if (mouseEvent.wheel < 0) {
|
||||
mouseEvent.wheel = -1;
|
||||
} else {
|
||||
mouseEvent.wheel = 1;
|
||||
}
|
||||
|
||||
root.mouseWheel(mouseEvent);
|
||||
} else if (mouseEvent.button >= 0 && mouseEvent.button < downButtons.length) {
|
||||
if (downButtons[mouseEvent.button] != mouseEvent.down) {
|
||||
downButtons[mouseEvent.button] = mouseEvent.down;
|
||||
|
||||
if (mouseEvent.down) {
|
||||
root.mouseDown(mouseEvent);
|
||||
} else {
|
||||
root.mouseUp(mouseEvent);
|
||||
}
|
||||
} else if (mouseEvent.dx != 0 || mouseEvent.dy != 0) {
|
||||
root.mouseMove(mouseEvent);
|
||||
}
|
||||
} else if (mouseEvent.dx != 0 || mouseEvent.dy != 0) {
|
||||
root.mouseMove(mouseEvent);
|
||||
}
|
||||
|
||||
if (!mouseEvent.handled) {
|
||||
super.handleMouseInput();
|
||||
}
|
||||
}
|
||||
|
||||
InputKeyboardEvent keyboardEvent = new InputKeyboardEvent();
|
||||
|
||||
@Override
|
||||
public void handleKeyboardInput() {
|
||||
keyboardEvent.handled = false;
|
||||
|
||||
if (Keyboard.getEventKeyState()) {
|
||||
keyboardEvent.key = Keyboard.getEventKey();
|
||||
keyboardEvent.character = Keyboard.getEventCharacter();
|
||||
|
||||
switch (keyboardEvent.key) {
|
||||
case 1:
|
||||
break;
|
||||
|
||||
default:
|
||||
root.keyPressed(keyboardEvent);
|
||||
}
|
||||
}
|
||||
|
||||
if (!keyboardEvent.handled) {
|
||||
super.handleKeyboardInput();
|
||||
}
|
||||
}
|
||||
|
||||
public void close() {
|
||||
mc.displayGuiScreen((GuiScreen) null);
|
||||
mc.setIngameFocus();
|
||||
}
|
||||
|
||||
protected void addChild(GuiElement e) {
|
||||
root.addChild(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int bx, int by) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GeneralClient.bind(backgroundTexture);
|
||||
drawTexturedModalRect(screenX, screenY, 0, 0, screenW, screenH);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int fx, int fy) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
root.render();
|
||||
}
|
||||
|
||||
public void drawString(String text, int sx, int sy, int color) {
|
||||
fontRendererObj.drawString(text, sx, sy, color);
|
||||
}
|
||||
|
||||
public void drawCenteredString(String text, int sx, int sy, int color) {
|
||||
fontRendererObj.drawString(text, sx - fontRendererObj.getStringWidth(text) / 2, sy - fontRendererObj.FONT_HEIGHT / 2, color);
|
||||
}
|
||||
|
||||
public void drawStringWithShadow(String text, int sx, int sy, int color) {
|
||||
fontRendererObj.drawStringWithShadow(text, sx, sy, color);
|
||||
}
|
||||
|
||||
public void drawCenteredStringWithShadow(String text, int sx, int sy, int color) {
|
||||
fontRendererObj.drawStringWithShadow(text, sx - fontRendererObj.getStringWidth(text) / 2, sy - fontRendererObj.FONT_HEIGHT / 2, color);
|
||||
}
|
||||
|
||||
public FontRenderer fontRendererObj() {
|
||||
return this.fontRendererObj;
|
||||
}
|
||||
|
||||
protected void drawRect(int gx, int gy, int gw, int gh, int c1, int c2) {
|
||||
drawGradientRect(gx, gy, gx + gw, gy + gh, c1, c2);
|
||||
}
|
||||
|
||||
public void drawTiledRect(int rx, int ry, int rw, int rh, int u, int v, int tw, int th) {
|
||||
if (rw == 0 || rh == 0 || tw == 0 || th == 0)
|
||||
return;
|
||||
|
||||
float pixel = 0.00390625f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
for (int y = 0; y < rh; y += th) {
|
||||
for (int x = 0; x < rw; x += tw) {
|
||||
int qw = tw;
|
||||
|
||||
if (x + qw > rw) {
|
||||
qw = rw - x;
|
||||
}
|
||||
|
||||
int qh = th;
|
||||
|
||||
if (y + qh > rh) {
|
||||
qh = rh - y;
|
||||
}
|
||||
|
||||
double x1 = rx + x;
|
||||
double x2 = rx + x + qw;
|
||||
double y1 = ry + y;
|
||||
double y2 = ry + y + qh;
|
||||
double u1 = pixel * (u);
|
||||
double u2 = pixel * (u + tw);
|
||||
double v1 = pixel * (v);
|
||||
double v2 = pixel * (v + th);
|
||||
tessellator.addVertexWithUV(x1, y2, this.zLevel, u1, v2);
|
||||
tessellator.addVertexWithUV(x2, y2, this.zLevel, u2, v2);
|
||||
tessellator.addVertexWithUV(x2, y1, this.zLevel, u2, v1);
|
||||
tessellator.addVertexWithUV(x1, y1, this.zLevel, u1, v1);
|
||||
}
|
||||
}
|
||||
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
public void bindTexture(String tex) {
|
||||
GeneralClient.bind(tex);
|
||||
}
|
||||
|
||||
public void playSound(String sound, float volume, float pitch) {
|
||||
// TODO
|
||||
// mc.getSoundHandler().playSoundFX(null, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuilScrolledBox extends GuiElement {
|
||||
|
||||
public int offset = 0;
|
||||
int contentHeight = 0;
|
||||
int scrollingStart = -1;
|
||||
|
||||
public GuilScrolledBox(int x, int y, int w, int h) {
|
||||
super(x, y, w, h);
|
||||
}
|
||||
|
||||
int x0, x1;
|
||||
|
||||
protected void overlayBackground(int start, int end, int color, int a1, int a2) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
float f = 32.0F;
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_I(color, a2);
|
||||
tessellator.addVertexWithUV(x0, end, 0.0D, 0.0D, end / f);
|
||||
tessellator.addVertexWithUV(x1, end, 0.0D, gui.width / f, end / f);
|
||||
tessellator.setColorRGBA_I(color, a1);
|
||||
tessellator.addVertexWithUV(x1, start, 0.0D, gui.width / f, start / f);
|
||||
tessellator.addVertexWithUV(x0, start, 0.0D, 0.0D, start / f);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiElement addChild(GuiElement e) {
|
||||
int childBottom = e.y + e.h - 18;
|
||||
if (childBottom > contentHeight)
|
||||
contentHeight = childBottom;
|
||||
|
||||
return super.addChild(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Gui.optionsBackground);
|
||||
x0 = -gui.screenX;
|
||||
x1 = -gui.screenX + gui.width;
|
||||
|
||||
overlayBackground(y, h, 0x202020, 0xff, 0xff);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0f, offset, 0.0f);
|
||||
super.render();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
overlayBackground(y, y + 8, 0x000000, 0xff, 0x00);
|
||||
overlayBackground(h - 8, h, 0x000000, 0x00, 0xff);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Gui.optionsBackground);
|
||||
overlayBackground(-gui.screenY, y, 0x404040, 0xff, 0xff);
|
||||
overlayBackground(h, -gui.screenY + gui.height, 0x404040, 0xff, 0xff);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseMove(InputMouseEvent ev) {
|
||||
if (scrollingStart != -1) {
|
||||
offset = ev.y - scrollingStart;
|
||||
if (offset > contentHeight)
|
||||
offset = contentHeight;
|
||||
if (offset < -contentHeight)
|
||||
offset = -contentHeight;
|
||||
}
|
||||
|
||||
ev.y -= offset;
|
||||
super.mouseMove(ev);
|
||||
ev.y += offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseDown(InputMouseEvent ev) {
|
||||
scrollingStart = ev.y - offset;
|
||||
|
||||
if (ev.y >= y && ev.y < y + h) {
|
||||
ev.y -= offset;
|
||||
super.mouseDown(ev);
|
||||
ev.y += offset;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseUp(InputMouseEvent ev) {
|
||||
scrollingStart = -1;
|
||||
|
||||
if (ev.y >= y && ev.y < y + h) {
|
||||
ev.y -= offset;
|
||||
super.mouseUp(ev);
|
||||
ev.y += offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
public class InputEvent {
|
||||
|
||||
public boolean handled;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
public class InputKeyboardEvent extends InputEvent {
|
||||
|
||||
public int key;
|
||||
public char character;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
public class InputMouseEvent extends InputEvent {
|
||||
|
||||
public int x;
|
||||
public int y;
|
||||
public int dx;
|
||||
public int dy;
|
||||
public int wheel;
|
||||
public int button;
|
||||
public boolean down;
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import com.cricketcraft.chisel.utils.GeneralClient;
|
||||
|
||||
public abstract class Scrollbar extends GuiButton {
|
||||
|
||||
public boolean active;
|
||||
|
||||
public float offset;
|
||||
public float step;
|
||||
|
||||
boolean dragged;
|
||||
|
||||
int elementHeight = 15;
|
||||
|
||||
public Scrollbar(int id, int x, int y, int w, int h, String string) {
|
||||
super(id, x, y, w, h, string);
|
||||
offset = 0;
|
||||
step = 0.025f;
|
||||
height = h;
|
||||
active = true;
|
||||
dragged = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the mouse has been pressed on this control. Equivalent of MouseListener.mousePressed(MouseEvent e).
|
||||
*/
|
||||
@Override
|
||||
public boolean mousePressed(Minecraft mc, int x, int y) {
|
||||
if (x < xPosition || x >= xPosition + width) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (y < yPosition || y >= yPosition + height) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (active) {
|
||||
dragged = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws this button to the screen.
|
||||
*/
|
||||
@Override
|
||||
public void drawButton(Minecraft mc, int x, int y) {
|
||||
if (dragged) {
|
||||
float initialOffset = offset;
|
||||
int off = y - yPosition - elementHeight / 2;
|
||||
offset = 1.0f * off / (height - elementHeight);
|
||||
|
||||
if (offset < 0) {
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
if (offset > 1) {
|
||||
offset = 1;
|
||||
}
|
||||
|
||||
if (initialOffset != offset) {
|
||||
onScrolled(offset);
|
||||
}
|
||||
}
|
||||
|
||||
GeneralClient.bind("/gui/allitems.png");
|
||||
drawTexturedModalRect(xPosition, yPosition + (int) ((height - elementHeight) * offset), active ? 232 : 244, 0, 12, elementHeight);
|
||||
}
|
||||
|
||||
public void handleMouseInput() {
|
||||
if (Mouse.getEventButton() == 0 && !Mouse.getEventButtonState()) {
|
||||
dragged = false;
|
||||
}
|
||||
|
||||
if (!active) {
|
||||
return;
|
||||
}
|
||||
|
||||
float initialOffset = offset;
|
||||
int direction = Mouse.getEventDWheel();
|
||||
|
||||
if (direction != 0) {
|
||||
offset += direction > 0 ? -step : step;
|
||||
}
|
||||
|
||||
if (offset < 0) {
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
if (offset > 1) {
|
||||
offset = 1;
|
||||
}
|
||||
|
||||
if (initialOffset != offset) {
|
||||
onScrolled(offset);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void onScrolled(float off);
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
|
||||
public class TexturedBox {
|
||||
|
||||
String texture;
|
||||
int u, v, texw, texh;
|
||||
int borderTop, borderRight, borderBottom, borderLeft;
|
||||
|
||||
public TexturedBox(String texture, int u, int v, int texw, int texh, int borderTop, int borderRight, int borderBottom, int borderLeft) {
|
||||
this.texture = texture;
|
||||
this.u = u;
|
||||
this.v = v;
|
||||
this.texw = texw;
|
||||
this.texh = texh;
|
||||
this.borderTop = borderTop;
|
||||
this.borderRight = borderRight;
|
||||
this.borderBottom = borderBottom;
|
||||
this.borderLeft = borderLeft;
|
||||
}
|
||||
|
||||
public void render(GuiScreenPlus gui, int x, int y, int w, int h) {
|
||||
int x1 = x;
|
||||
int x2 = x + borderLeft;
|
||||
int x3 = x + w - borderRight;
|
||||
int y1 = y;
|
||||
int y2 = y + borderTop;
|
||||
int y3 = y + h - borderBottom;
|
||||
int w1 = borderLeft;
|
||||
int w2 = w - borderLeft - borderRight;
|
||||
int w3 = borderRight;
|
||||
int h1 = borderTop;
|
||||
int h2 = h - borderTop - borderBottom;
|
||||
int h3 = borderBottom;
|
||||
int u1 = u;
|
||||
int v1 = v;
|
||||
int tw = texw;
|
||||
|
||||
if (tw > w) {
|
||||
tw = w;
|
||||
}
|
||||
|
||||
int th = texh;
|
||||
|
||||
if (th > h) {
|
||||
th = h;
|
||||
}
|
||||
|
||||
int u2 = u1 + borderLeft;
|
||||
int u3 = u1 + texw - borderRight;
|
||||
int v2 = v1 + borderTop;
|
||||
int v3 = v1 + texh - borderBottom;
|
||||
int texw2 = tw - borderLeft - borderRight;
|
||||
int texh1 = borderTop;
|
||||
int texh2 = th - borderTop - borderBottom;
|
||||
int texh3 = borderBottom;
|
||||
gui.bindTexture(texture);
|
||||
gui.drawTexturedModalRect(x1, y1, u1, v1, w1, h1);
|
||||
gui.drawTiledRect(x2, y1, w2, h1, u2, v1, texw2, texh1);
|
||||
gui.drawTexturedModalRect(x3, y1, u3, v1, w3, h1);
|
||||
gui.drawTiledRect(x1, y2, w1, h2, u1, v2, w1, texh2);
|
||||
gui.drawTiledRect(x2, y2, w2, h2, u2, v2, texw2, texh2);
|
||||
gui.drawTiledRect(x3, y2, w3, h2, u3, v2, w3, texh2);
|
||||
gui.drawTexturedModalRect(x1, y3, u1, v3, w1, h3);
|
||||
gui.drawTiledRect(x2, y3, w2, h3, u2, v3, texw2, texh3);
|
||||
gui.drawTexturedModalRect(x3, y3, u3, v3, w3, h3);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -28,29 +30,32 @@ public class RendererCTM implements ISimpleBlockRenderingHandler {
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
Drawing.drawBlock(block, metadata, renderer);
|
||||
IVariationInfo var = ((ICarvable) block).getVariation(new ItemStack(block, 1, metadata));
|
||||
Drawing.drawBlock(block, metadata, getContext(renderer, block, Minecraft.getMinecraft().theWorld, var, metadata));
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks rendererOld) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
IVariationInfo var = ((ICarvable) block).getVariation(world, x, y, z, meta);
|
||||
|
||||
return getContext(rendererOld, block, world, var, meta).renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
private RenderBlocks getContext(RenderBlocks rendererOld, Block block, IBlockAccess world, IVariationInfo var, int meta) {
|
||||
if (!rendererOld.hasOverrideBlockTexture() && var != null) {
|
||||
RenderBlocks rb = var.getSubmapManager().createRenderContext(rendererOld, block, world);
|
||||
if (rb != null && rb != rendererOld) {
|
||||
rb.blockAccess = world;
|
||||
if (rb instanceof RenderBlocksCTM) {
|
||||
((RenderBlocksCTM)rb).manager = var.getSubmapManager();
|
||||
((RenderBlocksCTM)rb).rendererOld = rendererOld;
|
||||
RenderBlocksCTM rbctm = (RenderBlocksCTM) rb;
|
||||
rbctm.manager = rbctm.manager == null ? var.getSubmapManager() : rbctm.manager;
|
||||
rbctm.rendererOld = rbctm.rendererOld == null ? rendererOld : rbctm.rendererOld;
|
||||
}
|
||||
return rb.renderStandardBlock(block, x, y, z);
|
||||
return rb;
|
||||
}
|
||||
}
|
||||
|
||||
return rendererOld.renderStandardBlock(block, x, y, z) || rendererOld.hasOverrideBlockTexture();
|
||||
return rendererOld;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
import com.cricketcraft.chisel.block.BlockCarvablePillar;
|
||||
import com.cricketcraft.chisel.utils.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class RendererPillar implements ISimpleBlockRenderingHandler {
|
||||
|
||||
public static int id;
|
||||
|
||||
public RendererPillar() {
|
||||
id = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block blck, int metadata, int modelID, RenderBlocks renderer) {
|
||||
if (!(blck instanceof BlockCarvablePillar))
|
||||
return;
|
||||
|
||||
BlockCarvablePillar block = (BlockCarvablePillar) blck;
|
||||
|
||||
block.sides[0] = block.sides[1] = block.getCtmIcon(4, metadata);
|
||||
block.sides[2] = block.sides[3] = block.sides[4] = block.sides[5] = block.getCtmIcon(0, metadata);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
Drawing.drawBlock(block, metadata, renderer);
|
||||
}
|
||||
|
||||
boolean connected(IBlockAccess world, int x, int y, int z, Block block, int meta) {
|
||||
return world.getBlock(x, y, z).equals(block) && world.getBlockMetadata(x, y, z) == meta;
|
||||
|
||||
}
|
||||
|
||||
// TODO this is a hardcoded mess...icon decisions should be left to the ISubmapManager, not here
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block blck, int modelId, RenderBlocks renderer) {
|
||||
if (!(blck instanceof BlockCarvablePillar))
|
||||
return false;
|
||||
|
||||
BlockCarvablePillar block = (BlockCarvablePillar) blck;
|
||||
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
|
||||
// Probably not the best way to handle this...
|
||||
if (metadata >= block.carverHelper.infoList.size()) {
|
||||
metadata = 0;
|
||||
} else {
|
||||
if (block.carverHelper.infoList.get(metadata).getType() != TextureType.CTMV) {
|
||||
block.sides[0] = block.carverHelper.getIcon(0, metadata);
|
||||
block.sides[1] = block.carverHelper.getIcon(1, metadata);
|
||||
block.sides[2] = block.carverHelper.getIcon(2, metadata);
|
||||
block.sides[3] = block.carverHelper.getIcon(3, metadata);
|
||||
block.sides[4] = block.carverHelper.getIcon(4, metadata);
|
||||
block.sides[5] = block.carverHelper.getIcon(5, metadata);
|
||||
|
||||
return renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
boolean yp = connected(world, x, y + 1, z, block, metadata);
|
||||
boolean yn = connected(world, x, y - 1, z, block, metadata);
|
||||
|
||||
if (yp || yn) {
|
||||
block.sides[0] = block.getCtmIcon(4, metadata);
|
||||
block.sides[1] = block.getCtmIcon(4, metadata);
|
||||
|
||||
if (yp && yn)
|
||||
block.sides[2] = block.getCtmIcon(2, metadata);
|
||||
else if (yp)
|
||||
block.sides[2] = block.getCtmIcon(3, metadata);
|
||||
else
|
||||
block.sides[2] = block.getCtmIcon(1, metadata);
|
||||
|
||||
block.sides[3] = block.sides[4] = block.sides[5] = block.sides[2];
|
||||
} else {
|
||||
boolean xp = connected(world, x + 1, y, z, block, metadata);
|
||||
boolean xn = connected(world, x - 1, y, z, block, metadata);
|
||||
|
||||
if (xp && (connected(world, x + 1, y + 1, z, block, metadata) || connected(world, x + 1, y - 1, z, block, metadata)))
|
||||
xp = false;
|
||||
if (xn && (connected(world, x - 1, y + 1, z, block, metadata) || connected(world, x - 1, y - 1, z, block, metadata)))
|
||||
xn = false;
|
||||
|
||||
if (xp || xn) {
|
||||
renderer.uvRotateEast = 2;
|
||||
renderer.uvRotateWest = 1;
|
||||
renderer.uvRotateTop = 1;
|
||||
renderer.uvRotateBottom = 2;
|
||||
|
||||
block.sides[4] = block.getCtmIcon(4, metadata);
|
||||
block.sides[5] = block.getCtmIcon(4, metadata);
|
||||
|
||||
if (xp && xn)
|
||||
block.sides[0] = block.getCtmIcon(2, metadata);
|
||||
else if (xp)
|
||||
block.sides[0] = block.getCtmIcon(3, metadata);
|
||||
else
|
||||
block.sides[0] = block.getCtmIcon(1, metadata);
|
||||
|
||||
block.sides[1] = block.sides[2] = block.sides[3] = block.sides[0];
|
||||
} else {
|
||||
boolean zp = connected(world, x, y, z + 1, block, metadata);
|
||||
boolean zn = connected(world, x, y, z - 1, block, metadata);
|
||||
|
||||
if (zp && (connected(world, x, y + 1, z + 1, block, metadata) || connected(world, x, y - 1, z + 1, block, metadata)))
|
||||
zp = false;
|
||||
if (zp && (connected(world, x + 1, y, z + 1, block, metadata) || connected(world, x - 1, y, z + 1, block, metadata)))
|
||||
zp = false;
|
||||
if (zn && (connected(world, x, y + 1, z - 1, block, metadata) || connected(world, x, y - 1, z - 1, block, metadata)))
|
||||
zn = false;
|
||||
if (zn && (connected(world, x + 1, y, z - 1, block, metadata) || connected(world, x - 1, y, z - 1, block, metadata)))
|
||||
zn = false;
|
||||
|
||||
if (zp || zn) {
|
||||
renderer.uvRotateSouth = 1;
|
||||
renderer.uvRotateNorth = 2;
|
||||
|
||||
block.sides[2] = block.getCtmIcon(4, metadata);
|
||||
block.sides[3] = block.getCtmIcon(4, metadata);
|
||||
|
||||
if (zp && zn)
|
||||
block.sides[0] = block.getCtmIcon(2, metadata);
|
||||
else if (zp)
|
||||
block.sides[0] = block.getCtmIcon(1, metadata);
|
||||
else
|
||||
block.sides[0] = block.getCtmIcon(3, metadata);
|
||||
|
||||
block.sides[1] = block.sides[4] = block.sides[5] = block.sides[0];
|
||||
} else {
|
||||
block.sides[0] = block.sides[1] = block.getCtmIcon(4, metadata);
|
||||
block.sides[2] = block.sides[3] = block.sides[4] = block.sides[5] = block.getCtmIcon(0, metadata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean flag = renderer.renderStandardBlock(block, x, y, z);
|
||||
|
||||
renderer.uvRotateSouth = 0;
|
||||
renderer.uvRotateEast = 0;
|
||||
renderer.uvRotateWest = 0;
|
||||
renderer.uvRotateNorth = 0;
|
||||
renderer.uvRotateTop = 0;
|
||||
renderer.uvRotateBottom = 0;
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int renderId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class SubmapManagerLeaves extends SubmapManagerBase {
|
||||
|
||||
private String name;
|
||||
private IIcon normal, opaque;
|
||||
|
||||
public SubmapManagerLeaves(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return Blocks.leaves.isOpaqueCube() ? opaque : normal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(String modName, Block block, IIconRegister register) {
|
||||
this.normal = register.registerIcon(modName + ":" + name);
|
||||
this.opaque = register.registerIcon(modName + ":" + name + "_opaque");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureSubmap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SubmapManagerVoidstone extends SubmapManagerBase {
|
||||
|
||||
// TODO there must be a better more generic way to do this...
|
||||
@SideOnly(Side.CLIENT)
|
||||
private class RenderBlocksVoidstone extends RenderBlocks {
|
||||
|
||||
@Override
|
||||
public void renderFaceXNeg(Block block, double x, double y, double z, IIcon p_147798_8_) {
|
||||
super.renderFaceXNeg(block, x, y, z, getBase(x, y, z, ForgeDirection.WEST.ordinal()));
|
||||
super.renderFaceXNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceXPos(Block block, double x, double y, double z, IIcon p_147764_8_) {
|
||||
super.renderFaceXPos(block, x, y, z, getBase(x, y, z, ForgeDirection.EAST.ordinal()));
|
||||
super.renderFaceXPos(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYNeg(Block block, double x, double y, double z, IIcon p_147768_8_) {
|
||||
super.renderFaceYNeg(block, x, y, z, getBase(x, y, z, ForgeDirection.DOWN.ordinal()));
|
||||
super.renderFaceYNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYPos(Block block, double x, double y, double z, IIcon p_147806_8_) {
|
||||
super.renderFaceYPos(block, x, y, z, getBase(x, y, z, ForgeDirection.UP.ordinal()));
|
||||
super.renderFaceYPos(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZNeg(Block block, double x, double y, double z, IIcon p_147761_8_) {
|
||||
super.renderFaceZNeg(block, x, y, z, getBase(x, y, z, ForgeDirection.NORTH.ordinal()));
|
||||
super.renderFaceZNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZPos(Block block, double x, double y, double z, IIcon p_147734_8_) {
|
||||
super.renderFaceZPos(block, x, y, z, getBase(x, y, z, ForgeDirection.SOUTH.ordinal()));
|
||||
super.renderFaceZPos(block, x, y, z, icon);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private RenderBlocks rb;
|
||||
|
||||
private IIcon icon;
|
||||
private TextureSubmap base;
|
||||
|
||||
private IIcon getBase(double x, double y, double z, int side) {
|
||||
return TextureType.getVIcon(TextureType.V4, base, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), side);
|
||||
}
|
||||
|
||||
private String texture;
|
||||
|
||||
public SubmapManagerVoidstone(String texture) {
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(String modName, Block block, IIconRegister register) {
|
||||
icon = register.registerIcon(modName + ":" + texture);
|
||||
base = new TextureSubmap(register.registerIcon(modName + ":" + "animations/hadesX32"), 2, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
if (rb == null) {
|
||||
rb = new RenderBlocksVoidstone();
|
||||
}
|
||||
rb.setRenderBoundsFromBlock(block);
|
||||
return rb;
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,22 @@ package com.cricketcraft.chisel.compat;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
public class Compatibility {
|
||||
|
||||
public static String[] rockColorNames = { "gray", "lightgray", "brown", "tan", "reddish", "bluish", "greenish" };
|
||||
@@ -75,6 +83,10 @@ public class Compatibility {
|
||||
addSupport("TConstruct", "decoration.multibrickfancy", "stonebricksmooth", 15, 99);
|
||||
|
||||
addSupport("Botania", "endStoneBrick", "end_stone", 12, 0);
|
||||
|
||||
if(Loader.isModLoaded("EE3")){
|
||||
loadEE3Values();
|
||||
}
|
||||
}
|
||||
|
||||
public static void addSupport(String modname, String blockname, String name, int metadata, int order) {
|
||||
@@ -91,4 +103,143 @@ public class Compatibility {
|
||||
// ThaumcraftApi.registerObjectTag(new ItemStack(ChiselBlocks.cobblestone, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));
|
||||
// ThaumcraftApi.registerObjectTag(new ItemStack(ChiselBlocks.cobblestoneWall, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));
|
||||
}
|
||||
|
||||
private static void loadEE3Values(){
|
||||
FMLLog.log(Chisel.MOD_ID, Level.INFO, "Oooh is that Equivalent Exchange I see?");
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselItems.ballomoss, 1), 16);
|
||||
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sand_snakestone, 1, 1), 8);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sand_snakestone, 1, 13), 8);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 0), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 1), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 2), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 3), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 4), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 1), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 2), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 3), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 4), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 12), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 13), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 14), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 15), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.present, 1, 4), 80);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.road_line, 1, 0), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.road_line, 1, 1), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.road_line, 1, 2), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.road_line, 1, 3), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 0), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 1), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 2), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 3), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass2, 1), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 0), 32);
|
||||
|
||||
for(int x = 0; x < ChiselBlocks.pumpkin.length; x++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.pumpkin[x], 1), 144);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.jackolantern[x], 1), 153);
|
||||
}
|
||||
|
||||
for(int x = 0; x < ChiselBlocks.torches.length; x++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.torches[x], 1), 9);
|
||||
}
|
||||
|
||||
for(int x = 0; x < 10; x++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.valentines, 1, x), 3);
|
||||
}
|
||||
|
||||
for(int x = 0 ; x < 16; x++){
|
||||
if(x <= 10)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.concrete, 1, x), 8);
|
||||
if(x <= 14)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.grimstone, 1, x), 5);
|
||||
if(x < 14)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.grimstone, 1, x), 7);
|
||||
if(x < 12)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.dirt, 1, x), 1);
|
||||
if(x < 5){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.rebel, 1, x), 39);
|
||||
}
|
||||
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.fantasyblock, 1, x), 29444);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.fantasyblock, 1, x), 31444);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.limestone, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.marble, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.marble_pillar, 1, x), 8);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.marble_pillar_slab, 1, x), 4);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sandstone_scribbles, 1, x), 4);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.stonebricksmooth, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.templeblock, 1, x), 108);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.mossy_templeblock, 1, x), 108);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glowstone, 1, x), 1536);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.ice, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.woolen_clay, 1, x), 153);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.factoryblock, 1, x), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.hexPlating, 1, x), 37);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.gold_block, 1, x), 18432);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_block, 1, x), 2304);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.laboratoryblock, 1, x), 33);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical, 1, x), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.tyrian, 1, x), 33);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.hexLargePlating, 1, x), 37);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.circuits, 1, x), 37);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.factoryblock2, 1, x), 32);
|
||||
|
||||
if(x < 15)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.warningSign, 1, x), 6);
|
||||
|
||||
if(x < 4)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.factoryblock2, 1, x), 32);
|
||||
|
||||
for(int c = 0; c < ChiselBlocks.stainedGlass.length; c++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.stainedGlass[c], 1, x), 1);
|
||||
}
|
||||
|
||||
for(int c = 0; c < ChiselBlocks.stainedGlassPane.length; c++){
|
||||
if(x <= 13)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.stainedGlassPane[c], 1, x), 1);
|
||||
}
|
||||
|
||||
if(x > 0) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cobblestone, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.mossy_cobblestone, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.netherrack, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.obsidian, 1, x), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sandstone, 1, x), 4);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstonerunic, 1, x), 160);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.redstone_block, 1, x), 288);
|
||||
if(x <= 8)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.bookshelf, 1, x), 528);
|
||||
if (x <= 12) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.diamond_block, 1, x), 73728);
|
||||
if (x != 12)
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.emerald_block, 1, x), 73728);
|
||||
}
|
||||
|
||||
for (int c = 0; c < ChiselBlocks.planks.length; c++) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.planks[c], 1, x), 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int x = 0; x <= 6; x++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.andesite, 1, x), 129);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.diorite, 1, x), 257);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.granite, 1, x), 513);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.lavastone, 1, x), 9);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.lavastone, 1, 7), 9);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstone, 1, x), 160);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstone, 1, 7), 160);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstone2, 1, x), 256);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstone2, 1, 7), 256);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.waterstone, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.ice_pillar, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_bars, 1, x), 96);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_bars, 1, 7), 96);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_bars, 1, 8), 96);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_bars, 1, 9), 96);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall, 1, x), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall, 1, 7), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall, 1, 8), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall_block, 1, x), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall_block, 1, 7), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall_block, 1, 8), 32);
|
||||
if(x > 0){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.brickCustom, 1, x), 256);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,6 @@ public class WailaCompat implements IWailaDataProvider {
|
||||
return strings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
|
||||
return tag;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ public class Configurations {
|
||||
public static boolean oldPillars;
|
||||
public static boolean disableCTM;
|
||||
public static boolean connectInsideCTM;
|
||||
public static boolean fancy;
|
||||
public static boolean blockDescriptions;
|
||||
|
||||
public static boolean allowChiselDamage;
|
||||
@@ -93,7 +92,6 @@ public class Configurations {
|
||||
disableCTM = !config.get(category, "connectedTextures", true, "Enable connected textures").getBoolean(true);
|
||||
CTM.disableObscuredFaceCheckConfig = connectInsideCTM = config.get(category, "connectInsideCTM", false,
|
||||
"Choose whether the inside corner is disconnected on a CTM block - http://imgur.com/eUywLZ4").getBoolean(false);
|
||||
fancy = config.get(category, "fancyLeaves", true, "Enable fancy textures").getBoolean(true);
|
||||
blockDescriptions = config.get(category, "tooltipsUseBlockDescriptions", true, "Make variations of blocks have the same name, and use the description in tooltip to distinguish them.")
|
||||
.getBoolean(true);
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@ public final class ChiselBlocks {
|
||||
public static final BlockCarvable stonebricksmooth = null;
|
||||
public static final BlockCarvablePane iron_bars = null;
|
||||
public static final BlockCarvableIce ice = null;
|
||||
public static final BlockCarvableIcePillar ice_pillar = null;
|
||||
public static final BlockCarvableIce ice_pillar = null;
|
||||
public static final BlockCarvablePackedIce packedice = null;
|
||||
public static final BlockCarvablePackedIcePillar packedice_pillar = null;
|
||||
public static final BlockCarvablePackedIce packedice_pillar = null;
|
||||
public static final BlockCarvable obsidian = null;
|
||||
public static final BlockCarvable obsidian2 = null;
|
||||
public static final BlockCarvablePowered redstone_block = null;
|
||||
@@ -69,16 +69,19 @@ public final class ChiselBlocks {
|
||||
public static final BlockCarvable laboratoryblock = null;
|
||||
|
||||
public static final BlockCarvable voidstone = null;
|
||||
public static final BlockMultiLayer voidstone2 = null;
|
||||
public static final BlockCarvablePillar voidstonePillar = null;
|
||||
public static final BlockCarvablePillar voidstonePillar2 = null;
|
||||
public static final BlockCarvable voidstone2 = null;
|
||||
public static final BlockCarvable voidstonerunic = null;
|
||||
public static final BlockCarvable voidstonePillar = null;
|
||||
public static final BlockCarvable voidstonePillar2 = null;
|
||||
public static final BlockSnakestone stone_snakestone = null;
|
||||
public static final BlockSnakestone sand_snakestone = null;
|
||||
public static final BlockSnakestoneObsidian obsidian_snakestone = null;
|
||||
public static final BlockCarvable hexPlating = null;
|
||||
public static final BlockCarvable hexLargePlating = null;
|
||||
public static final BlockCarvable technical = null;
|
||||
public static final BlockCarvableGlass technical2 = null;
|
||||
public static final BlockCarvable futura = null;
|
||||
public static final BlockCarvable circuits = null;
|
||||
public static final BlockCarvable brickCustom = null;
|
||||
public static final BlockCarvableLayered warningSign = null;
|
||||
public static final BlockCarvable arcane = null;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ContainerChisel extends Container {
|
||||
}
|
||||
|
||||
chisel = inventoryplayer.getCurrentItem();
|
||||
if (chisel.stackTagCompound != null) {
|
||||
if (chisel != null && chisel.stackTagCompound != null) {
|
||||
ItemStack stack = ItemStack.loadItemStackFromNBT(chisel.stackTagCompound.getCompoundTag("chiselTarget"));
|
||||
inventory.setInventorySlotContents(InventoryChiselSelection.normalSlots, stack);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
public final class ChiselController {
|
||||
|
||||
public static final ChiselController INSTANCE = new ChiselController();
|
||||
|
||||
|
||||
private long lastTickClick = 0;
|
||||
|
||||
private ChiselController() {
|
||||
@@ -55,9 +55,9 @@ public final class ChiselController {
|
||||
if (group == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
List<ICarvingVariation> list = group.getVariations();
|
||||
|
||||
|
||||
main: for (ItemStack stack : OreDictionary.getOres(group.getOreName())) {
|
||||
ICarvingVariation v = General.getVariation(stack);
|
||||
for (ICarvingVariation check : list) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraftforge.client.MinecraftForgeClient;
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
ItemChiselRenderer renderer = new ItemChiselRenderer();
|
||||
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
}
|
||||
@@ -36,7 +36,6 @@ public class ClientProxy extends CommonProxy {
|
||||
RenderingRegistry.registerBlockHandler(new RendererCTMPane());
|
||||
RenderingRegistry.registerBlockHandler(new RendererRoadLine());
|
||||
RenderingRegistry.registerBlockHandler(new RendererSnakeStone());
|
||||
RenderingRegistry.registerBlockHandler(new RendererPillar());
|
||||
RenderingRegistry.registerBlockHandler(new RendererEldritch());
|
||||
RenderingRegistry.registerBlockHandler(new RendererCTM());
|
||||
RenderingRegistry.registerBlockHandler(new RendererLayeredGlow());
|
||||
|
||||
@@ -126,6 +126,10 @@ public class General {
|
||||
|
||||
private static final String MODE_KEY = "chiselMode";
|
||||
public static IChiselMode getChiselMode(ItemStack chisel) {
|
||||
if (chisel == null) {
|
||||
return ChiselMode.SINGLE;
|
||||
}
|
||||
|
||||
if (chisel.stackTagCompound == null || Strings.isNullOrEmpty(chisel.stackTagCompound.getString(MODE_KEY))) {
|
||||
initTag(chisel);
|
||||
chisel.stackTagCompound.setString(MODE_KEY, ChiselMode.SINGLE.name());
|
||||
|
||||
|
After Width: | Height: | Size: 244 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 3
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 75 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |