Compare commits
49 Commits
bugfix-1.1
...
feature-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a764219be | ||
|
|
d1a1dc3fe1 | ||
|
|
3cb82b5e4c | ||
|
|
a341f1677a | ||
| 312bcb82bd | |||
| 295e556867 | |||
|
|
d74f564d8e | ||
|
|
cbe15662e3 | ||
|
|
bad57bdb6b | ||
|
|
5ada5951bf | ||
|
|
a7f3b0b5ab | ||
|
|
ab42ba9f30 | ||
|
|
6c467978fc | ||
|
|
f7c27289b7 | ||
|
|
9a8fe16df4 | ||
|
|
0752fecfdc | ||
|
|
5369a9fef1 | ||
|
|
3191711b09 | ||
|
|
4e30ec7f20 | ||
|
|
88b60140d6 | ||
|
|
1bfb6902de | ||
|
|
8af16328fb | ||
|
|
5a203384d8 | ||
|
|
f3cccdc613 | ||
|
|
fdc65afa5d | ||
|
|
ce398ba90c | ||
|
|
69b0435cc3 | ||
|
|
5d52195bda | ||
|
|
25ba3af7c6 | ||
|
|
94ed0367aa | ||
|
|
51561d063e | ||
|
|
8fda4b25c4 | ||
|
|
5ef2b3bd0d | ||
|
|
7afe86e45e | ||
|
|
69f25c4d0c | ||
|
|
4260b1169c | ||
|
|
b6cbeac459 | ||
|
|
d4881ea454 | ||
|
|
324bba66c1 | ||
|
|
908c5150e5 | ||
|
|
eb429a5fc2 | ||
|
|
b7aba91158 | ||
|
|
fec851e5af | ||
|
|
2b9f131984 | ||
|
|
b390ac48be | ||
|
|
b7f3d04929 | ||
|
|
dbc591fc59 | ||
|
|
0efd2b73fd | ||
|
|
3d8552ed1a |
115
.idea/workspace.xml
generated
115
.idea/workspace.xml
generated
@@ -5,6 +5,7 @@
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@@ -49,7 +50,7 @@
|
||||
<detection-done>true</detection-done>
|
||||
<sorting>DEFINITION_ORDER</sorting>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<option name="y" value="22" />
|
||||
<option name="width" value="1680" />
|
||||
<option name="height" value="1050" />
|
||||
@@ -84,13 +85,15 @@
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scope" />
|
||||
<pane id="AndroidView" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/kfc/build.gradle" />
|
||||
<property name="project.structure.last.edited" value="Project" />
|
||||
<property name="project.structure.proportion" value="0.0" />
|
||||
<property name="project.structure.side.proportion" value="0.0" />
|
||||
@@ -110,27 +113,65 @@
|
||||
<component name="RunManager">
|
||||
<configuration default="true" type="Applet" factoryName="Applet">
|
||||
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
|
||||
<method v="2">
|
||||
<method>
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration default="true" type="Application" factoryName="Application">
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<method v="2">
|
||||
<method>
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="build" type="GroovyScriptRunConfiguration" factoryName="Groovy" temporary="true">
|
||||
<module name="ForgeCraft" />
|
||||
<setting name="path" value="file://$PROJECT_DIR$/kfc/build.gradle" />
|
||||
<setting name="vmparams" value="" />
|
||||
<setting name="params" value="" />
|
||||
<setting name="workDir" value="file://$PROJECT_DIR$/kfc" />
|
||||
<setting name="debug" value="false" />
|
||||
</configuration>
|
||||
<configuration default="true" type="JUnit" factoryName="JUnit">
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
|
||||
<method v="2">
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<patterns />
|
||||
<method>
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration default="true" type="TestNG" factoryName="TestNG">
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="SUITE_NAME" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="GROUP_NAME" />
|
||||
<option name="TEST_OBJECT" value="CLASS" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<option name="USE_DEFAULT_REPORTERS" value="false" />
|
||||
<option name="PROPERTIES_FILE" />
|
||||
<properties />
|
||||
<listeners />
|
||||
<method v="2">
|
||||
<method>
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
@@ -139,10 +180,15 @@
|
||||
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<predefined_log_file id="idea.log" enabled="true" />
|
||||
<method v="2">
|
||||
<method>
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Groovy.build" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
@@ -163,37 +209,38 @@
|
||||
<option name="totallyTimeSpent" value="44000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="22" width="1680" height="1050" extended-state="0" />
|
||||
<frame x="-8" y="-8" width="2576" height="1416" extended-state="6" />
|
||||
<layout>
|
||||
<window_info id="Structure" order="0" weight="0.25" />
|
||||
<window_info id="Nl-Palette" order="1" />
|
||||
<window_info id="Favorites" order="2" side_tool="true" />
|
||||
<window_info id="Image Layers" order="3" />
|
||||
<window_info id="Designer" order="4" />
|
||||
<window_info id="UI Designer" order="5" />
|
||||
<window_info id="Capture Tool" order="6" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
<window_info anchor="bottom" id="Run" order="2" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info active="true" anchor="bottom" id="Terminal" order="7" visible="true" weight="0.47181627" />
|
||||
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" weight="0.32958034" />
|
||||
<window_info anchor="bottom" id="Version Control" order="9" />
|
||||
<window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
|
||||
<window_info anchor="right" id="Database" order="0" />
|
||||
<window_info anchor="right" id="Commander" order="1" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="2" weight="0.25" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="3" weight="0.25" />
|
||||
<window_info anchor="right" id="Palette" order="4" />
|
||||
<window_info anchor="right" id="Capture Analysis" order="5" />
|
||||
<window_info anchor="right" id="Theme Preview" order="6" />
|
||||
<window_info anchor="right" id="Properties" order="7" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Messages" />
|
||||
<window_info anchor="right" id="Palette	" order="8" />
|
||||
<window_info id="Image Layers" order="3" />
|
||||
<window_info anchor="right" id="Capture Analysis" order="5" />
|
||||
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" weight="0.32958034" />
|
||||
<window_info anchor="right" id="Maven Projects" order="9" />
|
||||
<window_info anchor="right" content_ui="combo" id="Project" order="10" visible="true" weight="0.25457877" />
|
||||
<window_info anchor="bottom" id="Run" order="2" />
|
||||
<window_info anchor="bottom" id="Version Control" order="9" />
|
||||
<window_info active="true" anchor="bottom" id="Terminal" order="7" visible="true" weight="0.33386454" />
|
||||
<window_info id="Capture Tool" order="6" />
|
||||
<window_info id="Designer" order="4" />
|
||||
<window_info anchor="right" content_ui="combo" id="Project" order="10" visible="true" weight="0.16613673" />
|
||||
<window_info id="Structure" order="0" side_tool="true" weight="0.25" />
|
||||
<window_info anchor="right" id="Ant Build" order="2" weight="0.25" />
|
||||
<window_info id="UI Designer" order="5" />
|
||||
<window_info anchor="right" id="Theme Preview" order="6" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info id="Favorites" order="2" side_tool="true" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="3" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info id="Nl-Palette" order="1" />
|
||||
<window_info anchor="right" id="Commander" order="1" weight="0.4" />
|
||||
<window_info anchor="right" id="Properties" order="7" />
|
||||
<window_info anchor="right" id="Database" order="0" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
||||
@@ -1,15 +1,30 @@
|
||||
# To-Dos
|
||||
|
||||
## Bugs
|
||||
- [ ] Texture mismatch for 4diamond 1 redstone
|
||||
- [ ] ForgeHammer extend Gallagher
|
||||
|
||||
- [ ] Placement bug for crucible from tongs
|
||||
- [ ] Wootz shovel not rendering (NORTH)
|
||||
- [ ] Cool Damascus Rendering in tongs
|
||||
- [ ] Grinding Wheel pull out
|
||||
- [ ] Grinding wheel wont turn off
|
||||
- [ ] Grinding wheel rotate
|
||||
|
||||
## Current Feature
|
||||
- [x] Test Redstone Engine drops
|
||||
- [x] Figure out tile update for crucible after cooking.
|
||||
- [ ] Item Render for engine
|
||||
- [ ] Item Render for Saw Block
|
||||
- [ ] Machine Chassis Recipe
|
||||
- [ ] Redstone Engine Recipe
|
||||
- [ ] Gear recipes
|
||||
- [ ] Gearbox recipe
|
||||
- [ ] Saw Recipe
|
||||
|
||||
## Feature Optimizations
|
||||
- [ ] Untick Bloomery and Forge
|
||||
- [ ] Craft Tweaker Support
|
||||
- [ ] Recipe Handler for Block Breaker
|
||||
- [ ] Damascus Workblade Recipe
|
||||
|
||||
## Feature Musket
|
||||
- [ ] Create powder charge item (copper, charcoal, gunpowder)
|
||||
@@ -23,13 +38,9 @@
|
||||
- [ ] Create lock assembly item
|
||||
|
||||
## Backlog
|
||||
- [ ] Play a sound when bloomery or forge finishes
|
||||
- [ ] Hardness and Resistance calculation for durability damage
|
||||
- [ ] Hardened Leather Helmet Inventory Model
|
||||
- [ ] Add Achievements
|
||||
- [ ] Bloomery Print out
|
||||
- [ ] Random Floats for hot texture
|
||||
- [ ] Mass Ore Production
|
||||
- [ ] Silver/Lead Production
|
||||
- [ ] Sparks to forging
|
||||
- [ ] Add Iron Ring Recipe
|
||||
@@ -41,6 +52,10 @@
|
||||
### Tid-Bits
|
||||
NonNullList<ItemStack> tempDrops = NonNullList.<ItemStack>create();
|
||||
ItemStack iron_gear = RecipeHelper.getFirstDictionaryMatch("gearIron", 1);
|
||||
public List<NBTBase> tagList = Lists.<NBTBase>newArrayList();
|
||||
NonNullList<ItemStack> renderList = NonNullList.<ItemStack>create();
|
||||
NBTTagList tagList = stack.getSubCompound("BlockEntityTag").getTagList("Items", 10);
|
||||
NBTTagEnd endList = new NBTTagEnd();
|
||||
```
|
||||
sed -i -- 's/iron/steel/g' *
|
||||
rm *.json--
|
||||
@@ -48,6 +63,26 @@ rename s/iron/steel/ iron*
|
||||
```
|
||||
|
||||
### Completed
|
||||
- [x] Recipe Handler for saw
|
||||
- [x] Sound for block break
|
||||
- [x] Redstone Engine Model
|
||||
- [x] Engine Refactor
|
||||
- [x] Slots for Engines
|
||||
- [x] Tool Slot
|
||||
- [x] Gearbox Slot
|
||||
- [x] Grinding Blade
|
||||
- [x] Fan
|
||||
- [x] powered-axle
|
||||
- [x] Gearbox Block
|
||||
- [x] Engine Overclocking
|
||||
- [x] Gears
|
||||
- [x] weapon upgrades
|
||||
- [x] Grinding Bench
|
||||
- [x] Repair ToolHead
|
||||
- [x] Grinding Wheel Crafting Slack, Clay, Sand
|
||||
- [x] Grinding Bench Recipe
|
||||
- [x] Dissasemble recipes for weapons
|
||||
- [x] Chisel Pickup
|
||||
- [x] WorkBench
|
||||
- [x] Longbow change NBT management
|
||||
- [x] Check dict name for cluster
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// -Dhttps.protocols=TLSv1.2
|
||||
//org.gradle.jvmargs="-Dhttps.protocols=TLSv1.2"
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
url = "https://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
@@ -22,7 +24,7 @@ repositories {
|
||||
|
||||
maven {
|
||||
name = "jei"
|
||||
url "http://dvs1.progwml6.com/files/maven"
|
||||
url "https://dvs1.progwml6.com/files/maven"
|
||||
}
|
||||
|
||||
maven {
|
||||
@@ -64,6 +66,8 @@ dependencies {
|
||||
// CraftTweaker
|
||||
//compile "CraftTweaker2:CraftTweaker2-MC1120-Main:${craftweaker_version}"
|
||||
//compile "CraftTweaker2:CraftTweaker2-API:${craftweaker_version}"
|
||||
//compile "CraftTweaker2:CraftTweaker2-MC1120-Main:${mc_major_version}-${craftweaker_version}"
|
||||
//compile "CraftTweaker2:CraftTweaker2-API:${craftweaker_version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
||||
@@ -6,10 +6,11 @@ org.gradle.jvmargs=-Xmx3G
|
||||
mod_group=nmd.primal.forgecraft
|
||||
mod_name=ForgeCraft
|
||||
|
||||
mod_version=1.6.31
|
||||
forge_version=14.23.4.2765
|
||||
mod_version=1.6.51
|
||||
forge_version=14.23.5.2806
|
||||
mcp_mappings=snapshot_20171003
|
||||
mc_version=1.12.2
|
||||
mc_major_version=1.12
|
||||
|
||||
primal_version=0.6+
|
||||
jei_version=4.12+
|
||||
|
||||
@@ -1,63 +1,78 @@
|
||||
package nmd.primal.forgecraft;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomShovel;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
import nmd.primal.core.api.events.CauldronRecipeEvent;
|
||||
import nmd.primal.core.common.crafting.handlers.tile.CauldronRecipe;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.core.common.tiles.machines.TileCauldron;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||
import nmd.primal.forgecraft.util.WeaponNBT;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 3/15/17.
|
||||
*/
|
||||
public class CommonEvents implements ToolNBT {
|
||||
public class CommonEvents implements WeaponNBT {
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
|
||||
public void onItemCrafted(CauldronRecipeEvent.Pre event){
|
||||
|
||||
@SubscribeEvent(priority= EventPriority.HIGHEST, receiveCanceled=true)
|
||||
public void onItemCrafted(PlayerEvent.ItemCraftedEvent event) {
|
||||
CauldronRecipe recipe = event.getRecipe();
|
||||
if (recipe.matches("forgecraft:cauldron_item.rawcoppergladiussmite", "forgecraft:cauldron_item.rawcoppergladiusbane", "forgecraft:cauldron_item.rawcoppergladiusfire", "forgecraft:cauldron_item.rawcoppergladiusfortune",
|
||||
"forgecraft:cauldron_item.rawbronzegladiussmite", "forgecraft:cauldron_item.rawbronzegladiusbane", "forgecraft:cauldron_item.rawbronzegladiusfire", "forgecraft:cauldron_item.rawbronzegladiusfortune",
|
||||
"forgecraft:cauldron_item.rawwroughtirongladiussmite", "forgecraft:cauldron_item.rawwroughtirongladiusbane", "forgecraft:cauldron_item.rawwroughtirongladiusfire", "forgecraft:cauldron_item.rawwroughtirongladiusfortune",
|
||||
"forgecraft:cauldron_item.rawclearnirongladiussmite", "forgecraft:cauldron_item.rawclearnirongladiusbane", "forgecraft:cauldron_item.rawclearnirongladiusfire", "forgecraft:cauldron_item.rawclearnirongladiusfortune",
|
||||
"forgecraft:cauldron_item.rawsteelgladiussmite", "forgecraft:cauldron_item.rawsteelgladiusbane", "forgecraft:cauldron_item.rawsteelgladiusfire", "forgecraft:cauldron_item.rawsteelgladiusfortune",
|
||||
"forgecraft:cauldron_item.rawwootzgladiussmite", "forgecraft:cauldron_item.rawwootzgladiusbane", "forgecraft:cauldron_item.rawwootzgladiusfire", "forgecraft:cauldron_item.rawwootzgladiusfortune",
|
||||
"forgecraft:cauldron_item.rawcleanironlongswordsmite", "forgecraft:cauldron_item.rawcleanironlongswordbane", "forgecraft:cauldron_item.rawcleanironlongswordfire", "forgecraft:cauldron_item.rawcleanironlongswordfortune",
|
||||
"forgecraft:cauldron_item.rawsteellongswordsmite", "forgecraft:cauldron_item.rawsteellongswordbane", "forgecraft:cauldron_item.rawsteellongswordfire", "forgecraft:cauldron_item.rawsteellongswordfortune",
|
||||
"forgecraft:cauldron_item.rawwootzlongswordsmite", "forgecraft:cauldron_item.rawwootzlongswordbane", "forgecraft:cauldron_item.rawwootzlongswordfire", "forgecraft:cauldron_item.rawwootzlongswordfortune",
|
||||
"forgecraft:cauldron_item.rawironslayersmite", "forgecraft:cauldron_item.rawironslayerbane", "forgecraft:cauldron_item.rawironslayerfire", "forgecraft:cauldron_item.rawironslayerfortune",
|
||||
"forgecraft:cauldron_item.rawcleanironslayersmite", "forgecraft:cauldron_item.rawcleanironslayerbane", "forgecraft:cauldron_item.rawcleanironslayerfire", "forgecraft:cauldron_item.rawcleanironslayerfortune",
|
||||
"forgecraft:cauldron_item.rawsteelslayersmite", "forgecraft:cauldron_item.rawsteelslayerbane", "forgecraft:cauldron_item.rawsteelslayerfire", "forgecraft:cauldron_item.rawsteelslayerfortune",
|
||||
"forgecraft:cauldron_item.rawwootzslayersmite", "forgecraft:cauldron_item.rawwootzslayerbane", "forgecraft:cauldron_item.rawwootzslayerfire", "forgecraft:cauldron_item.rawwootzslayerfortune"
|
||||
)){
|
||||
|
||||
if(!event.player.getEntityWorld().isRemote) {
|
||||
NonNullList<ItemStack> inputList = NonNullList.<ItemStack>withSize(6, ItemStack.EMPTY);
|
||||
inputList.set(0, event.getTile().getInputHandler().getStackInSlot(0));
|
||||
inputList.set(1, event.getTile().getInputHandler().getStackInSlot(1));
|
||||
inputList.set(2, event.getTile().getInputHandler().getStackInSlot(2));
|
||||
inputList.set(3, event.getTile().getInputHandler().getStackInSlot(3));
|
||||
inputList.set(4, event.getTile().getInputHandler().getStackInSlot(4));
|
||||
inputList.set(5, event.getTile().getInputHandler().getStackInSlot(5));
|
||||
|
||||
if (event.crafting.getItem() instanceof CustomPickaxe) {
|
||||
doToolNBT(event);
|
||||
TileCauldron tile = event.getTile();
|
||||
ItemStack inputStack = tile.getInputStack(event.getOutputs().get(0));
|
||||
Item inputStackItem = null;
|
||||
if(inputStack.getItem() instanceof WeaponPart){
|
||||
inputStackItem = inputStack.getItem();
|
||||
}
|
||||
if (event.crafting.getItem() instanceof CustomAxe ) {
|
||||
doToolNBT(event);
|
||||
}
|
||||
if (event.crafting.getItem() instanceof CustomShovel ) {
|
||||
doToolNBT(event);
|
||||
}
|
||||
if (event.crafting.getItem() instanceof CustomHoe) {
|
||||
doToolNBT(event);
|
||||
}
|
||||
if (event.crafting.getItem() instanceof ToolPart) {
|
||||
ItemStack modStack = ItemStack.EMPTY;
|
||||
ItemStack outputStack = event.getOutputs().get(0);
|
||||
|
||||
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
||||
modStack = getOppositeStack(inputList, inputStack);
|
||||
|
||||
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
||||
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
||||
if (a.getItem() instanceof CustomAxe) {
|
||||
doQuickNBT(event, i, a);
|
||||
PlayerHelper.spawnItemOnPlayer(event.player.world, event.player, new ItemStack(PrimalAPI.Items.LACQUER_STICK, 1));
|
||||
if(inputStackItem != null) {
|
||||
if (inputStack.hasTagCompound()) {
|
||||
if (WeaponNBT.getModifiers(inputStack) < WeaponNBT.materialModifiers.get(((WeaponPart) outputStack.getItem()).getMaterial()) ) {
|
||||
if (RecipeHelper.isOreName(modStack, "dustSilver")) {
|
||||
WeaponNBT.setSmiteLevel(outputStack, WeaponNBT.getSmiteLevel(inputStack) + 1);
|
||||
WeaponNBT.setModifiers(outputStack, WeaponNBT.getModifiers(inputStack) + 1);
|
||||
}
|
||||
if (a.getItem() instanceof CustomPickaxe) {
|
||||
doQuickNBT(event, i, a);
|
||||
PlayerHelper.spawnItemOnPlayer(event.player.world, event.player, new ItemStack(PrimalAPI.Items.LACQUER_STICK, 1));
|
||||
if (RecipeHelper.isOreName(modStack, "foodPoison")) {
|
||||
WeaponNBT.setBaneLevel(outputStack, WeaponNBT.getBaneLevel(inputStack) + 1);
|
||||
WeaponNBT.setModifiers(outputStack, WeaponNBT.getModifiers(inputStack) + 1);
|
||||
}
|
||||
if (a.getItem() instanceof CustomShovel) {
|
||||
doQuickNBT(event, i, a);
|
||||
PlayerHelper.spawnItemOnPlayer(event.player.world, event.player, new ItemStack(PrimalAPI.Items.LACQUER_STICK, 1));
|
||||
if (RecipeHelper.isOreName(modStack, "dustBlaze")) {
|
||||
WeaponNBT.setFireLevel(outputStack, WeaponNBT.getFireLevel(inputStack) + 1);
|
||||
WeaponNBT.setModifiers(outputStack, WeaponNBT.getModifiers(inputStack) + 1);
|
||||
}
|
||||
if (a.getItem() instanceof CustomHoe) {
|
||||
doQuickNBT(event, i, a);
|
||||
PlayerHelper.spawnItemOnPlayer(event.player.world, event.player, new ItemStack(PrimalAPI.Items.LACQUER_STICK, 1));
|
||||
if (RecipeHelper.isOreName(modStack, "gemLapis")) {
|
||||
WeaponNBT.setFortuneLevel(outputStack, WeaponNBT.getFortuneLevel(inputStack) + 1);
|
||||
WeaponNBT.setModifiers(outputStack, WeaponNBT.getModifiers(inputStack) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,28 +80,15 @@ public class CommonEvents implements ToolNBT {
|
||||
}
|
||||
}
|
||||
|
||||
private void doQuickNBT(PlayerEvent.ItemCraftedEvent event, Integer i, ItemStack a){
|
||||
NBTTagCompound tempTag;
|
||||
tempTag = a.getSubCompound("tags").copy();
|
||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||
Integer tempDamage = event.craftMatrix.getStackInSlot(i).getItemDamage();
|
||||
event.crafting.setItemDamage(tempDamage);
|
||||
}
|
||||
private ItemStack getOppositeStack(NonNullList<ItemStack> inputList, ItemStack inputStack){
|
||||
ItemStack modStack = ItemStack.EMPTY;
|
||||
|
||||
private void doToolNBT(PlayerEvent.ItemCraftedEvent event) {
|
||||
NBTTagCompound tempTag;
|
||||
for (int i = 0; i < event.craftMatrix.getSizeInventory(); i++) { // Checks all the slots
|
||||
|
||||
if (event.craftMatrix.getStackInSlot(i) != null) { // If there is an item
|
||||
ItemStack a = event.craftMatrix.getStackInSlot(i); // Gets the item
|
||||
if (a.getItem() instanceof ToolPart) {
|
||||
tempTag = a.getSubCompound("tags").copy();
|
||||
event.crafting.getTagCompound().setTag("tags", tempTag);
|
||||
event.crafting.getItem().updateItemStackNBT(event.crafting.getTagCompound());
|
||||
event.crafting.setItemDamage(event.craftMatrix.getStackInSlot(i).getItemDamage());
|
||||
}
|
||||
for (int i = 0; i < inputList.size(); i++) {
|
||||
if(inputList.get(i) != ItemStack.EMPTY && !(inputList.get(i).getItem() instanceof WeaponPart) ){
|
||||
modStack = inputList.get(i);
|
||||
}
|
||||
}
|
||||
return modStack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,10 +52,11 @@ public class ForgeCraft
|
||||
ModBlocks.register();
|
||||
ModItems.init();
|
||||
ModItems.register();
|
||||
|
||||
ModDictionary.registerDictionaryNames();
|
||||
ModTiles.registerTileEntities();
|
||||
ModSounds.registerSounds();
|
||||
ModEvents.registerCommonEvents();
|
||||
ModCrafting.register();
|
||||
|
||||
//ModEvents.registerClientEvents();
|
||||
// ModItems.registerRenders();
|
||||
proxy.preInit();
|
||||
@@ -67,8 +68,8 @@ public class ForgeCraft
|
||||
{
|
||||
//this.proxy.init(event);
|
||||
proxy.init();
|
||||
ModDictionary.registerDictionaryNames();
|
||||
ModCrafting.register();
|
||||
|
||||
|
||||
|
||||
//proxy.registerModelBakeryVariants();
|
||||
}
|
||||
@@ -76,7 +77,7 @@ public class ForgeCraft
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
//this.proxy.postInit(event);
|
||||
ModEvents.registerCommonEvents();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@@ -6,7 +6,9 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.forgecraft.blocks.machine.MachineSaw;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import nmd.primal.forgecraft.crafting.MachineSawCrafting;
|
||||
import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
//import nmd.primal.forgecraft.Item.ModItems;
|
||||
@@ -22,7 +24,7 @@ public class ModInfo {
|
||||
//public static final String MOD_PREFIX = MOD_ID + ":";
|
||||
public static final String MOD_CHANNEL = MOD_ID;
|
||||
|
||||
public static final String MOD_VERSION = "1.6.31";
|
||||
public static final String MOD_VERSION = "1.6.51";
|
||||
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
|
||||
public static final String DEPENDENCIES = "required-after:forge@[14.21.1.2400,);" + "required-after:primal@[0.6.69,);";
|
||||
|
||||
@@ -57,6 +59,7 @@ public class ModInfo {
|
||||
// In-World Recipes
|
||||
public static final IForgeRegistry<CrucibleCrafting> CRUCIBLE_CRAFTING = GameRegistry.findRegistry(CrucibleCrafting.class);
|
||||
public static final IForgeRegistry<WorkbenchCrafting> WORKBENCH_CRAFTING = GameRegistry.findRegistry(WorkbenchCrafting.class);
|
||||
public static final IForgeRegistry<MachineSawCrafting> MACHINE_SAW_CRAFTING = GameRegistry.findRegistry(MachineSawCrafting.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package nmd.primal.forgecraft.blocks;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.tiles.TileBaseSlot;
|
||||
|
||||
/**
|
||||
* Created by kitsu on 12/3/2016.
|
||||
*/
|
||||
public abstract class CustomContainerFacingActive extends BlockContainer {
|
||||
|
||||
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
|
||||
|
||||
protected CustomContainerFacingActive(Material material, String registryName)
|
||||
{
|
||||
super(material);
|
||||
this.setRegistryName(registryName);
|
||||
this.setUnlocalizedName(registryName);
|
||||
this.setHardness(3.0f);
|
||||
this.setResistance(4.0f);
|
||||
setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
|
||||
{
|
||||
super.breakBlock(worldIn, pos, state);
|
||||
worldIn.removeTileEntity(pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||
{
|
||||
//if(!worldIn.isRemote) {
|
||||
worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()).withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
//}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
int i = 0;
|
||||
|
||||
if(!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
if (state.getValue(FACING) == EnumFacing.EAST) {
|
||||
i = 0;
|
||||
return i;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.WEST) {
|
||||
i = 1;
|
||||
return i;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.SOUTH) {
|
||||
i = 2;
|
||||
return i;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
||||
i = 3;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
if (state.getValue(FACING) == EnumFacing.EAST) {
|
||||
i = 4;
|
||||
return i;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.WEST) {
|
||||
i = 5;
|
||||
return i;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.SOUTH) {
|
||||
i = 6;
|
||||
return i;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
||||
i = 7;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
IBlockState iblockstate = this.getDefaultState();
|
||||
|
||||
if (meta == 0){
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalAPI.States.ACTIVE, false);
|
||||
}
|
||||
if (meta == 1) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalAPI.States.ACTIVE, false);
|
||||
}
|
||||
if (meta == 2) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalAPI.States.ACTIVE, false);
|
||||
}
|
||||
if (meta == 3) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, false);
|
||||
}
|
||||
if (meta == 4){
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.EAST).withProperty(PrimalAPI.States.ACTIVE, true);
|
||||
}
|
||||
if (meta == 5) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.WEST).withProperty(PrimalAPI.States.ACTIVE, true);
|
||||
}
|
||||
if (meta == 6) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.SOUTH).withProperty(PrimalAPI.States.ACTIVE, true);
|
||||
}
|
||||
if (meta == 7) {
|
||||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.NORTH).withProperty(PrimalAPI.States.ACTIVE, true);
|
||||
}
|
||||
return iblockstate;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, new IProperty[] {FACING, PrimalAPI.States.ACTIVE});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumBlockRenderType getRenderType(IBlockState state)
|
||||
{
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.blocks;
|
||||
package nmd.primal.forgecraft.blocks.anvil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.blocks;
|
||||
package nmd.primal.forgecraft.blocks.anvil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.blocks;
|
||||
package nmd.primal.forgecraft.blocks.anvil;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 6/10/17.
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.blocks;
|
||||
package nmd.primal.forgecraft.blocks.anvil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -0,0 +1,27 @@
|
||||
package nmd.primal.forgecraft.blocks.fluids;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import nmd.primal.core.common.fluids.AbstractFluidBlock;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
public class BasicFluidBlockKFC extends AbstractFluidBlock {
|
||||
|
||||
|
||||
private boolean isSolidTexture;
|
||||
private boolean isBurning;
|
||||
|
||||
public BasicFluidBlockKFC(Fluid fluid, Material material, boolean isSolidTexture, boolean isBurning)
|
||||
{
|
||||
super(fluid, material);
|
||||
this.isSolidTexture = isSolidTexture;
|
||||
this.isBurning = isBurning;
|
||||
}
|
||||
|
||||
public BasicFluidBlockKFC(Fluid fluid, Material material)
|
||||
{
|
||||
this(fluid, material, false, false);
|
||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,18 +26,18 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.crafting.handlers.inworld.FireSource;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.recipes.inworld.FireSource;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import nmd.primal.forgecraft.items.SlottedTongs;
|
||||
import nmd.primal.forgecraft.items.misc.SlottedTongs;
|
||||
import nmd.primal.forgecraft.tiles.TileBloomery;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
import static nmd.primal.forgecraft.items.SlottedTongs.ITEM_HANDLER;
|
||||
import static nmd.primal.forgecraft.items.misc.SlottedTongs.ITEM_HANDLER;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 6/11/17.
|
||||
|
||||
@@ -30,12 +30,12 @@ import nmd.primal.forgecraft.crafting.CastingCrafting;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.SlottedTongs;
|
||||
import nmd.primal.forgecraft.items.misc.SlottedTongs;
|
||||
import nmd.primal.forgecraft.tiles.TileCastingForm;
|
||||
import nmd.primal.forgecraft.util.CastingFormHandler;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
|
||||
import static nmd.primal.forgecraft.items.SlottedTongs.ITEM_HANDLER;
|
||||
import static nmd.primal.forgecraft.items.misc.SlottedTongs.ITEM_HANDLER;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 6/19/17.
|
||||
|
||||
@@ -23,8 +23,8 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.crafting.handlers.inworld.FireSource;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.recipes.inworld.FireSource;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||
import nmd.primal.forgecraft.tiles.TileForge;
|
||||
@@ -176,7 +176,9 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider,
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************
|
||||
PUT STUFF ON TOP
|
||||
***********************/
|
||||
if (facing == EnumFacing.UP) {
|
||||
doForgeInventoryManager(pItem, world, tile, pos, hitX, hitY, hitZ, state, player);
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
package nmd.primal.forgecraft.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacingActive;
|
||||
import nmd.primal.forgecraft.crafting.MachineSawCrafting;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.tiles.TileMachineSaw;
|
||||
import nmd.primal.forgecraft.tiles.TileRedstoneEngine;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
public class MachineSaw extends CustomContainerFacingActive {
|
||||
|
||||
public MachineSaw(Material material, String registryName) {
|
||||
super(material, registryName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if (!world.isRemote) {
|
||||
if (hand.equals(EnumHand.MAIN_HAND)) {
|
||||
TileMachineSaw tile = (TileMachineSaw) world.getTileEntity(pos);
|
||||
ItemStack playerStack = player.getHeldItem(hand);
|
||||
|
||||
if (tile.isItemValidForSlot(0, playerStack)) {
|
||||
ItemStack setStack = playerStack.copy();
|
||||
setStack.setCount(1);
|
||||
tile.setSlotStack(0, setStack);
|
||||
playerStack.shrink(1);
|
||||
return true;
|
||||
}
|
||||
if(playerStack.isEmpty()){
|
||||
if(player.isSneaking()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.slotList);
|
||||
tile.clearSlots();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
if (!world.isRemote) {
|
||||
TileMachineSaw tile = (TileMachineSaw) world.getTileEntity(pos);
|
||||
|
||||
if(state.getValue(FACING).equals (EnumFacing.NORTH)){
|
||||
if(world.getBlockState(pos.west()).getBlock().equals(ModBlocks.redstoneengine)){
|
||||
updateValues(world, pos, tile, state, pos.west());
|
||||
sawThings(world, pos, state, tile, fromPos);
|
||||
}
|
||||
|
||||
}
|
||||
if(state.getValue(FACING).equals (EnumFacing.SOUTH)){
|
||||
if(world.getBlockState(pos.east()).getBlock().equals(ModBlocks.redstoneengine)){
|
||||
updateValues(world, pos, tile, state, pos.east());
|
||||
sawThings(world, pos, state, tile, fromPos);
|
||||
}
|
||||
}
|
||||
if(state.getValue(FACING).equals (EnumFacing.EAST)){
|
||||
if(world.getBlockState(pos.north()).getBlock().equals(ModBlocks.redstoneengine)){
|
||||
updateValues(world, pos, tile, state, pos.north());
|
||||
sawThings(world, pos, state, tile, fromPos);
|
||||
}
|
||||
}
|
||||
if(state.getValue(FACING).equals (EnumFacing.WEST)){
|
||||
if(world.getBlockState(pos.south()).getBlock().equals(ModBlocks.redstoneengine)){
|
||||
updateValues(world, pos, tile, state, pos.south());
|
||||
sawThings(world, pos, state, tile, fromPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||
return new TileMachineSaw();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
{
|
||||
this.onBlockHarvested(world, pos, state, player);
|
||||
return this.destroyBlock(world, pos, state, EnumFacing.UP, player);
|
||||
}
|
||||
|
||||
public boolean destroyBlock(World world, BlockPos pos, IBlockState state, EnumFacing face, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileRedstoneEngine) {
|
||||
//PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getCrucibleItem(world, pos, state, player));
|
||||
ItemStack dropStack = new ItemStack(ModBlocks.redstoneengine, 1);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
|
||||
//world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
|
||||
world.setBlockToAir(pos);
|
||||
world.markTileEntityForRemoval(tile);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote) {
|
||||
TileRedstoneEngine tile = (TileRedstoneEngine) world.getTileEntity(pos);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotList());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void sawThings(World world, BlockPos pos, IBlockState state, TileMachineSaw tile, BlockPos fromPos){
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) && tile.getTransfer() ){
|
||||
if(fromPos.equals(pos.up())) {
|
||||
IBlockState sawState = world.getBlockState(fromPos);
|
||||
ItemStack sawStack = new ItemStack(Item.getItemFromBlock(sawState.getBlock()), 1, sawState.getBlock().getMetaFromState(sawState));
|
||||
MachineSawCrafting recipe = MachineSawCrafting.getRecipe(sawStack);
|
||||
if(recipe != null){
|
||||
if(!recipe.isDisabled()) {
|
||||
if(PrimalAPI.randomCheck(15-tile.getRedstone())){
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(state.getValue(FACING)), recipe.getOutput());
|
||||
world.destroyBlock(pos.up(), false);
|
||||
} else {
|
||||
world.destroyBlock(pos.up(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setValues(TileMachineSaw tile, TileRedstoneEngine tileRedstoneEngine){
|
||||
tile.setPower(tileRedstoneEngine.getPower());
|
||||
tile.setTorque(tileRedstoneEngine.getTorque());
|
||||
tile.setRpm(tileRedstoneEngine.getRPM());
|
||||
tile.setRedstone(tileRedstoneEngine.getRedstone());
|
||||
tile.setGearMulti(tileRedstoneEngine.getGearMulti());
|
||||
tile.setTransfer(tileRedstoneEngine.getTransfer());
|
||||
}
|
||||
|
||||
private void clearValues(TileMachineSaw tile, TileRedstoneEngine tileRedstoneEngine){
|
||||
tile.setPower(0);
|
||||
tile.setTorque(0);
|
||||
tile.setRpm(0);
|
||||
tile.setRedstone(0);
|
||||
tile.setTransfer(tileRedstoneEngine.getTransfer());
|
||||
}
|
||||
|
||||
private void updateValues(World world, BlockPos pos, TileMachineSaw tile, IBlockState state, BlockPos offsetPos){
|
||||
TileRedstoneEngine tileEngine = (TileRedstoneEngine) world.getTileEntity(offsetPos);
|
||||
if(world.getBlockState(offsetPos).getValue(PrimalAPI.States.ACTIVE) && tileEngine.getTransfer()){
|
||||
setValues(tile, tileEngine);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
}
|
||||
if(!world.getBlockState(offsetPos).getValue(PrimalAPI.States.ACTIVE) || !tileEngine.getTransfer()){
|
||||
clearValues(tile, tileEngine);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
tile.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
package nmd.primal.forgecraft.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ItemStackHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacingActive;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.tiles.TileRedstoneEngine;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
public class RedstoneEngine extends CustomContainerFacingActive {
|
||||
|
||||
protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0/16D, 0/16D, 0/16D, 10/16D, 27 / 32D, 16/16D);
|
||||
protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(6/16D, 6/16D, 0/16D, 1, 27 / 32D, 16/16D);
|
||||
protected static final AxisAlignedBB boundBoxEast = new AxisAlignedBB(0/16D, 0/16D, 0/16D, 16/16D, 27 / 32D, 10/16D);
|
||||
protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(0/16D, 0/16D, 6/16D, 1, 27 / 32D, 16/16D);
|
||||
|
||||
public RedstoneEngine(Material material, String registryName) {
|
||||
super(material, registryName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if(!world.isRemote) {
|
||||
if(hand.equals(EnumHand.MAIN_HAND)) {
|
||||
TileRedstoneEngine tile = (TileRedstoneEngine) world.getTileEntity(pos);
|
||||
ItemStack playerStack = player.getHeldItem(hand);
|
||||
Chunk chunk = world.getChunkFromBlockCoords(pos);
|
||||
|
||||
if(tile.isItemValidForSlot(0, playerStack)){
|
||||
ItemStack setStack = playerStack.copy();
|
||||
setStack.setCount(1);
|
||||
tile.setSlotStack(0, setStack);
|
||||
playerStack.shrink(1);
|
||||
return true;
|
||||
}
|
||||
if(tile.isItemValidForSlot(1, playerStack)){
|
||||
ItemStack setStack = playerStack.copy();
|
||||
setStack.setCount(1);
|
||||
tile.setSlotStack(1, setStack);
|
||||
playerStack.shrink(1);
|
||||
tile.setTransfer(true);
|
||||
|
||||
if( world.getRedstonePower(pos.down(), EnumFacing.UP)>0 ||
|
||||
world.getRedstonePower(pos.offset(state.getValue(FACING).getOpposite()), state.getValue(FACING))>0 ) {
|
||||
if(world.getRedstonePower(pos.down(), EnumFacing.UP) > world.getRedstonePower(pos.offset(state.getValue(FACING).getOpposite()), state.getValue(FACING))){
|
||||
tile.setRedstone(world.getRedstonePower(pos.down(), EnumFacing.UP));
|
||||
} else {
|
||||
tile.setRedstone(world.getRedstonePower(pos.offset(state.getValue(FACING).getOpposite()), state.getValue(FACING)));
|
||||
}
|
||||
tile.setPower();
|
||||
this.setValues(tile);
|
||||
}
|
||||
world.markAndNotifyBlock(pos, chunk, state, state, 3);
|
||||
return true;
|
||||
}
|
||||
if(playerStack.isEmpty()){
|
||||
if(player.isSneaking()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.slotList);
|
||||
tile.clearSlots();
|
||||
tile.setTransfer(false);
|
||||
world.markAndNotifyBlock(pos, chunk, state, state, 3);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) {
|
||||
if (!world.isRemote) {
|
||||
TileRedstoneEngine tile = (TileRedstoneEngine) world.getTileEntity(pos);
|
||||
if (fromPos.equals(pos.down()) || fromPos.equals(pos.offset(state.getValue(FACING).getOpposite()))) {
|
||||
if (world.isBlockIndirectlyGettingPowered(pos)>0) {
|
||||
int power = world.isBlockIndirectlyGettingPowered(pos);
|
||||
tile.setRedstone(power);
|
||||
tile.setPower();
|
||||
this.setValues(tile);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 3);
|
||||
}
|
||||
if (!world.isBlockPowered(pos)) {
|
||||
tile.setRedstone(0);
|
||||
tile.setPower();
|
||||
this.setValues(tile);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
{
|
||||
this.onBlockHarvested(world, pos, state, player);
|
||||
return this.destroyBlock(world, pos, state, EnumFacing.UP, player);
|
||||
}
|
||||
|
||||
public boolean destroyBlock(World world, BlockPos pos, IBlockState state, EnumFacing face, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileRedstoneEngine) {
|
||||
//PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getCrucibleItem(world, pos, state, player));
|
||||
ItemStack dropStack = new ItemStack(ModBlocks.redstoneengine, 1);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
|
||||
//world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
|
||||
world.setBlockToAir(pos);
|
||||
world.markTileEntityForRemoval(tile);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote) {
|
||||
TileRedstoneEngine tile = (TileRedstoneEngine) world.getTileEntity(pos);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotList());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{
|
||||
if(state.getValue(FACING).equals(EnumFacing.NORTH)){
|
||||
return boundBoxNorth;
|
||||
}
|
||||
if(state.getValue(FACING).equals(EnumFacing.SOUTH)){
|
||||
return boundBoxSouth;
|
||||
}
|
||||
if(state.getValue(FACING).equals(EnumFacing.EAST)){
|
||||
return boundBoxEast;
|
||||
}
|
||||
if(state.getValue(FACING).equals(EnumFacing.WEST)){
|
||||
return boundBoxWest;
|
||||
}
|
||||
return boundBoxNorth;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||
return new TileRedstoneEngine();
|
||||
}
|
||||
|
||||
private void setValues(TileRedstoneEngine tile){
|
||||
if(!tile.getSlotStack(0).isEmpty()){
|
||||
NonNullList<ItemStack> gearboxList = NonNullList.<ItemStack>withSize(3, ItemStack.EMPTY);
|
||||
if(tile.getSlotStack(0).getSubCompound("BlockEntityTag") != null) {
|
||||
ItemStackHelper.loadAllItems(tile.getSlotStack(0).getSubCompound("BlockEntityTag"), gearboxList);
|
||||
if (RecipeHelper.isOreName(gearboxList.get(0), "gearPrimalMedium") &&
|
||||
RecipeHelper.isOreName(gearboxList.get(1), "gearPrimalMedium") &&
|
||||
RecipeHelper.isOreName(gearboxList.get(2), "gearboxCoverPrimal")) {
|
||||
tile.setRPM(1200F/(60-2*tile.getRedstone()));
|
||||
tile.setTorque(tile.getPower()/tile.getRPM());
|
||||
tile.setGearMulti(1F);
|
||||
}
|
||||
if (RecipeHelper.isOreName(gearboxList.get(0), "gearPrimalSmall") &&
|
||||
RecipeHelper.isOreName(gearboxList.get(1), "gearPrimalLarge") &&
|
||||
RecipeHelper.isOreName(gearboxList.get(2), "gearboxCoverPrimal")) {
|
||||
tile.setRPM((1200F/(60-2*tile.getRedstone()))*4);
|
||||
tile.setTorque(tile.getPower()/tile.getRPM());
|
||||
tile.setGearMulti(4F);
|
||||
}
|
||||
if (RecipeHelper.isOreName(gearboxList.get(0), "gearPrimalLarge") &&
|
||||
RecipeHelper.isOreName(gearboxList.get(1), "gearPrimalSmall") &&
|
||||
RecipeHelper.isOreName(gearboxList.get(2), "gearboxCoverPrimal")) {
|
||||
|
||||
tile.setRPM((1200F/(60-2*tile.getRedstone()))/4);
|
||||
tile.setTorque(tile.getPower()/tile.getRPM());
|
||||
tile.setGearMulti(0.25F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package nmd.primal.forgecraft.blocks.machine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacingActive;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||
import nmd.primal.forgecraft.items.weapons.CustomSword;
|
||||
import nmd.primal.forgecraft.items.weapons.SlayerSword;
|
||||
import nmd.primal.forgecraft.tiles.TileSharpBench;
|
||||
import nmd.primal.forgecraft.util.WeaponNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class SharpBench extends CustomContainerFacingActive {
|
||||
|
||||
|
||||
protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.28125D, 0.0D, 1/16D, 0.71875D, 11 / 16D, 11 / 16D);
|
||||
protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.28125D, 0.0D, 5/16D, 0.71875D, 11 / 16D, 15 / 16D);
|
||||
protected static final AxisAlignedBB boundBoxEast = new AxisAlignedBB(5/16D, 0.0D, 0.28125D, 15/16D, 11 / 16D, 0.71875D);
|
||||
protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(1/16D, 0.0D, 0.28125D, 11/16D, 11 / 16D, 0.71875D);
|
||||
|
||||
public SharpBench(Material material, String registryName) {
|
||||
super(material, registryName);
|
||||
this.setHardness(4.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
if(player.getActiveHand().equals(EnumHand.MAIN_HAND)) {
|
||||
TileSharpBench tile = (TileSharpBench) world.getTileEntity(pos);
|
||||
if(player.getHeldItemMainhand().isEmpty()) {
|
||||
if(tile.getSlotStack(0).getItem().equals(ModItems.grindingwheel)) {
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
if (tile.getCharge() < 15) {
|
||||
tile.setCharge(tile.getCharge() + 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(player.getHeldItemMainhand().getItem().equals(ModItems.grindingwheel)) {
|
||||
tile.setSlotStack(0, player.getHeldItemMainhand().copy());
|
||||
player.getHeldItemMainhand().shrink(1);
|
||||
return true;
|
||||
}
|
||||
if(player.getHeldItemMainhand().isEmpty()) {
|
||||
if(player.isSneaking()){
|
||||
if(tile.getSlotStack(0).getItem().equals(ModItems.grindingwheel)){
|
||||
PlayerHelper.spawnItemOnGround(world, pos, tile.getSlotStack(0));
|
||||
tile.clearSlot(0);
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity ent)
|
||||
{
|
||||
|
||||
if(ent instanceof EntityPlayer){
|
||||
EntityPlayer player = (EntityPlayer) ent;
|
||||
TileSharpBench tile = (TileSharpBench) world.getTileEntity(pos);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) && tile.getSlotStack(0).getItem().equals(ModItems.grindingwheel)){
|
||||
ItemStack playerStack = player.inventory.getCurrentItem();
|
||||
if(
|
||||
playerStack.getItem() instanceof CustomSword ||
|
||||
playerStack.getItem() instanceof ToolPart
|
||||
){
|
||||
if(playerStack.getItemDamage() > 0){
|
||||
if (!world.isRemote) {
|
||||
if (PrimalAPI.getRandom().nextInt(1, 3) == 1) {
|
||||
playerStack.setItemDamage(playerStack.getItemDamage() - 1);
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
if(tile.getSlotStack(0).getItemDamage()>= tile.getSlotStack(0).getMaxDamage()){
|
||||
tile.clearSlot(0);
|
||||
}
|
||||
if(playerStack.getItem() instanceof CustomSword) {
|
||||
WeaponNBT.removeAndSetEnchantsForStack(playerStack);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (world.isRemote) {
|
||||
makeSparks(world, pos, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||
return new TileSharpBench();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{
|
||||
state = state.getActualState(source, pos);
|
||||
EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
|
||||
|
||||
switch (enumfacing)
|
||||
{
|
||||
case EAST:
|
||||
default:
|
||||
return boundBoxEast;
|
||||
case SOUTH:
|
||||
return boundBoxSouth;
|
||||
case WEST:
|
||||
return boundBoxWest;
|
||||
case NORTH:
|
||||
return boundBoxNorth;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops"))
|
||||
{
|
||||
TileSharpBench tile = (TileSharpBench) world.getTileEntity(pos);
|
||||
if (tile !=null)
|
||||
{
|
||||
for (ItemStack stack : tile.getSlotList())
|
||||
{
|
||||
if (stack != null) {
|
||||
float offset = 0.7F;
|
||||
double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||
double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||
double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||
EntityItem item = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, stack);
|
||||
item.setDefaultPickupDelay();
|
||||
world.spawnEntity(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
super.breakBlock(world, pos, state);
|
||||
}
|
||||
|
||||
private void makeSparks(World world, BlockPos pos, IBlockState state){
|
||||
double d0 = (double)pos.getX() + 0.5D;
|
||||
double d1 = (double)pos.getY() + 0.75D;
|
||||
double d2 = (double)pos.getZ() + 0.5D;
|
||||
double d3 = 0.52D;
|
||||
//double d4 = PrimalAPI.getRandom().nextDouble(0.066, 0.33);
|
||||
double ySpeed = PrimalAPI.getRandom().nextDouble(0.05, 0.20);
|
||||
double zSpeed = PrimalAPI.getRandom().nextDouble(0.05, 0.20);
|
||||
if(state.getValue(FACING) == EnumFacing.NORTH) {
|
||||
world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, d0, d1, d2, 0.0D, ySpeed, -zSpeed, new int[0]);
|
||||
}
|
||||
if(state.getValue(FACING) == EnumFacing.SOUTH) {
|
||||
world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, d0, d1, d2, 0.0D, ySpeed, zSpeed, new int[0]);
|
||||
}
|
||||
if(state.getValue(FACING) == EnumFacing.EAST) {
|
||||
world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, d0, d1, d2, zSpeed, ySpeed, 0.0D, new int[0]);
|
||||
}
|
||||
if(state.getValue(FACING) == EnumFacing.WEST) {
|
||||
world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, d0, d1, d2, -zSpeed, ySpeed, 0.0D, new int[0]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package nmd.primal.forgecraft.blocks.machine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -13,6 +14,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.items.tools.Gallagher;
|
||||
import nmd.primal.core.common.items.tools.WorkBlade;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||
import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
|
||||
import nmd.primal.forgecraft.tiles.TileWorkbench;
|
||||
@@ -36,7 +38,7 @@ public class Workbench extends CustomContainerFacing {
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
if (hand.equals(hand.MAIN_HAND) ) {
|
||||
if(player.getActiveHand().equals(EnumHand.MAIN_HAND)) {
|
||||
|
||||
TileWorkbench tile = (TileWorkbench) world.getTileEntity(pos);
|
||||
ItemStack playerStack = player.inventory.getCurrentItem();
|
||||
@@ -51,13 +53,17 @@ public class Workbench extends CustomContainerFacing {
|
||||
ItemStack slot6 = tile.getSlotStack(6);
|
||||
if (hitY > 0.5D) {
|
||||
if (!player.isSneaking()) {
|
||||
/*if (tile.isItemValidForSlot(6, playerStack)) {
|
||||
if (tile.isItemValidForSlot(6, playerStack)) {
|
||||
if (slot6.isEmpty()) {
|
||||
tile.setSlotStack(6, playerStack.splitStack(1));
|
||||
//player.inventory.getCurrentItem().shrink(1);
|
||||
return true;
|
||||
if (slot2.isEmpty() && slot3.isEmpty() && slot4.isEmpty() && slot5.isEmpty()) {
|
||||
ItemStack tempStack = player.inventory.getCurrentItem().copy();
|
||||
tempStack.setCount(1);
|
||||
tile.setSlotStack(6, tempStack);
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if(! (playerStack.getItem() instanceof Gallagher)) {
|
||||
if (slot4.isEmpty() && slot3.isEmpty() && slot2.isEmpty()) {
|
||||
if (tile.isItemValidForSlot(5, playerStack)) {
|
||||
@@ -68,32 +74,34 @@ public class Workbench extends CustomContainerFacing {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tile.isItemValidForSlot(4, playerStack)) {
|
||||
if (slot4.isEmpty()) {
|
||||
tile.setSlotStack(4, playerStack.splitStack(1));
|
||||
//player.inventory.getCurrentItem().shrink(1);
|
||||
return true;
|
||||
if(slot5.isEmpty()) {
|
||||
if (tile.isItemValidForSlot(4, playerStack)) {
|
||||
if (slot4.isEmpty()) {
|
||||
tile.setSlotStack(4, playerStack.splitStack(1));
|
||||
//player.inventory.getCurrentItem().shrink(1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tile.isItemValidForSlot(3, playerStack)) {
|
||||
if (slot3.isEmpty()) {
|
||||
tile.setSlotStack(3, playerStack.splitStack(1));
|
||||
//player.inventory.getCurrentItem().shrink(1);
|
||||
return true;
|
||||
if (tile.isItemValidForSlot(3, playerStack)) {
|
||||
if (slot3.isEmpty()) {
|
||||
tile.setSlotStack(3, playerStack.splitStack(1));
|
||||
//player.inventory.getCurrentItem().shrink(1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tile.isItemValidForSlot(2, playerStack)) {
|
||||
if (slot2.isEmpty()) {
|
||||
tile.setSlotStack(2, playerStack.splitStack(1));
|
||||
//player.inventory.getCurrentItem().shrink(1);
|
||||
return true;
|
||||
if (tile.isItemValidForSlot(2, playerStack)) {
|
||||
if (slot2.isEmpty()) {
|
||||
tile.setSlotStack(2, playerStack.splitStack(1));
|
||||
//player.inventory.getCurrentItem().shrink(1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(playerStack.getItem() instanceof Gallagher) {
|
||||
if (!slot2.isEmpty() && !slot3.isEmpty() && !slot4.isEmpty() && slot5.isEmpty()) {
|
||||
WorkbenchCrafting recipe = WorkbenchCrafting.getRecipe(slot2, slot3, slot4, slot5);
|
||||
System.out.println(slot5);
|
||||
if(player.inventory.getCurrentItem().getItem() instanceof Gallagher || player.inventory.getCurrentItem().getItem() instanceof WorkBlade) {
|
||||
if (slot5.isEmpty()) {
|
||||
|
||||
WorkbenchCrafting recipe = WorkbenchCrafting.getRecipe(slot2, slot3, slot4, slot5, player.inventory.getCurrentItem());
|
||||
if (recipe != null) {
|
||||
ItemStack drops = recipe.getOutput();
|
||||
if (slot3.hasTagCompound()) {
|
||||
@@ -109,7 +117,7 @@ public class Workbench extends CustomContainerFacing {
|
||||
}
|
||||
}
|
||||
if (slot2.isEmpty() && slot3.isEmpty() && slot4.isEmpty() && !slot5.isEmpty()) {
|
||||
WorkbenchCrafting recipe = WorkbenchCrafting.getRecipe(slot2, slot3, slot4, slot5);
|
||||
WorkbenchCrafting recipe = WorkbenchCrafting.getRecipe(slot2, slot3, slot4, slot5, player.inventory.getCurrentItem());
|
||||
if (recipe != null) {
|
||||
ItemStack drops = recipe.getOutput();
|
||||
if (slot5.hasTagCompound()) {
|
||||
@@ -126,27 +134,33 @@ public class Workbench extends CustomContainerFacing {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(player.isSneaking()){
|
||||
if(player.isSneaking() && player.inventory.getCurrentItem().isEmpty()){
|
||||
if(!slot6.isEmpty()){
|
||||
PlayerHelper.spawnItemOnGround(world, pos, tile.getSlotStack(6));
|
||||
tile.clearSlot(6);
|
||||
return true;
|
||||
}
|
||||
if(!slot2.isEmpty()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, slot2);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(2));
|
||||
tile.clearSlot(2);
|
||||
return true;
|
||||
}
|
||||
if(!slot3.isEmpty()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, slot3);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(3));
|
||||
tile.clearSlot(3);
|
||||
return true;
|
||||
}
|
||||
if(!slot4.isEmpty()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, slot4);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(4));
|
||||
tile.clearSlot(4);
|
||||
return true;
|
||||
}
|
||||
if(!slot5.isEmpty()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, slot5);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(5));
|
||||
tile.clearSlot(5);
|
||||
}
|
||||
if(!slot6.isEmpty()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, slot6);
|
||||
tile.clearSlot(6);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -196,7 +210,7 @@ public class Workbench extends CustomContainerFacing {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean sideInventoryManager(World world, EntityPlayer player, TileWorkbench tile, ItemStack slot, int index)
|
||||
@@ -257,6 +271,31 @@ public class Workbench extends CustomContainerFacing {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
if (!world.isRemote && world.getGameRules().getBoolean("doTileDrops"))
|
||||
{
|
||||
TileWorkbench tile = (TileWorkbench) world.getTileEntity(pos);
|
||||
if (tile !=null)
|
||||
{
|
||||
for (ItemStack stack : tile.getSlotList())
|
||||
{
|
||||
if (stack != null) {
|
||||
float offset = 0.7F;
|
||||
double offsetX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||
double offsetY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||
double offsetZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;
|
||||
EntityItem item = new EntityItem(world, pos.getX() + offsetX, pos.getY() + offsetY, pos.getZ() + offsetZ, stack);
|
||||
item.setDefaultPickupDelay();
|
||||
world.spawnEntity(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
super.breakBlock(world, pos, state);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.blocks;
|
||||
package nmd.primal.forgecraft.blocks.misc;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
@@ -24,8 +24,10 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.blocks.CustomFacing;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.items.SledgeHammer;
|
||||
import nmd.primal.forgecraft.items.misc.SledgeHammer;
|
||||
import nmd.primal.forgecraft.util.ToolMaterialMap;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -146,6 +148,13 @@ public class Chisel extends CustomFacing implements ToolMaterialMap {
|
||||
ItemStack playerStack = player.inventory.getCurrentItem();
|
||||
ItemStack offStack = player.inventory.offHandInventory.get(0);
|
||||
int toolHarvestLevel = playerStack.getItem().getHarvestLevel(playerStack, "pickaxe", player, state);
|
||||
if(player.getActiveItemStack().isEmpty()){
|
||||
if(player.isSneaking()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, new ItemStack(Item.getItemFromBlock(state.getBlock()), 1));
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (hand.equals(hand.MAIN_HAND) && offStack == ItemStack.EMPTY) {
|
||||
if(!player.isSwingInProgress) {
|
||||
if(player.getActivePotionEffect(MobEffects.MINING_FATIGUE ) == null){
|
||||
@@ -427,7 +436,7 @@ public class Chisel extends CustomFacing implements ToolMaterialMap {
|
||||
private void doDamaging(World world, BlockPos movePos, IBlockState state, EntityPlayer player){
|
||||
if (!(state.getBlock().equals(Blocks.AIR))) {
|
||||
if(world.getBlockState(movePos).getBlock().blockHardness>0) {
|
||||
world.sendBlockBreakProgress(player.getEntityId() + PrimalAPI.getRandom().nextInt(100), movePos, PrimalAPI.getRandom().nextInt(3,10));
|
||||
world.sendBlockBreakProgress(player.getEntityId() - PrimalAPI.getRandom().nextInt(100), movePos, PrimalAPI.getRandom().nextInt(3,10));
|
||||
}
|
||||
}
|
||||
}
|
||||
262
kfc/src/main/java/nmd/primal/forgecraft/blocks/misc/Gearbox.java
Normal file
262
kfc/src/main/java/nmd/primal/forgecraft/blocks/misc/Gearbox.java
Normal file
@@ -0,0 +1,262 @@
|
||||
package nmd.primal.forgecraft.blocks.misc;
|
||||
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.common.helper.NBTHelper;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||
import nmd.primal.forgecraft.tiles.TileGearbox;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
/**
|
||||
* Created by mminaie on 11/11/17.
|
||||
*/
|
||||
public class Gearbox extends CustomContainerFacing implements ITileEntityProvider {
|
||||
|
||||
protected static final AxisAlignedBB northBox = new AxisAlignedBB(2/16D, 0.0D, 7/16D, 16/16D, 9/16D, 10/16D);
|
||||
protected static final AxisAlignedBB southBox = new AxisAlignedBB(0/16D, 0.0D, 6/16D, 14/16D, 9/16D, 9/16D);
|
||||
protected static final AxisAlignedBB eastBox = new AxisAlignedBB(6/16D, 0.0D, 2/16D, 9/16D, 9/16D, 16/16D);
|
||||
protected static final AxisAlignedBB westBox = new AxisAlignedBB(7/16D, 0.0D, 0/16D, 10/16D, 9/16D, 14/16D);
|
||||
//private Ingredient crucibleIngredients;
|
||||
|
||||
public Gearbox(Material material, String registryName) {
|
||||
super(material, registryName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing face, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
if(hand.equals(EnumHand.MAIN_HAND)) {
|
||||
TileGearbox tile = (TileGearbox) world.getTileEntity(pos);
|
||||
ItemStack slot0 = tile.getSlotStack(0);
|
||||
ItemStack slot1 = tile.getSlotStack(1);
|
||||
ItemStack slot2 = tile.getSlotStack(2);
|
||||
ItemStack playerStack = player.inventory.getCurrentItem().copy();
|
||||
|
||||
if(playerStack.isEmpty()) {
|
||||
if (!player.isSneaking()) {
|
||||
if (!slot0.isEmpty() && !slot1.isEmpty() && !slot2.isEmpty()) {
|
||||
PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getThisItem(world, pos, state, player));
|
||||
world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
|
||||
world.markTileEntityForRemoval(tile);
|
||||
return true;
|
||||
} else {
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(0), tile.getSlotStack(1), tile.getSlotStack(2));
|
||||
tile.clearSlots();
|
||||
PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getThisItem(world, pos, state, player));
|
||||
world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
|
||||
world.markTileEntityForRemoval(tile);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tile.isItemValidForSlot(2, playerStack)) {
|
||||
return sideInventoryManager(world, player, tile, slot2, 2, pos, state);
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
||||
if (slot2.isEmpty()) {
|
||||
if (hitX < 0.5) {
|
||||
return sideInventoryManager(world, player, tile, slot0, 0, pos, state);
|
||||
}
|
||||
if (hitX > 0.5) {
|
||||
return sideInventoryManager(world, player, tile, slot1, 1, pos, state);
|
||||
}
|
||||
}
|
||||
return sideInventoryManager(world, player, tile, slot2, 2, pos, state);
|
||||
//return true;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.SOUTH) {
|
||||
if (slot2.isEmpty()) {
|
||||
if (hitX > 0.5) {
|
||||
return sideInventoryManager(world, player, tile, slot0, 0, pos, state);
|
||||
}
|
||||
if (hitX < 0.5) {
|
||||
return sideInventoryManager(world, player, tile, slot1, 1, pos, state);
|
||||
}
|
||||
}
|
||||
return sideInventoryManager(world, player, tile, slot2, 2, pos, state);
|
||||
//return true;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.EAST) {
|
||||
if (slot2.isEmpty()) {
|
||||
if (hitZ < 0.5) {
|
||||
return sideInventoryManager(world, player, tile, slot0, 0, pos, state);
|
||||
}
|
||||
if (hitZ > 0.5) {
|
||||
return sideInventoryManager(world, player, tile, slot1, 1, pos, state);
|
||||
}
|
||||
}
|
||||
return sideInventoryManager(world, player, tile, slot2, 2, pos, state);
|
||||
//return true;
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.WEST) {
|
||||
if (slot2.isEmpty()) {
|
||||
if (hitZ > 0.5) {
|
||||
return sideInventoryManager(world, player, tile, slot0, 0, pos, state);
|
||||
}
|
||||
if (hitZ < 0.5) {
|
||||
return sideInventoryManager(world, player, tile, slot1, 1, pos, state);
|
||||
}
|
||||
}
|
||||
return sideInventoryManager(world, player, tile, slot2, 2, pos, state);
|
||||
//return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean sideInventoryManager(World world, EntityPlayer player, TileGearbox tile, ItemStack slot, int index, BlockPos pos, IBlockState state)
|
||||
{
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
ItemStack stack = player.getHeldItemMainhand();
|
||||
if (slot.isEmpty()) {
|
||||
if(tile.isItemValidForSlot(index, stack)) {
|
||||
ItemStack setStack = stack.copy();
|
||||
setStack.setCount(1);
|
||||
tile.setSlotStack(index, setStack);
|
||||
player.getHeldItemMainhand().shrink(1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(player.isSneaking()){
|
||||
if(!slot.isEmpty()){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.getSlotStack(index));
|
||||
tile.clearSlot(index);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private IBlockState getReplacementBlock(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
return Blocks.AIR.getDefaultState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
{
|
||||
this.onBlockHarvested(world, pos, state, player);
|
||||
return this.destroyBlock(world, pos, state, EnumFacing.UP, player);
|
||||
}
|
||||
|
||||
public ItemStack getThisItem(World world, BlockPos pos, IBlockState state, EntityPlayer player)
|
||||
{
|
||||
return NBTHelper.getStackBlockNBT(world, pos, state, super.getPickBlock(state, null, world, pos, player));
|
||||
}
|
||||
|
||||
public boolean destroyBlock(World world, BlockPos pos, IBlockState state, EnumFacing face, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileGearbox) {
|
||||
//PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getCrucibleItem(world, pos, state, player));
|
||||
ItemStack dropStack = new ItemStack(this, 1);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, ((TileGearbox) tile).slotList);
|
||||
world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
|
||||
world.markTileEntityForRemoval(tile);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote) {
|
||||
TileGearbox tile = (TileGearbox) world.getTileEntity(pos);
|
||||
//CrucibleCrafting recipe = CrucibleCrafting.getRecipe(tile.ingList.get(0), tile.ingList.get(1), tile.ingList.get(2), tile.ingList.get(3), tile.ingList.get(4));
|
||||
/*if(recipe != null && tile.getStatus() && tile.getHot() == 6){
|
||||
if(tile.getDrops() != null) {
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, recipe.getDropsCooked());
|
||||
} else {
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, recipe.getDropsRaw());
|
||||
}
|
||||
}
|
||||
if(recipe != null && tile.getStatus() && tile.getHot() == 15){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, recipe.getDropsRaw());
|
||||
}
|
||||
if(!tile.getStatus() && tile.getHot() != 15 && tile.getHot() != 6){
|
||||
PlayerHelper.spawnItemOnPlayer(world, player, tile.ingList);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
||||
{
|
||||
// see above onBlockHarvested
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||
{
|
||||
//TileEntity tileentity = world.getTileEntity(pos);
|
||||
//if (tileentity instanceof TileGearbox) {
|
||||
// TileGearbox tile = (TileGearbox) world.getTileEntity(pos);
|
||||
// if(NBTHelper.hasNBT(stack)){
|
||||
// NBTTagCompound tag = stack.getTagCompound();
|
||||
world.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing()), 2);
|
||||
//tile.readNBT(tag);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||
{
|
||||
return new TileGearbox();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{
|
||||
state = state.getActualState(source, pos);
|
||||
EnumFacing enumfacing = state.getValue(FACING);
|
||||
|
||||
switch (enumfacing)
|
||||
{
|
||||
case EAST:
|
||||
default:
|
||||
return eastBox;
|
||||
case SOUTH:
|
||||
return southBox;
|
||||
case WEST:
|
||||
return westBox;
|
||||
case NORTH:
|
||||
return northBox;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.blocks;
|
||||
package nmd.primal.forgecraft.blocks.misc;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.ITileEntityProvider;
|
||||
@@ -23,19 +23,19 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.NBTHelper;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.items.SlottedTongs;
|
||||
import nmd.primal.forgecraft.items.misc.SlottedTongs;
|
||||
import nmd.primal.forgecraft.tiles.TileNBTCrucible;
|
||||
|
||||
import javax.swing.plaf.basic.BasicComboBoxUI;
|
||||
import java.util.Random;
|
||||
|
||||
import static net.minecraft.util.EnumHand.MAIN_HAND;
|
||||
|
||||
|
||||
/**
|
||||
* Created by mminaie on 11/11/17.
|
||||
@@ -57,40 +57,36 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing face, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hands, EnumFacing face, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
|
||||
TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos);
|
||||
|
||||
if(hand.equals(MAIN_HAND)) {
|
||||
|
||||
System.out.println(player.inventory.getCurrentItem());
|
||||
System.out.println(hand);
|
||||
|
||||
ItemStack pItem = player.inventory.getCurrentItem().copy();
|
||||
pItem.setCount(1);
|
||||
if(player.getActiveHand().equals(EnumHand.MAIN_HAND)) {
|
||||
ItemStack playerStackStart = player.getHeldItemMainhand().copy();
|
||||
|
||||
/**PICKS UP THE CRUCIBLE**/
|
||||
if (player.isSneaking() == false) {
|
||||
if (pItem.isEmpty()) {
|
||||
if (playerStackStart.isEmpty()) {
|
||||
if (!player.isSneaking()) {
|
||||
//System.out.println(tile.getHot());
|
||||
CrucibleCrafting recipe = CrucibleCrafting.getRecipe(tile.ingList.get(0), tile.ingList.get(1), tile.ingList.get(2), tile.ingList.get(3), tile.ingList.get(4));
|
||||
|
||||
if (recipe != null) {
|
||||
tile.setDrops(recipe.getDropsRaw());
|
||||
System.out.println(tile.getDrops());
|
||||
//tile.setDrops(recipe.getDropsRaw());
|
||||
}
|
||||
PlayerHelper.playerTakeItem(world, pos, EnumFacing.DOWN, player, player.getActiveHand(), this.getCrucibleItem(world, pos, state, player));
|
||||
//ItemHandlerHelper.giveItemToPlayer(player, this.getCrucibleItem(world, pos, state, player));
|
||||
world.setBlockState(pos, this.getReplacementBlock(world, pos, state));
|
||||
world.markTileEntityForRemoval(tile);
|
||||
//System.out.println(player.getHeldItemMainhand().getTagCompound());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**SET INGREDIENT ARRAY FOR THE CRUCIBLE NOW**/
|
||||
if( player.inventory.getSlotFor(player.inventory.getCurrentItem()) != -1 ) {
|
||||
ItemStack pItem = player.inventory.getCurrentItem().copy();
|
||||
pItem.setCount(1);
|
||||
/**SET INGREDIENT ARRAY FOR THE CRUCIBLE NOW**/
|
||||
if (!player.isSneaking()) {
|
||||
ItemStack pItem = player.inventory.getCurrentItem().copy();
|
||||
pItem.setCount(1);
|
||||
if (!pItem.isEmpty()) {
|
||||
if (!tile.getStatus() || tile.getHot() == 15 || tile.getHot() == 6) {
|
||||
if (pItem.getItem() instanceof SlottedTongs) {
|
||||
@@ -113,9 +109,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**CLEARS THE INVENTORY**/
|
||||
if(hand.equals(MAIN_HAND)) {
|
||||
/**CLEARS THE INVENTORY**/
|
||||
if (player.isSneaking()) {
|
||||
ItemStack pItem = player.inventory.getCurrentItem().copy();
|
||||
if (pItem.isEmpty()) {
|
||||
@@ -137,21 +131,20 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**REMOVE COOKED ITEM**/
|
||||
if (player.isSneaking() == true) {
|
||||
if (hand.equals(MAIN_HAND)) {
|
||||
|
||||
/**REMOVE COOKED ITEM**/
|
||||
if (player.isSneaking()) {
|
||||
ItemStack pItem = player.inventory.getCurrentItem().copy();
|
||||
if (pItem.isEmpty()) {
|
||||
//TileNBTCrucible tile = (TileNBTCrucible) world.getTileEntity(pos);
|
||||
if (tile.getStatus() && tile.getHot() == 6) {
|
||||
System.out.println(tile.getDrops());
|
||||
ItemStack dropStack = tile.getDrops().copy();
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, 0), 2);
|
||||
tile.setHot(0);
|
||||
tile.setStatus(false);
|
||||
tile.setDrops(ItemStack.EMPTY);
|
||||
tile.ingList.clear();
|
||||
//PlayerHelper.spawnItemOnPlayer(world, player, dropStack);
|
||||
//PlayerHelper.spawnItemOnGround(world, player.getPosition(), dropStack);
|
||||
EntityItem entityitem = new EntityItem(world, player.posX, player.posY, player.posZ, dropStack); // ? player.posY - 1.0D
|
||||
world.spawnEntity(entityitem);
|
||||
tile.update();
|
||||
@@ -162,7 +155,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private IBlockState getReplacementBlock(World world, BlockPos pos, IBlockState state)
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.blocks;
|
||||
package nmd.primal.forgecraft.blocks.misc;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.items.tools.WorkBlade;
|
||||
import nmd.primal.forgecraft.blocks.BlockCustomBase;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
|
||||
import static nmd.primal.core.api.PrimalAPI.randomCheck;
|
||||
@@ -60,6 +60,7 @@ public class CTCrucible {
|
||||
CraftTweakerAPI.apply(new Remove(recipe_name));
|
||||
}
|
||||
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll()
|
||||
{
|
||||
|
||||
146
kfc/src/main/java/nmd/primal/forgecraft/compat/ct/CTSaw.java
Normal file
146
kfc/src/main/java/nmd/primal/forgecraft/compat/ct/CTSaw.java
Normal file
@@ -0,0 +1,146 @@
|
||||
package nmd.primal.forgecraft.compat.ct;
|
||||
|
||||
|
||||
import crafttweaker.CraftTweakerAPI;
|
||||
import crafttweaker.IAction;
|
||||
import crafttweaker.annotations.ModOnly;
|
||||
import crafttweaker.annotations.ZenRegister;
|
||||
import crafttweaker.api.item.IIngredient;
|
||||
import crafttweaker.api.minecraft.CraftTweakerMC;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import nmd.primal.core.common.PrimalCore;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.crafting.MachineSawCrafting;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ZenClass("mods.forgecraft.MachineSaw")
|
||||
@ModOnly(ModInfo.MOD_ID)
|
||||
@ZenRegister
|
||||
public class CTSaw {
|
||||
|
||||
static
|
||||
{
|
||||
PrimalCore.LOGGER.info("Registering CraftTweaker: " + MachineSawCrafting.RECIPE_PREFIX);
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addRecipe(IIngredient ing0,
|
||||
IIngredient output,
|
||||
String recipe_name)
|
||||
{
|
||||
CraftTweakerAPI.apply(new Add(ing0, output, recipe_name));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeRecipe(String recipe_name)
|
||||
{
|
||||
CraftTweakerAPI.apply(new Remove(recipe_name));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void removeAll()
|
||||
{
|
||||
CraftTweakerAPI.apply(new RemoveAll());
|
||||
}
|
||||
|
||||
private static class Add implements IAction
|
||||
{
|
||||
private final String recipe_name;
|
||||
private final Ingredient ing0;
|
||||
private final List<ItemStack> output;
|
||||
private boolean isDisabled, isHidden;
|
||||
|
||||
public Add(IIngredient I0, IIngredient output, String recipe_name)
|
||||
{
|
||||
|
||||
ItemStack[] array0 = null;
|
||||
ItemStack[] emptyArray = new ItemStack[1];
|
||||
emptyArray[0] = ItemStack.EMPTY;
|
||||
|
||||
if(I0 != null) {
|
||||
List<ItemStack> zeroIList = I0.getItems().stream().map(CraftTweakerMC::getItemStack).collect(Collectors.toList());
|
||||
array0 = zeroIList.stream().toArray(ItemStack[]::new);
|
||||
}
|
||||
if(I0 == null) {
|
||||
array0 = emptyArray;
|
||||
}
|
||||
|
||||
this.recipe_name = recipe_name;
|
||||
this.ing0 = Ingredient.fromStacks(array0);
|
||||
this.output = RecipeHelper.getIIngredientStacks(output);
|
||||
this.isDisabled = false;
|
||||
this.isHidden = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
PrimalCore.LOGGER.info("Add CraftTweaker Recipe: " + this.recipe_name);
|
||||
MachineSawCrafting.REGISTRY.register(new MachineSawCrafting(
|
||||
this.ing0,
|
||||
this.output).setRecipeName(this.recipe_name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "[" + ModInfo.MOD_NAME + "] Adding Crafting Tweaker recipe for: " + MachineSawCrafting.RECIPE_PREFIX;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class Remove implements IAction
|
||||
{
|
||||
private String recipe_name;
|
||||
|
||||
public Remove(String recipe_name)
|
||||
{
|
||||
this.recipe_name = recipe_name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
MachineSawCrafting recipe = MachineSawCrafting.getRecipe(recipe_name);
|
||||
if (recipe != null && !recipe.isHidden())
|
||||
{
|
||||
PrimalCore.LOGGER.info("Remove CraftTweaker Recipe: " + recipe_name);
|
||||
recipe.setDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "[" + ModInfo.MOD_NAME + "] Removing Crafting Tweaker recipe for:" + MachineSawCrafting.RECIPE_PREFIX;
|
||||
}
|
||||
}
|
||||
|
||||
private static class RemoveAll implements IAction
|
||||
{
|
||||
public RemoveAll() { }
|
||||
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
for (MachineSawCrafting recipe : MachineSawCrafting.RECIPES)
|
||||
{
|
||||
if (!recipe.isHidden())
|
||||
recipe.setDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String describe()
|
||||
{
|
||||
return "[" + ModInfo.MOD_NAME + "] Removing Crafting Tweaker recipe for:" + MachineSawCrafting.RECIPE_PREFIX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,10 +101,11 @@ public class ModJEI implements IModPlugin
|
||||
// Info
|
||||
// ***************************************************************************** //
|
||||
//registry.addIngredientInfo(ItemStack.EMPTY, ItemStack.class, "jei.info.forgecraft.crucible");
|
||||
registry.addIngredientInfo(new ItemStack(ModBlocks.nbtCrucible, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.crucible");
|
||||
//registry.addIngredientInfo(new ItemStack(ModBlocks.nbtCrucible, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.crucible");
|
||||
//registry.addIngredientInfo(new OreIngredient("oreIron"), OreIngredient.class, "jei.info.forgecraft.oreiron");
|
||||
registry.addIngredientInfo(new ItemStack(ModBlocks.castingform, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.casting");
|
||||
registry.addIngredientInfo(new ItemStack(ModBlocks.stoneanvil, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.anvil");
|
||||
registry.addIngredientInfo(new ItemStack(ModBlocks.sharpbench, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.sharpbench");
|
||||
//registry.addIngredientInfo(new ItemStack(ModBlocks.stoneanvil, 1, OreDictionary.WILDCARD_VALUE), ItemStack.class, "jei.info.forgecraft.anvil");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,10 +7,15 @@ import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import nmd.primal.core.common.helper.CommonUtils;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.compat.jei.AbstractCategory;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||
import nmd.primal.forgecraft.util.ToolNBT;
|
||||
import nmd.primal.forgecraft.util.WeaponNBT;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@@ -101,7 +106,16 @@ public class CastingRecipeCategory extends AbstractCategory<CastingRecipeWrapper
|
||||
|
||||
/***OUTPUTS***/
|
||||
items.init(26, false, 133, 77);
|
||||
items.set(26, recipe.output);
|
||||
if(recipe.output.getItem() instanceof WeaponPart){
|
||||
ItemStack tempStack = new ItemStack(recipe.output.getItem(), 1);
|
||||
WeaponNBT.setDefaultNBT(tempStack);
|
||||
items.set(26, tempStack);
|
||||
} else if(recipe.output.getItem() instanceof ToolPart){
|
||||
ItemStack tempStack = new ItemStack(recipe.output.getItem(), 1);
|
||||
ToolNBT.setDefaultNBT(tempStack);
|
||||
items.set(26, tempStack);
|
||||
} else {items.set(26, recipe.output);}
|
||||
|
||||
|
||||
/***EXTRAS***/
|
||||
//items.init(26, false, 105, 28);
|
||||
|
||||
@@ -6,11 +6,10 @@ import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.CommonUtils;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.compat.jei.AbstractCategory;
|
||||
@@ -47,7 +46,7 @@ public class WorkbenchRecipeCategory extends AbstractCategory<WorkbenchRecipeWra
|
||||
@Override
|
||||
public String getTitle()
|
||||
{
|
||||
return "jei.category.forgecraft.workbench";
|
||||
return I18n.format("jei.category.forgecraft.workbench");
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -90,16 +89,12 @@ public class WorkbenchRecipeCategory extends AbstractCategory<WorkbenchRecipeWra
|
||||
items.set(4, recipe.output);
|
||||
|
||||
/***EXTRAS***/
|
||||
items.init(5, false, 66, 20);
|
||||
items.init(5, true, 66, 20);
|
||||
ItemStack bench = new ItemStack(Item.getItemFromBlock(ModBlocks.workbench), 1);
|
||||
items.set(5, bench);
|
||||
|
||||
items.init(6, false, 66, 1);
|
||||
NonNullList<ItemStack> tempDrops = NonNullList.<ItemStack>create();
|
||||
tempDrops.add(0, new ItemStack(PrimalAPI.Items.STONE_GALLAGHER, 1));
|
||||
tempDrops.add(1, new ItemStack(PrimalAPI.Items.NETHER_GALLAGHER, 1));
|
||||
tempDrops.add(2, new ItemStack(PrimalAPI.Items.IRON_GALLAGHER, 1));
|
||||
tempDrops.add(3, new ItemStack(PrimalAPI.Items.QUARTZ_GALLAGHER, 1));
|
||||
items.set(6, tempDrops);
|
||||
List<ItemStack> tool = Arrays.asList( recipe.tool.getMatchingStacks());
|
||||
items.set(6, tool);
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ public class WorkbenchRecipeWrapper implements IRecipeWrapper {
|
||||
protected Ingredient toolHead;
|
||||
protected Ingredient toolPin;
|
||||
protected Ingredient takeApart;
|
||||
protected Ingredient tool;
|
||||
protected ItemStack output;
|
||||
|
||||
public WorkbenchRecipeWrapper(WorkbenchCrafting recipe) {
|
||||
@@ -29,6 +30,7 @@ public class WorkbenchRecipeWrapper implements IRecipeWrapper {
|
||||
this.toolHead = recipe.getToolHead();
|
||||
this.toolPin = recipe.getToolPin();
|
||||
this.takeApart = recipe.getTakeApart();
|
||||
this.tool = recipe.getCraftingTool();
|
||||
this.output = recipe.getOutput();
|
||||
}
|
||||
|
||||
@@ -40,6 +42,7 @@ public class WorkbenchRecipeWrapper implements IRecipeWrapper {
|
||||
ingredients.setInput(ItemStack.class, this.toolHead);
|
||||
ingredients.setInput(ItemStack.class, this.toolPin);
|
||||
ingredients.setInput(ItemStack.class, this.takeApart);
|
||||
ingredients.setInput(ItemStack.class, this.tool);
|
||||
ingredients.setOutput(ItemStack.class, this.output);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.common.recipes.AbstractRecipe;
|
||||
import nmd.primal.core.common.crafting.AbstractRecipe;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -228,14 +228,11 @@ public class CrucibleCrafting extends AbstractRecipe<CrucibleCrafting> { //exten
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Collection<CrucibleCrafting> getRecipes() {
|
||||
return RECIPES;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public String getRecipePrefix() {
|
||||
return RECIPE_PREFIX;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
package nmd.primal.forgecraft.crafting;
|
||||
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.common.crafting.AbstractRecipe;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 11/11/17.
|
||||
*/
|
||||
public class MachineSawCrafting extends AbstractRecipe<MachineSawCrafting> { //extends AbstractCrafting<CrucibleCrafting> {
|
||||
|
||||
// ***************************************************************************** //
|
||||
// Recipe Handler CrucibleHandler
|
||||
// ***************************************************************************** //
|
||||
|
||||
public static final String RECIPE_PREFIX = "machine_saw";
|
||||
public static final IForgeRegistry<MachineSawCrafting> REGISTRY = ModInfo.Registries.MACHINE_SAW_CRAFTING;
|
||||
|
||||
public static Collection<MachineSawCrafting> getRECIPES() {
|
||||
return RECIPES;
|
||||
}
|
||||
|
||||
public static final Collection<MachineSawCrafting> RECIPES = REGISTRY.getValuesCollection();
|
||||
|
||||
private Ingredient input;
|
||||
private List<ItemStack> output;
|
||||
|
||||
public Ingredient getInput() {
|
||||
return input;
|
||||
}
|
||||
public void setInput(Ingredient input) {
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
public List<ItemStack> getOutput() {
|
||||
return output;
|
||||
}
|
||||
public void setOutput(List<ItemStack> output) {
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
public MachineSawCrafting(Ingredient input, List<ItemStack> output){
|
||||
super();
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
public static boolean compare(Ingredient ingredient, ItemStack stack){
|
||||
if(stack == null){
|
||||
stack = new ItemStack(Items.AIR, 1);
|
||||
}
|
||||
if(ingredient == null && stack.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ingredient.test(ItemStack.EMPTY)) {
|
||||
if (stack.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(ingredient.apply(stack)){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isRecipe(ItemStack input){
|
||||
for(MachineSawCrafting recipe : RECIPES){
|
||||
if(input == null){
|
||||
input = ItemStack.EMPTY;
|
||||
}
|
||||
if(compare(recipe.input, input)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static MachineSawCrafting getRecipe(ItemStack input){
|
||||
for(MachineSawCrafting recipe : RECIPES){
|
||||
if(input == null){
|
||||
input = ItemStack.EMPTY;
|
||||
}
|
||||
if(recipe.input.apply(input)){
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Collection<MachineSawCrafting> getRecipes() {
|
||||
return RECIPES;
|
||||
}
|
||||
|
||||
public String getRecipePrefix() {
|
||||
return RECIPE_PREFIX;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shim for getting a recipe directly from correctly formatted name
|
||||
* @param recipe_name basic recipe name, no prefix or mod id
|
||||
* @return Recipe object
|
||||
*/
|
||||
@Nullable
|
||||
public static MachineSawCrafting getRecipe(String recipe_name)
|
||||
{
|
||||
return REGISTRY.getValue(getFullRecipeName(RECIPE_PREFIX, recipe_name));
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,8 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.common.recipes.AbstractRecipe;
|
||||
import nmd.primal.core.common.crafting.AbstractRecipe;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -12,6 +13,8 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static nmd.primal.core.common.crafting.AbstractRecipe.getFullRecipeName;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 11/11/17.
|
||||
*/
|
||||
@@ -35,6 +38,7 @@ public class WorkbenchCrafting extends AbstractRecipe<WorkbenchCrafting> { //ext
|
||||
private Ingredient toolPin;
|
||||
private Ingredient takeApart;
|
||||
private ItemStack output;
|
||||
private Ingredient craftingTool;
|
||||
|
||||
public Ingredient getTakeApart() {
|
||||
return takeApart;
|
||||
@@ -84,15 +88,21 @@ public class WorkbenchCrafting extends AbstractRecipe<WorkbenchCrafting> { //ext
|
||||
this.ingredientList = ingredientList;
|
||||
}
|
||||
|
||||
public Ingredient getCraftingTool() {
|
||||
return craftingTool;
|
||||
}
|
||||
|
||||
|
||||
private List<Ingredient> ingredientList = new ArrayList<>();
|
||||
|
||||
public WorkbenchCrafting(Ingredient i0, Ingredient i1, Ingredient i2, Ingredient i3 , ItemStack output){
|
||||
public WorkbenchCrafting(Ingredient i0, Ingredient i1, Ingredient i2, Ingredient i3 , Ingredient craftingTool, ItemStack output){
|
||||
super();
|
||||
this.toolPart = i0;
|
||||
this.toolHead = i1;
|
||||
this.toolPin = i2;
|
||||
this.takeApart = i3;
|
||||
this.output = output;
|
||||
this.craftingTool = craftingTool;
|
||||
}
|
||||
|
||||
public static boolean compare(Ingredient ingredient, ItemStack stack){
|
||||
@@ -102,21 +112,20 @@ public class WorkbenchCrafting extends AbstractRecipe<WorkbenchCrafting> { //ext
|
||||
if(ingredient == null && stack.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ingredient.test(ItemStack.EMPTY)) {
|
||||
if (stack.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(ingredient.apply(stack)){
|
||||
ItemStack[] testArray = ingredient.getMatchingStacks();
|
||||
List<ItemStack> testList = RecipeHelper.buildList(testArray);
|
||||
if(testList.contains(stack)){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3){
|
||||
public static boolean isRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3, ItemStack cTool){
|
||||
for(WorkbenchCrafting recipe : RECIPES){
|
||||
if(i0 == null){
|
||||
i0 = ItemStack.EMPTY;
|
||||
@@ -130,17 +139,21 @@ public class WorkbenchCrafting extends AbstractRecipe<WorkbenchCrafting> { //ext
|
||||
if(i3 == null){
|
||||
i3 = ItemStack.EMPTY;
|
||||
}
|
||||
if(cTool == null){
|
||||
cTool = ItemStack.EMPTY;
|
||||
}
|
||||
if(compare(recipe.toolPart, i0) &&
|
||||
compare(recipe.toolHead, i1) &&
|
||||
compare(recipe.toolPin, i2) &&
|
||||
compare(recipe.takeApart, i3) ){
|
||||
compare(recipe.takeApart, i3) &&
|
||||
compare(recipe.craftingTool, cTool)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static WorkbenchCrafting getRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3){
|
||||
public static WorkbenchCrafting getRecipe(ItemStack i0, ItemStack i1, ItemStack i2, ItemStack i3, ItemStack cTool){
|
||||
for(WorkbenchCrafting recipe : RECIPES){
|
||||
|
||||
if(i0 == null){
|
||||
@@ -155,8 +168,10 @@ public class WorkbenchCrafting extends AbstractRecipe<WorkbenchCrafting> { //ext
|
||||
if(i3 == null){
|
||||
i3 = ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
if(recipe.toolPart.apply(i0) && recipe.toolHead.apply(i1) && recipe.toolPin.apply(i2) && recipe.takeApart.apply(i3) ){
|
||||
if(cTool == null){
|
||||
cTool = ItemStack.EMPTY;
|
||||
}
|
||||
if(recipe.toolPart.apply(i0) && recipe.toolHead.apply(i1) && recipe.toolPin.apply(i2) && recipe.takeApart.apply(i3) && recipe.craftingTool.apply(cTool) ){
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
@@ -176,12 +191,10 @@ public class WorkbenchCrafting extends AbstractRecipe<WorkbenchCrafting> { //ext
|
||||
}*/
|
||||
|
||||
|
||||
@Override
|
||||
public Collection<WorkbenchCrafting> getRecipes() {
|
||||
return RECIPES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipePrefix() {
|
||||
return RECIPE_PREFIX;
|
||||
}
|
||||
|
||||
@@ -23,244 +23,7 @@ public final class RecipesCrucible {
|
||||
PrimalAPI.logger(7, "Registering Recipes: " + CrucibleCrafting.RECIPE_PREFIX);
|
||||
final IForgeRegistry<CrucibleCrafting> recipes = event.getRegistry();
|
||||
|
||||
/*
|
||||
ItemStack emptyAir = ItemStack.EMPTY;
|
||||
|
||||
NBTTagCompound newTag = new NBTTagCompound();
|
||||
|
||||
NBTTagCompound setHot = new NBTTagCompound();
|
||||
setHot.setBoolean("hot", true);
|
||||
|
||||
ItemStack hotBronzeIngot = new ItemStack(ModItems.bronzeingotball, 1);
|
||||
hotBronzeIngot.setTagCompound(setHot);
|
||||
ItemStack hotIronIngot = new ItemStack(ModItems.ironingotball, 1);
|
||||
hotIronIngot.setTagCompound(setHot);
|
||||
ItemStack hotCleanIronIngot = new ItemStack(ModItems.ironcleaningotball, 1);
|
||||
hotCleanIronIngot.setTagCompound(setHot);
|
||||
ItemStack hotSteelIngot = new ItemStack(ModItems.steelingotball, 1);
|
||||
hotSteelIngot.setTagCompound(setHot);
|
||||
ItemStack hotWootzIngot = new ItemStack(ModItems.wootzingotball, 1);
|
||||
hotWootzIngot.setTagCompound(setHot);
|
||||
|
||||
ItemStack hotBronzeChunk = new ItemStack( ModItems.bronzechunk, 1);
|
||||
hotBronzeChunk.setTagCompound(setHot);
|
||||
ItemStack hotChunk = new ItemStack( ModItems.wroughtironchunk, 1);
|
||||
hotChunk.setTagCompound(setHot);
|
||||
ItemStack hotCleanChunk = new ItemStack(ModItems.ironcleanchunk, 1);
|
||||
hotCleanChunk.setTagCompound(setHot);
|
||||
ItemStack hotSteelChunk = new ItemStack(ModItems.steelchunk, 1);
|
||||
hotSteelChunk.setTagCompound(setHot);
|
||||
ItemStack hotWootzChunk = new ItemStack(ModItems.wootzchunk, 1);
|
||||
hotWootzChunk.setTagCompound(setHot);
|
||||
|
||||
ItemStack diamond = new ItemStack(Items.DIAMOND, 1);
|
||||
ItemStack emerald = new ItemStack(Items.EMERALD, 1);
|
||||
|
||||
ItemStack emeraldShard = new ItemStack(PrimalAPI.Items.EMERALD_KNAPP, 1);
|
||||
ItemStack diamondShard = new ItemStack(PrimalAPI.Items.DIAMOND_KNAPP, 1);
|
||||
ItemStack redstone = new ItemStack(Items.REDSTONE, 1);
|
||||
ItemStack lapis = new ItemStack(Items.DYE, 1, 4);
|
||||
|
||||
|
||||
|
||||
ItemStack[] toolArray = new ItemStack[24];
|
||||
ItemStack[] hotToolArray = new ItemStack[16];
|
||||
|
||||
ItemStack bronzepickaxehead = new ItemStack(ModItems.bronzepickaxehead, 1);
|
||||
bronzepickaxehead.setTagCompound(newTag);
|
||||
toolArray[0] = bronzepickaxehead;
|
||||
ItemStack bronzeaxehead = new ItemStack(ModItems.bronzeaxehead, 1);
|
||||
bronzeaxehead.setTagCompound(newTag);
|
||||
toolArray[1] = bronzeaxehead;
|
||||
ItemStack bronzeshovelhead = new ItemStack(ModItems.bronzeshovelhead, 1);
|
||||
bronzeshovelhead.setTagCompound(newTag);
|
||||
toolArray[2] = bronzeshovelhead;
|
||||
ItemStack bronzehoehead = new ItemStack(ModItems.bronzehoehead, 1);
|
||||
bronzehoehead.setTagCompound(newTag);
|
||||
toolArray[3] = bronzehoehead;
|
||||
|
||||
ItemStack pickaxehead = new ItemStack(ModItems.pickaxehead, 1);
|
||||
pickaxehead.setTagCompound(newTag);
|
||||
toolArray[4] = pickaxehead;
|
||||
ItemStack ironaxehead = new ItemStack(ModItems.ironaxehead, 1);
|
||||
ironaxehead.setTagCompound(newTag);
|
||||
toolArray[5] = ironaxehead;
|
||||
ItemStack ironshovelhead = new ItemStack(ModItems.ironshovelhead, 1);
|
||||
ironshovelhead.setTagCompound(newTag);
|
||||
toolArray[6] = ironshovelhead;
|
||||
ItemStack ironhoehead = new ItemStack(ModItems.ironhoehead, 1);
|
||||
ironhoehead.setTagCompound(newTag);
|
||||
toolArray[7] = ironhoehead;
|
||||
|
||||
ItemStack cleanpickaxehead = new ItemStack(ModItems.cleanironpickaxehead, 1);
|
||||
cleanpickaxehead.setTagCompound(newTag);
|
||||
toolArray[8] = cleanpickaxehead;
|
||||
ItemStack cleanaxehead = new ItemStack(ModItems.cleanironaxehead, 1);
|
||||
cleanaxehead.setTagCompound(newTag);
|
||||
toolArray[9] = cleanaxehead;
|
||||
ItemStack cleanshovelhead = new ItemStack(ModItems.cleanironshovelhead, 1);
|
||||
cleanshovelhead.setTagCompound(newTag);
|
||||
toolArray[10] = cleanshovelhead;
|
||||
ItemStack cleanhoehead = new ItemStack(ModItems.cleanironhoehead, 1);
|
||||
cleanhoehead.setTagCompound(newTag);
|
||||
toolArray[11] =cleanhoehead ;
|
||||
|
||||
ItemStack steelpickaxehead = new ItemStack(ModItems.steelpickaxehead, 1);
|
||||
steelpickaxehead.setTagCompound(newTag);
|
||||
toolArray[12] = steelpickaxehead;
|
||||
ItemStack steelaxehead = new ItemStack(ModItems.steelaxehead, 1);
|
||||
steelaxehead.setTagCompound(newTag);
|
||||
toolArray[13] =steelaxehead ;
|
||||
ItemStack steelshovelhead = new ItemStack(ModItems.steelshovelhead, 1);
|
||||
steelshovelhead.setTagCompound(newTag);
|
||||
toolArray[14] = steelshovelhead;
|
||||
ItemStack steelhoehead = new ItemStack(ModItems.steelhoehead, 1);
|
||||
steelhoehead.setTagCompound(newTag);
|
||||
toolArray[15] =steelhoehead ;
|
||||
|
||||
ItemStack wootzpickaxehead = new ItemStack(ModItems.wootzpickaxehead, 1);
|
||||
wootzpickaxehead.setTagCompound(newTag);
|
||||
toolArray[16] = wootzpickaxehead;
|
||||
ItemStack wootzaxehead = new ItemStack(ModItems.wootzaxehead, 1);
|
||||
wootzaxehead.setTagCompound(newTag);
|
||||
toolArray[17] = wootzaxehead;
|
||||
ItemStack wootzshovelhead = new ItemStack(ModItems.wootzshovelhead, 1);
|
||||
wootzshovelhead.setTagCompound(newTag);
|
||||
toolArray[18] =wootzshovelhead ;
|
||||
ItemStack wootzhoehead = new ItemStack(ModItems.wootzhoehead, 1);
|
||||
wootzhoehead.setTagCompound(newTag);
|
||||
toolArray[19] = wootzhoehead;
|
||||
|
||||
ItemStack copperpickaxehead = new ItemStack(ModItems.copperpickaxehead, 1);
|
||||
copperpickaxehead.setTagCompound(newTag);
|
||||
toolArray[20] = copperpickaxehead;
|
||||
ItemStack copperaxehead = new ItemStack(ModItems.copperaxehead, 1);
|
||||
copperaxehead.setTagCompound(newTag);
|
||||
toolArray[21] = copperaxehead;
|
||||
ItemStack coppershovelhead = new ItemStack(ModItems.coppershovelhead, 1);
|
||||
coppershovelhead.setTagCompound(newTag);
|
||||
toolArray[22] =coppershovelhead ;
|
||||
ItemStack copperhoehead = new ItemStack(ModItems.copperhoehead, 1);
|
||||
copperhoehead.setTagCompound(newTag);
|
||||
toolArray[23] = copperhoehead;
|
||||
|
||||
ItemStack hotpickaxehead = pickaxehead.copy();
|
||||
hotToolArray[0] =hotpickaxehead;
|
||||
ItemStack hotironaxehead = ironaxehead.copy();
|
||||
hotToolArray[1] =hotironaxehead;
|
||||
ItemStack hotironshovelhead = ironshovelhead.copy();
|
||||
hotToolArray[2] =hotironshovelhead;
|
||||
ItemStack hotironhoehead = ironhoehead.copy();
|
||||
hotToolArray[3] =hotironhoehead;
|
||||
|
||||
ItemStack hotcleanpickaxehead = cleanpickaxehead.copy();
|
||||
hotToolArray[4] = hotcleanpickaxehead;
|
||||
ItemStack hotcleanaxehead = cleanaxehead.copy();
|
||||
hotToolArray[5] = hotcleanaxehead;
|
||||
ItemStack hotcleanshovelhead = cleanshovelhead.copy();
|
||||
hotToolArray[6] = hotcleanshovelhead;
|
||||
ItemStack hotcleanhoehead = cleanhoehead.copy();
|
||||
hotToolArray[7] = hotcleanhoehead;
|
||||
|
||||
ItemStack hotsteelpickaxehead = steelpickaxehead.copy();
|
||||
hotToolArray[8] = hotsteelpickaxehead;
|
||||
ItemStack hotsteelaxehead = steelaxehead.copy();
|
||||
hotToolArray[9] = hotsteelaxehead;
|
||||
ItemStack hotsteelshovelhead = steelshovelhead.copy();
|
||||
hotToolArray[10] = hotsteelshovelhead;
|
||||
ItemStack hotsteelhoehead = steelhoehead.copy();
|
||||
hotToolArray[11] = hotsteelhoehead;
|
||||
|
||||
ItemStack hotwootzpickaxehead = wootzpickaxehead.copy();
|
||||
hotToolArray[12] = hotwootzpickaxehead;
|
||||
ItemStack hotwootzaxehead = wootzaxehead.copy();
|
||||
hotToolArray[13] = hotwootzaxehead;
|
||||
ItemStack hotwootzshovelhead = wootzshovelhead.copy();
|
||||
hotToolArray[14] = hotwootzshovelhead;
|
||||
ItemStack hotwootzhoehead = wootzhoehead.copy();
|
||||
hotToolArray[15] = hotwootzhoehead;
|
||||
|
||||
|
||||
|
||||
for(ItemStack temp : toolArray) {
|
||||
NBTTagCompound tags = temp.getTagCompound();
|
||||
tags.setTag("tags", tags);
|
||||
|
||||
tags.getCompoundTag("tags").setBoolean("hot", false);
|
||||
tags.getCompoundTag("tags").setBoolean("emerald", false);
|
||||
tags.getCompoundTag("tags").setInteger("diamond", 0);
|
||||
tags.getCompoundTag("tags").setInteger("redstone", 0);
|
||||
tags.getCompoundTag("tags").setInteger("lapis", 0);
|
||||
tags.getCompoundTag("tags").setInteger("modifiers", 0);
|
||||
temp.setTagCompound(tags);
|
||||
}
|
||||
|
||||
bronzepickaxehead = toolArray[0];
|
||||
bronzeaxehead = toolArray[1];
|
||||
bronzeshovelhead = toolArray[2];
|
||||
bronzehoehead = toolArray[3];
|
||||
|
||||
pickaxehead = toolArray[4];
|
||||
ironaxehead = toolArray[5];
|
||||
ironshovelhead = toolArray[6];
|
||||
ironhoehead = toolArray[7];
|
||||
|
||||
cleanpickaxehead = toolArray[8];
|
||||
cleanaxehead = toolArray[9];
|
||||
cleanshovelhead = toolArray[10];
|
||||
cleanhoehead = toolArray[11];
|
||||
|
||||
steelpickaxehead = toolArray[12] ;
|
||||
steelaxehead = toolArray[13] ;
|
||||
steelshovelhead = toolArray[14];
|
||||
steelhoehead = toolArray[15] ;
|
||||
|
||||
wootzpickaxehead = toolArray[16];
|
||||
wootzaxehead = toolArray[17];
|
||||
wootzshovelhead = toolArray[18] ;
|
||||
wootzhoehead = toolArray[19];
|
||||
|
||||
copperpickaxehead = toolArray[20];
|
||||
copperaxehead = toolArray[21];
|
||||
coppershovelhead = toolArray[22];
|
||||
copperhoehead = toolArray[23];
|
||||
|
||||
for(ItemStack temp : hotToolArray) {
|
||||
//NBTTagCompound newTag = new NBTTagCompound();
|
||||
NBTTagCompound tags = new NBTTagCompound();
|
||||
|
||||
//temp.setTagCompound(newTag);
|
||||
temp.getTagCompound().setTag("tags", tags);
|
||||
|
||||
temp.getTagCompound().setTag("tags", tags);
|
||||
temp.getSubCompound("tags").setBoolean("hot", true);
|
||||
temp.getSubCompound("tags").setBoolean("emerald", false);
|
||||
temp.getSubCompound("tags").setInteger("diamond", 0);
|
||||
temp.getSubCompound("tags").setInteger("redstone", 0);
|
||||
temp.getSubCompound("tags").setInteger("lapis", 0);
|
||||
temp.getSubCompound("tags").setInteger("modifiers", 0);
|
||||
}
|
||||
|
||||
hotpickaxehead = hotToolArray[0];
|
||||
hotironaxehead = hotToolArray[1];
|
||||
hotironshovelhead = hotToolArray[2];
|
||||
hotironhoehead = hotToolArray[3];
|
||||
|
||||
hotcleanpickaxehead = hotToolArray[4];
|
||||
hotcleanaxehead = hotToolArray[5];
|
||||
hotcleanshovelhead = hotToolArray[6];
|
||||
hotcleanhoehead = hotToolArray[7];
|
||||
|
||||
hotsteelpickaxehead = hotToolArray[8] ;
|
||||
hotsteelaxehead = hotToolArray[9] ;
|
||||
hotsteelshovelhead = hotToolArray[10];
|
||||
hotsteelhoehead = hotToolArray[11] ;
|
||||
|
||||
hotwootzpickaxehead = hotToolArray[12];
|
||||
hotwootzaxehead = hotToolArray[13];
|
||||
hotwootzshovelhead = hotToolArray[14] ;
|
||||
hotwootzhoehead = hotToolArray[15];
|
||||
*/
|
||||
//RecipeHandler.addSmelting(ModItems.softcrucible, new ItemStack(ModBlocks.nbtCrucible, 1));
|
||||
|
||||
/***********************/
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
package nmd.primal.forgecraft.crafting.registery;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreIngredient;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.crafting.MachineSawCrafting;
|
||||
|
||||
|
||||
@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
|
||||
@Mod.EventBusSubscriber
|
||||
public final class RecipesMachineSaw {
|
||||
@SubscribeEvent
|
||||
public static void registerRecipes(RegistryEvent.Register<MachineSawCrafting> event) {
|
||||
PrimalAPI.logger(7, "Registering Recipes: " + MachineSawCrafting.RECIPE_PREFIX);
|
||||
final IForgeRegistry<MachineSawCrafting> recipes = event.getRegistry();
|
||||
|
||||
ItemStack sticks = new ItemStack(Items.STICK, 2);
|
||||
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("logOak"),
|
||||
RecipeHelper.buildList(
|
||||
(new ItemStack(Item.getItemFromBlock(Blocks.PLANKS), 4, 0)),
|
||||
(new ItemStack(PrimalAPI.Items.BARK_OAK, 4)),
|
||||
sticks))
|
||||
.setRecipeName("planksOak"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("logSpruce"),
|
||||
RecipeHelper.buildList(
|
||||
(new ItemStack(Item.getItemFromBlock(Blocks.PLANKS), 4, 1)),
|
||||
(new ItemStack(PrimalAPI.Items.BARK_SPRUCE, 4)),
|
||||
sticks))
|
||||
.setRecipeName("planksSpruce"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("logBirch"),
|
||||
RecipeHelper.buildList(
|
||||
(new ItemStack(Item.getItemFromBlock(Blocks.PLANKS), 4, 2)),
|
||||
(new ItemStack(PrimalAPI.Items.BARK_BIRCH, 4)),
|
||||
sticks))
|
||||
.setRecipeName("planksBirch"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("logJungle"),
|
||||
RecipeHelper.buildList(
|
||||
(new ItemStack(Item.getItemFromBlock(Blocks.PLANKS), 4, 3)),
|
||||
(new ItemStack(PrimalAPI.Items.BARK_JUNGLE, 4)),
|
||||
sticks))
|
||||
.setRecipeName("planksJungle"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("logAcacia"),
|
||||
RecipeHelper.buildList(
|
||||
(new ItemStack(Item.getItemFromBlock(Blocks.PLANKS), 4, 0)),
|
||||
(new ItemStack(PrimalAPI.Items.BARK_ACACIA, 4)),
|
||||
sticks))
|
||||
.setRecipeName("planksAcacia"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("logIronwood"),
|
||||
RecipeHelper.buildList(
|
||||
(new ItemStack(Item.getItemFromBlock(PrimalAPI.Blocks.PLANKS), 4, 0)),
|
||||
(new ItemStack(PrimalAPI.Items.BARK_IRONWOOD, 4)),
|
||||
(new ItemStack(PrimalAPI.Items.IRONWOOD_STICK, 2))
|
||||
))
|
||||
.setRecipeName("planksIronwood"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("logYew"),
|
||||
RecipeHelper.buildList(
|
||||
(new ItemStack(Item.getItemFromBlock(PrimalAPI.Blocks.PLANKS), 4, 1)),
|
||||
(new ItemStack(PrimalAPI.Items.BARK_YEW, 4)),
|
||||
(new ItemStack(PrimalAPI.Items.YEW_STICK, 2))
|
||||
))
|
||||
.setRecipeName("yewPlanks"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("logCorypha"),
|
||||
RecipeHelper.buildList(
|
||||
(new ItemStack(Item.getItemFromBlock(PrimalAPI.Blocks.PLANKS), 4, 3)),
|
||||
(new ItemStack(PrimalAPI.Items.BARK_CORYPHA, 4)),
|
||||
(new ItemStack(PrimalAPI.Items.CORYPHA_STICK, 2))))
|
||||
.setRecipeName("coryphaPlanks"));
|
||||
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedOak"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_OAK, 6)))
|
||||
.setRecipeName("splitOak"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedSpruce"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_SPRUCE, 6)))
|
||||
.setRecipeName("splitSpruce"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedBirch"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_BIRCH, 6)))
|
||||
.setRecipeName("splitBirch"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedJungle"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_JUNGLE, 6)))
|
||||
.setRecipeName("splitJungle"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedAcacia"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_ACACIA, 6)))
|
||||
.setRecipeName("splitAcacia"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedDarkOak"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_DARK_OAK, 6)))
|
||||
.setRecipeName("splitDarkOak"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedIronwood"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_IRONWOOD, 6)))
|
||||
.setRecipeName("splitIronwood"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedYew"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_YEW, 6)))
|
||||
.setRecipeName("splitYew"));
|
||||
recipes.register(new MachineSawCrafting(
|
||||
new OreIngredient("strippedCorypha"),
|
||||
RecipeHelper.buildList(new ItemStack(PrimalAPI.Items.LOGS_SPLIT_CORYPHA, 6)))
|
||||
.setRecipeName("splitCorypha"));
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,6 @@ import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
|
||||
import java.lang.reflect.WildcardType;
|
||||
|
||||
@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
|
||||
@Mod.EventBusSubscriber
|
||||
public final class RecipesWorkbench {
|
||||
@@ -31,6 +29,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.copperaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.copperaxe, 1)).setRecipeName("copperaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -38,6 +37,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.copperaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.copperaxehead, 1)).setRecipeName("copperaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -45,6 +45,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.copperhoehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.copperhoe, 1)).setRecipeName("copperhoe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -52,6 +53,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.copperhoe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.copperhoehead, 1)).setRecipeName("copperhoesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -59,6 +61,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.copperpickaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.copperpickaxe, 1)).setRecipeName("copperpickaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -66,6 +69,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.copperpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.copperpickaxehead, 1)).setRecipeName("copperpickaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -73,6 +77,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.coppershovelhead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.coppershovel, 1)).setRecipeName("coppershovel"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -80,6 +85,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.coppershovel, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.coppershovelhead, 1)).setRecipeName("coppershovelsplit"));
|
||||
|
||||
/***BRONZE***/
|
||||
@@ -89,6 +95,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzeaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.bronzeaxe, 1)).setRecipeName("bronzeaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -96,6 +103,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzeaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.bronzeaxehead, 1)).setRecipeName("bronzeaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -103,6 +111,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzehoehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.bronzehoe, 1)).setRecipeName("bronzehoe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -110,6 +119,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzehoe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.bronzehoehead, 1)).setRecipeName("bronzehoesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -117,6 +127,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzepickaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.bronzepickaxe, 1)).setRecipeName("bronzepickaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -124,6 +135,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzepickaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.bronzepickaxehead, 1)).setRecipeName("bronzepickaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -131,6 +143,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzeshovelhead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.bronzeshovel, 1)).setRecipeName("bronzeshovel"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -138,6 +151,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzeshovel, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.bronzeshovelhead, 1)).setRecipeName("bronzeshovelsplit"));
|
||||
|
||||
|
||||
@@ -148,6 +162,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.ironaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.ironaxe, 1)).setRecipeName("ironaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -155,6 +170,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.ironaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.ironaxehead, 1)).setRecipeName("ironaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -162,6 +178,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.ironhoehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.ironhoe, 1)).setRecipeName("ironhoe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -169,6 +186,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.ironhoe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.ironhoehead, 1)).setRecipeName("ironhoesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -176,6 +194,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.pickaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.ironpickaxe, 1)).setRecipeName("ironpickaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -183,6 +202,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.ironpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.pickaxehead, 1)).setRecipeName("ironpickaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -190,6 +210,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.ironshovelhead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.ironshovel, 1)).setRecipeName("ironshovel"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -197,6 +218,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.ironshovel, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.ironshovelhead, 1)).setRecipeName("ironshovelsplit"));
|
||||
|
||||
|
||||
@@ -207,6 +229,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.cleanironaxe, 1)).setRecipeName("cleanironaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -214,6 +237,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.cleanironaxehead, 1)).setRecipeName("cleanironaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -221,6 +245,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironhoehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.cleanironhoe, 1)).setRecipeName("cleanironhoe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -228,6 +253,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironhoe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.cleanironhoehead, 1)).setRecipeName("cleanironhoesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -235,6 +261,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironpickaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.cleanironpickaxe, 1)).setRecipeName("cleanironpickaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -242,6 +269,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.cleanironpickaxehead, 1)).setRecipeName("cleanironpickaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -249,6 +277,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironshovelhead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.cleanironshovel, 1)).setRecipeName("cleanironshovel"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -256,6 +285,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironshovel, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.cleanironshovelhead, 1)).setRecipeName("cleanironshovelsplit"));
|
||||
|
||||
|
||||
@@ -266,6 +296,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.steelaxe, 1)).setRecipeName("steelaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -273,6 +304,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.steelaxehead, 1)).setRecipeName("steelaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -280,6 +312,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelhoehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.steelhoe, 1)).setRecipeName("steelhoe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -287,6 +320,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelhoe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.steelhoehead, 1)).setRecipeName("steelhoesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -294,6 +328,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelpickaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.steelpickaxe, 1)).setRecipeName("steelpickaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -301,6 +336,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.steelpickaxehead, 1)).setRecipeName("steelpickaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -308,6 +344,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelshovelhead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.steelshovel, 1)).setRecipeName("steelshovel"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -315,6 +352,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelshovel, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.steelshovelhead, 1)).setRecipeName("steelshovelsplit"));
|
||||
|
||||
|
||||
@@ -325,6 +363,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.wootzaxe, 1)).setRecipeName("wootzaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -332,6 +371,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.wootzaxehead, 1)).setRecipeName("wootzaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -339,6 +379,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzhoehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.wootzhoe, 1)).setRecipeName("wootzhoe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -346,6 +387,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzhoe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.wootzhoehead, 1)).setRecipeName("wootzhoesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -353,6 +395,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzpickaxehead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.wootzpickaxe, 1)).setRecipeName("wootzpickaxe"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -360,6 +403,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzpickaxe, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.wootzpickaxehead, 1)).setRecipeName("wootzpickaxesplit"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -367,6 +411,7 @@ public final class RecipesWorkbench {
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzshovelhead, 1)),
|
||||
new OreIngredient("pinBasic"),
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.wootzshovel, 1)).setRecipeName("wootzshovel"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
@@ -374,7 +419,220 @@ public final class RecipesWorkbench {
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzshovel, 1, OreDictionary.WILDCARD_VALUE)),
|
||||
new OreIngredient("toolGallagher"),
|
||||
new ItemStack(ModItems.wootzshovelhead, 1)).setRecipeName("wootzshovelsplit"));
|
||||
|
||||
/*********WEAPONS********/
|
||||
|
||||
/***GLADIUS***/
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawcoppergladius, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.coppergladius, 1)).setRecipeName("coppergladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.coppergladius, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawcoppergladius, 1)).setRecipeName("rawcoppergladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawbronzegladius, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.bronzegladius, 1)).setRecipeName("bronzegladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.bronzegladius, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawbronzegladius, 1)).setRecipeName("rawbronzegladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawwroughtirongladius, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.wroughtirongladius, 1)).setRecipeName("wroughtirongladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wroughtirongladius, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawwroughtirongladius, 1)).setRecipeName("rawwroughtirongladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawcleanirongladius, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.cleanirongladius, 1)).setRecipeName("cleanirongladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanirongladius, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawcleanirongladius, 1)).setRecipeName("rawcleanirongladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawsteelgladius, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.steelgladius, 1)).setRecipeName("steelgladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelgladius, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawsteelgladius, 1)).setRecipeName("rawsteelgladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzgladius, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.wootzgladius, 1)).setRecipeName("wootzgladius"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzgladius, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawwootzgladius, 1)).setRecipeName("rawwootzgladius"));
|
||||
|
||||
/***LONGSWORD***/
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawcleanironlongsword, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.cleanironlongsword, 1)).setRecipeName("cleanironlongsword"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironlongsword, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawcleanironlongsword, 1)).setRecipeName("rawcleanironlongsword"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawsteellongsword, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.steellongsword, 1)).setRecipeName("steellongsword"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steellongsword, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawsteellongsword, 1)).setRecipeName("rawsteellongsword"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzlongsword, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.wootzlongsword, 1)).setRecipeName("wootzlongsword"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzlongsword, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawwootzlongsword, 1)).setRecipeName("rawwootzlongsword"));
|
||||
|
||||
/***SLAYER***/
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawironslayer, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.wroughtironslayer, 1)).setRecipeName("ironslayer"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wroughtironslayer, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawironslayer, 1)).setRecipeName("rawironslayer"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawcleanironslayer, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.cleanironslayer, 1)).setRecipeName("cleanironslayer"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.cleanironslayer, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawcleanironslayer, 1)).setRecipeName("rawcleanironslayer"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawsteelslayer, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.steelslayer, 1)).setRecipeName("steelslayer"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.steelslayer, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawsteelslayer, 1)).setRecipeName("rawsteelslayer"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
new OreIngredient("cordageGeneral"),
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.rawwootzslayer, 1)),
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.wootzslayer, 1)).setRecipeName("wootzslayer"));
|
||||
|
||||
recipes.register (new WorkbenchCrafting(
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(ModItems.wootzslayer, 1)),
|
||||
new OreIngredient("toolWorkBlade"),
|
||||
new ItemStack(ModItems.rawwootzslayer, 1)).setRecipeName("rawwootzslayer"));
|
||||
}
|
||||
}
|
||||
@@ -11,10 +11,11 @@ import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.blocks.Chisel;
|
||||
import nmd.primal.forgecraft.blocks.YewStave;
|
||||
import nmd.primal.forgecraft.blocks.AnvilStone;
|
||||
import nmd.primal.forgecraft.blocks.NBTCrucible;
|
||||
import nmd.primal.forgecraft.blocks.anvil.AnvilStone;
|
||||
import nmd.primal.forgecraft.blocks.misc.Chisel;
|
||||
import nmd.primal.forgecraft.blocks.misc.Gearbox;
|
||||
import nmd.primal.forgecraft.blocks.misc.NBTCrucible;
|
||||
import nmd.primal.forgecraft.blocks.misc.YewStave;
|
||||
import nmd.primal.forgecraft.blocks.machine.*;
|
||||
|
||||
/**
|
||||
@@ -30,6 +31,9 @@ public class ModBlocks {
|
||||
public static Block blockbreaker;
|
||||
public static Block castingform;
|
||||
|
||||
public static Block redstoneengine;
|
||||
public static Block woodengearbox;
|
||||
|
||||
public static Block bronzechisel;
|
||||
public static Block copperchisel;
|
||||
public static Block ironchisel;
|
||||
@@ -45,12 +49,16 @@ public class ModBlocks {
|
||||
public static Block pistonbellowsacacia;
|
||||
|
||||
public static Block stoneanvil;
|
||||
public static Block ironanvil;
|
||||
//public static Block ironanvil;
|
||||
|
||||
public static Block workbench;
|
||||
public static Block sharpbench;
|
||||
|
||||
public static Block yewstave;
|
||||
|
||||
/** M A C H I N E S **/
|
||||
public static Block machinesaw;
|
||||
|
||||
public static void init() {
|
||||
|
||||
nbtCrucible = new NBTCrucible(Material.ROCK, "nbtcrucible");
|
||||
@@ -61,6 +69,9 @@ public class ModBlocks {
|
||||
blockbreaker = new Breaker(Material.WOOD, "blockbreaker", 4.0f);
|
||||
castingform = new CastingForm(Material.WOOD, "castingform");
|
||||
|
||||
redstoneengine = new RedstoneEngine(Material.WOOD, "redstoneengine");
|
||||
woodengearbox = new Gearbox(Material.WOOD, "woodengearbox");
|
||||
|
||||
copperchisel = new Chisel(Material.IRON, "copperchisel", PrimalAPI.ToolMaterials.TOOL_COPPER);
|
||||
bronzechisel = new Chisel(Material.IRON, "bronzechisel", PrimalAPI.ToolMaterials.TOOL_BRONZE);
|
||||
ironchisel = new Chisel(Material.IRON, "ironchisel", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||
@@ -79,9 +90,12 @@ public class ModBlocks {
|
||||
//ironanvil = new AnvilIron(Material.ANVIL, "ironanvil", 6.0f, true);
|
||||
|
||||
workbench = new Workbench(Material.WOOD, "toolbench");
|
||||
sharpbench = new SharpBench(Material.WOOD, "sharpbench");
|
||||
|
||||
yewstave = new YewStave(Material.WOOD, "yewstave", 3.0F);
|
||||
|
||||
machinesaw = new MachineSaw(Material.IRON, "ironmachinesaw");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +108,9 @@ public class ModBlocks {
|
||||
registerBlockWithItem(blockbreaker);
|
||||
registerBlockWithItem(castingform);
|
||||
|
||||
registerBlockWithItem(redstoneengine);
|
||||
registerBlock(woodengearbox);
|
||||
|
||||
registerBlockWithItem(copperchisel);
|
||||
registerBlockWithItem(bronzechisel);
|
||||
registerBlockWithItem(ironchisel);
|
||||
@@ -112,8 +129,11 @@ public class ModBlocks {
|
||||
//registerBlockWithItem(ironanvil);
|
||||
|
||||
registerBlockWithItem(workbench);
|
||||
registerBlockWithItem(sharpbench);
|
||||
|
||||
registerBlockWithItem(yewstave);
|
||||
|
||||
registerBlockWithItem(machinesaw);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -122,6 +142,7 @@ public class ModBlocks {
|
||||
registerRender(forge_brick);
|
||||
registerRender(forge_adobe);
|
||||
registerRender(castingform);
|
||||
registerRender(redstoneengine);
|
||||
|
||||
registerRender(copperchisel);
|
||||
registerRender(bronzechisel);
|
||||
@@ -144,9 +165,11 @@ public class ModBlocks {
|
||||
registerRender(stoneanvil);
|
||||
//registerRender(ironanvil);
|
||||
registerRender(workbench);
|
||||
registerRender(sharpbench);
|
||||
|
||||
registerRender(yewstave);
|
||||
|
||||
registerRender(machinesaw);
|
||||
}
|
||||
|
||||
private static void registerBlockWithItem(Block block)
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.recipes.irecipe.RecipeHandler;
|
||||
import nmd.primal.core.common.crafting.handlers.irecipe.RecipeHandler;
|
||||
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
||||
import nmd.primal.forgecraft.crafting.CastingCrafting;
|
||||
import nmd.primal.forgecraft.crafting.ForgeCrafting;
|
||||
@@ -333,18 +333,24 @@ public class ModCrafting{
|
||||
|
||||
/***Bellows Handle***/
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.bellowshandle),
|
||||
"X X", "X X", " X ", 'X', Items.STICK);
|
||||
"X X", "X X", " X ", 'X', "stickWood");
|
||||
|
||||
/***Tongs***/
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.slottedtongs, 1),
|
||||
"X X", "YSY", 'X', Blocks.STONE, 'S', Items.STRING, 'Y', Items.STICK);
|
||||
"X X", "YSY", 'X', Blocks.STONE, 'S', "string", 'Y', "stickWood");
|
||||
|
||||
/***Anvil***/
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.stoneanvil, 1),
|
||||
" ", " I ", " S ", 'I', "ingotIron", 'S', Blocks.STONE);
|
||||
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.workbench, 1),
|
||||
"ss ", "rrr", "f f", 's', "slabWood", 'r', Blocks.STONE_SLAB, 'f', "fenceWood");
|
||||
" ", "rrr", "f f", 'r', Blocks.STONE_SLAB, 'f', "fenceWood");
|
||||
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModBlocks.sharpbench, 1),
|
||||
" ", "sss", "f f", 's', "stickWood", 'f', "fenceWood" );
|
||||
|
||||
RecipeHandler.addShapedOreRecipe(new ItemStack(ModItems.wootzworkblade, 1),
|
||||
" ", "sss", "f f", 's', "stickWood", 'f', "fenceWood" );
|
||||
|
||||
/******************************************************************************
|
||||
CASTING
|
||||
@@ -410,7 +416,7 @@ public class ModCrafting{
|
||||
muddd,muddd,empty,muddd,muddd,
|
||||
muddd,empty,empty,empty,muddd,
|
||||
muddd,muddd,empty,muddd,muddd },
|
||||
new ItemStack(ModItems.bronzegladius, 1)
|
||||
new ItemStack(ModItems.rawbronzegladius, 1)
|
||||
);
|
||||
|
||||
//Casting Bronze Plate
|
||||
@@ -472,7 +478,7 @@ public class ModCrafting{
|
||||
muddd, muddd, muddd, muddd, muddd},
|
||||
copperhoehead
|
||||
);
|
||||
/*
|
||||
|
||||
//Casting Gladius
|
||||
CastingCrafting.addRecipe(
|
||||
new ItemStack(PrimalAPI.Items.COPPER_INGOT, 1),
|
||||
@@ -482,9 +488,8 @@ public class ModCrafting{
|
||||
muddd,muddd,empty,muddd,muddd,
|
||||
muddd,empty,empty,empty,muddd,
|
||||
muddd,muddd,empty,muddd,muddd },
|
||||
new ItemStack(ModItems.coppergladius, 1)
|
||||
new ItemStack(ModItems.rawcoppergladius, 1)
|
||||
);
|
||||
*/
|
||||
|
||||
//Casting Bronze Plate
|
||||
CastingCrafting.addRecipe(
|
||||
@@ -555,7 +560,7 @@ public class ModCrafting{
|
||||
//800, 200
|
||||
hotIronIngot,
|
||||
800,
|
||||
100,
|
||||
250,
|
||||
500,
|
||||
1.0f,
|
||||
1.0f
|
||||
@@ -565,7 +570,7 @@ public class ModCrafting{
|
||||
ModItems.ironcleaningotball,
|
||||
hotCleanIronIngot,
|
||||
900,
|
||||
250,
|
||||
275,
|
||||
500,
|
||||
1.0f,
|
||||
1.0f
|
||||
@@ -596,7 +601,7 @@ public class ModCrafting{
|
||||
Items.IRON_INGOT,
|
||||
hotIronIngot,
|
||||
800,
|
||||
200,
|
||||
250,
|
||||
500,
|
||||
1.0f,
|
||||
1.0f
|
||||
@@ -815,6 +820,18 @@ public class ModCrafting{
|
||||
ANVILING
|
||||
******************************************************************************/
|
||||
|
||||
/*** WORKBLADE ***/
|
||||
/*AnvilCrafting.addRecipe(
|
||||
new ItemStack [] {
|
||||
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir },
|
||||
new ItemStack(ModItems.wootzworkblade, 1),
|
||||
"null"
|
||||
);*/
|
||||
|
||||
/*** SLEDGEHAMMER ***/
|
||||
AnvilCrafting.addRecipe(
|
||||
new ItemStack [] {
|
||||
@@ -1065,7 +1082,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotChunk,emptyAir,emptyAir,
|
||||
emptyAir,hotChunk,hotChunk,hotChunk,emptyAir,
|
||||
emptyAir,emptyAir,hotChunk,emptyAir,emptyAir },
|
||||
new ItemStack(ModItems.wroughtirongladius, 1),
|
||||
new ItemStack(ModItems.rawwroughtirongladius, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp Clean Iron Sword ***/
|
||||
@@ -1077,7 +1094,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir,
|
||||
emptyAir,hotCleanChunk,hotCleanChunk,hotCleanChunk,emptyAir,
|
||||
emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir },
|
||||
new ItemStack(ModItems.cleanirongladius, 1),
|
||||
new ItemStack(ModItems.rawcleanirongladius, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp Steel Sword ***/
|
||||
@@ -1088,7 +1105,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir,
|
||||
emptyAir,hotSteelChunk,hotSteelChunk,hotSteelChunk,emptyAir,
|
||||
emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir },
|
||||
new ItemStack(ModItems.steelgladius, 1),
|
||||
new ItemStack(ModItems.rawsteelgladius, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp Wootz Sword ***/
|
||||
@@ -1099,7 +1116,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir,
|
||||
emptyAir,hotWootzChunk,hotWootzChunk,hotWootzChunk,emptyAir,
|
||||
emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir },
|
||||
new ItemStack(ModItems.wootzgladius, 1),
|
||||
new ItemStack(ModItems.rawwootzgladius, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp Clean Iron LongSword ***/
|
||||
@@ -1110,7 +1127,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir,
|
||||
emptyAir,hotCleanChunk,hotCleanChunk,hotCleanChunk,emptyAir,
|
||||
emptyAir,emptyAir,hotCleanChunk,emptyAir,emptyAir },
|
||||
new ItemStack(ModItems.cleanironlongsword, 1),
|
||||
new ItemStack(ModItems.rawcleanironlongsword, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp Steel LongSword ***/
|
||||
@@ -1121,7 +1138,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir,
|
||||
emptyAir,hotSteelChunk,hotSteelChunk,hotSteelChunk,emptyAir,
|
||||
emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir },
|
||||
new ItemStack(ModItems.steellongsword, 1),
|
||||
new ItemStack(ModItems.rawsteellongsword, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp Wootz LongSword ***/
|
||||
@@ -1132,7 +1149,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir,
|
||||
emptyAir,hotWootzChunk,hotWootzChunk,hotWootzChunk,emptyAir,
|
||||
emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir },
|
||||
new ItemStack(ModItems.wootzlongsword, 1),
|
||||
new ItemStack(ModItems.rawwootzlongsword, 1),
|
||||
"null"
|
||||
);
|
||||
|
||||
@@ -1144,7 +1161,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotChunk,hotChunk,emptyAir,
|
||||
emptyAir,hotChunk,hotChunk,hotChunk,hotChunk,
|
||||
emptyAir,emptyAir,hotChunk,hotChunk,emptyAir },
|
||||
new ItemStack(ModItems.wroughtironslayer, 1),
|
||||
new ItemStack(ModItems.rawironslayer, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp CLEANIRON SLAYER ***/
|
||||
@@ -1155,7 +1172,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotCleanChunk,hotCleanChunk,emptyAir,
|
||||
emptyAir,hotCleanChunk,hotCleanChunk,hotCleanChunk,hotCleanChunk,
|
||||
emptyAir,emptyAir,hotCleanChunk,hotCleanChunk,emptyAir },
|
||||
new ItemStack(ModItems.cleanironslayer, 1),
|
||||
new ItemStack(ModItems.rawcleanironslayer, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp STEELSLAYER ***/
|
||||
@@ -1166,7 +1183,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotSteelChunk,hotSteelChunk,emptyAir,
|
||||
emptyAir,hotSteelChunk,hotSteelChunk,hotSteelChunk,hotSteelChunk,
|
||||
emptyAir,emptyAir,hotSteelChunk,hotSteelChunk,emptyAir },
|
||||
new ItemStack(ModItems.steelslayer, 1),
|
||||
new ItemStack(ModItems.rawsteelslayer, 1),
|
||||
"null"
|
||||
);
|
||||
/*** Temp WOOTZ SLAYER ***/
|
||||
@@ -1177,7 +1194,7 @@ public class ModCrafting{
|
||||
emptyAir,emptyAir,hotWootzChunk,hotWootzChunk,emptyAir,
|
||||
emptyAir,hotWootzChunk,hotWootzChunk,hotWootzChunk,hotWootzChunk,
|
||||
emptyAir,emptyAir,hotWootzChunk,hotWootzChunk,emptyAir },
|
||||
new ItemStack(ModItems.wootzslayer, 1),
|
||||
new ItemStack(ModItems.rawwootzslayer, 1),
|
||||
"null"
|
||||
);
|
||||
|
||||
@@ -1852,7 +1869,7 @@ public class ModCrafting{
|
||||
AnvilCrafting.addRecipe(
|
||||
new ItemStack [] {
|
||||
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,hotSteelChunk,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,hotWootzChunk,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,wootzshovelhead,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir,
|
||||
emptyAir,emptyAir,emptyAir,emptyAir,emptyAir },
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package nmd.primal.forgecraft.init;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import static nmd.primal.forgecraft.init.ModConfig.Compatibility.COMPAT_DICTIONARY_WROUGHT_IRON;
|
||||
@@ -18,6 +19,8 @@ public class ModDictionary {/***************************************************
|
||||
*/
|
||||
public static void registerDictionaryNames()
|
||||
{
|
||||
OreDictionary.registerOre("ingotBronze", ModItems.bronzeingotball);
|
||||
OreDictionary.registerOre("nuggetBronze", ModItems.bronzechunk);
|
||||
if(COMPAT_DICTIONARY_WROUGHT_IRON) {
|
||||
OreDictionary.registerOre("ingotIron", ModItems.ironingotball);
|
||||
OreDictionary.registerOre("nuggetIron", ModItems.wroughtironchunk);
|
||||
@@ -32,5 +35,20 @@ public class ModDictionary {/***************************************************
|
||||
OreDictionary.registerOre("ingotWootz", ModItems.wootzingotball);
|
||||
OreDictionary.registerOre("nuggetWootz", ModItems.wootzchunk);
|
||||
//}
|
||||
OreDictionary.registerOre("dustBlaze", Items.BLAZE_POWDER);
|
||||
|
||||
|
||||
OreDictionary.registerOre("toolEngine", ModItems.woodfan);
|
||||
|
||||
OreDictionary.registerOre("gearPrimal", ModItems.woodensmallgear);
|
||||
OreDictionary.registerOre("gearPrimalSmall", ModItems.woodensmallgear);
|
||||
|
||||
OreDictionary.registerOre("gearPrimal", ModItems.woodenmediumgear);
|
||||
OreDictionary.registerOre("gearPrimalMedium", ModItems.woodenmediumgear);
|
||||
|
||||
OreDictionary.registerOre("gearPrimal", ModItems.woodenlargegear);
|
||||
OreDictionary.registerOre("gearPrimalLarge", ModItems.woodenlargegear);
|
||||
|
||||
OreDictionary.registerOre("gearboxCoverPrimal", ModItems.woodengearboxcasecover);
|
||||
}
|
||||
}
|
||||
78
kfc/src/main/java/nmd/primal/forgecraft/init/ModFluids.java
Normal file
78
kfc/src/main/java/nmd/primal/forgecraft/init/ModFluids.java
Normal file
@@ -0,0 +1,78 @@
|
||||
package nmd.primal.forgecraft.init;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.blocks.fluids.BasicFluidBlockKFC;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static nmd.primal.core.common.helper.RegistryHelper.registerFluidBlock;
|
||||
import static nmd.primal.core.common.helper.RegistryHelper.registerFluidItems;
|
||||
|
||||
public class ModFluids {
|
||||
|
||||
public static Fluid HOLY_WATER;
|
||||
|
||||
public static final Set<IFluidBlock> FLUID_BLOCKS = new HashSet<>();
|
||||
|
||||
// ***************************************************************************** //
|
||||
// Fluid Registration
|
||||
// ***************************************************************************** //
|
||||
@Mod.EventBusSubscriber(modid= ModInfo.MOD_ID)
|
||||
public static class RegistrationHandler
|
||||
{
|
||||
/**
|
||||
* Register this mod's fluid {@link Block}s.
|
||||
* @param event The event
|
||||
*/
|
||||
@SubscribeEvent
|
||||
public static void registryFluidBlocks(final RegistryEvent.Register<Block> event)
|
||||
{
|
||||
final IForgeRegistry<Block> registry = event.getRegistry();
|
||||
|
||||
/*registerFluidBlock(registry,
|
||||
HOLY_WATER = createFluid("holy_water", 0xFFEDF1F5, true,
|
||||
fluid -> fluid.setDensity(1000).setViscosity(1000).setTemperature(100).setLuminosity(5).setGaseous(false),
|
||||
fluid -> new BasicFluidBlockKFC(fluid, Material.WATER)));
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Register this mod's fluid {@link ItemBlock}s.
|
||||
* @param event The event
|
||||
*/
|
||||
// Use EventPriority.LOWEST so this is called after the RegistryEvent.Register<Item> handler in ModBlocks where
|
||||
// the ItemBlock for ModBlocks.FLUID_TANK is registered.
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public static void registryFluidItems(final RegistryEvent.Register<Item> event)
|
||||
{
|
||||
final IForgeRegistry<Item> registry = event.getRegistry();
|
||||
|
||||
registerFluidItems(registry, FLUID_BLOCKS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************** //
|
||||
// Registry Overrides
|
||||
// ***************************************************************************** //
|
||||
private static <T extends Block & IFluidBlock> Fluid createFluid(String name, int color, boolean hasFlowIcon, Consumer<Fluid> fluidPropertyApplier, Function<Fluid, T> blockFactory)
|
||||
{
|
||||
return nmd.primal.core.common.helper.RegistryHelper.createFluid(name, ModInfo.MOD_ID, FLUID_BLOCKS, color, hasFlowIcon, fluidPropertyApplier, blockFactory);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -11,8 +11,12 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.items.*;
|
||||
import nmd.primal.forgecraft.items.armor.CustomHelmet;
|
||||
import nmd.primal.forgecraft.items.blocks.ItemGearbox;
|
||||
import nmd.primal.forgecraft.items.blocks.ItemNBTCrucible;
|
||||
import nmd.primal.forgecraft.items.enginetools.BaseEngineTool;
|
||||
import nmd.primal.forgecraft.items.misc.*;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
||||
@@ -34,7 +38,23 @@ public class ModItems {
|
||||
public static Item softcrucible;
|
||||
//public static Item stonetongs;
|
||||
public static Item castingmud;
|
||||
//public static Item rawbronzegladius;
|
||||
public static Item grindingwheel;
|
||||
|
||||
|
||||
public static Item woodpistonarm;
|
||||
public static Item woodcrank;
|
||||
public static Item woodpiston;
|
||||
public static Item woodaxle;
|
||||
|
||||
public static Item woodfan;
|
||||
public static Item ironsaw;
|
||||
|
||||
public static Item woodensmallgear;
|
||||
public static Item woodenmediumgear;
|
||||
public static Item woodenlargegear;
|
||||
|
||||
public static Item woodengearboxcasecover;
|
||||
public static Item woodengearbox;
|
||||
|
||||
public static Item bronzeingotball;
|
||||
public static Item bronzechunk;
|
||||
@@ -116,6 +136,23 @@ public class ModItems {
|
||||
public static Item wootzshovel;
|
||||
public static Item wootzhoe;
|
||||
|
||||
public static Item rawbronzegladius;
|
||||
public static Item rawcoppergladius;
|
||||
public static Item rawwroughtirongladius;
|
||||
public static Item rawcleanirongladius;
|
||||
public static Item rawsteelgladius;
|
||||
public static Item rawwootzgladius;
|
||||
|
||||
public static Item rawcleanironlongsword ;
|
||||
public static Item rawsteellongsword;
|
||||
public static Item rawwootzlongsword;
|
||||
|
||||
public static Item rawironslayer;
|
||||
public static Item rawcleanironslayer;
|
||||
public static Item rawsteelslayer;
|
||||
public static Item rawwootzslayer;
|
||||
|
||||
public static Item coppergladius;
|
||||
public static Item bronzegladius;
|
||||
public static Item wroughtirongladius;
|
||||
public static Item cleanirongladius;
|
||||
@@ -167,12 +204,32 @@ public class ModItems {
|
||||
forgehammer = new ForgeHammer("forgehammer");
|
||||
castingmud = new BaseItem("castingmud");
|
||||
|
||||
|
||||
|
||||
rawlongbow = new RawLongbow("rawlongbow");
|
||||
unstrunglongbow = new BaseItem("unstrunglongbow");
|
||||
longbow = new Longbow("longbow");
|
||||
//matchlockmusket = new Musket("matchlock_musket");
|
||||
wootzworkblade = new Workblade("wootzworkblade", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, -1.0F).setFireProof(true);
|
||||
grindingwheel = new BaseSingleItem("grindingwheel", 9000);
|
||||
|
||||
/**********
|
||||
GEARS AND ENGINES
|
||||
**********/
|
||||
woodpistonarm = new BaseItem("woodpistonarm");
|
||||
woodcrank = new BaseItem("woodcrank");
|
||||
woodpiston = new BaseItem("woodpiston");
|
||||
woodaxle = new BaseEngineTool("woodaxle", PrimalAPI.ToolMaterials.TOOL_FLINT);
|
||||
|
||||
woodfan = new BaseEngineTool("woodfan", PrimalAPI.ToolMaterials.TOOL_FLINT);
|
||||
ironsaw = new BaseEngineTool("ironsaw", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||
|
||||
woodensmallgear = new BaseSingleItem("woodensmallgear", 1000);
|
||||
woodenmediumgear = new BaseSingleItem("woodenmediumgear", 1000);
|
||||
woodenlargegear = new BaseSingleItem("woodenlargegear", 1000);
|
||||
|
||||
woodengearboxcasecover = new BaseItem("woodengearboxcasecover");
|
||||
woodengearbox = new ItemGearbox("woodengearbox", ModBlocks.woodengearbox);
|
||||
|
||||
/**********
|
||||
TOOL PARTS
|
||||
@@ -249,8 +306,24 @@ public class ModItems {
|
||||
/**********
|
||||
WEAPONS
|
||||
**********/
|
||||
//rawbronzegladius = new Item().setRegistryName("rawbronzegladius").setUnlocalizedName("rawbronzegladius");
|
||||
|
||||
rawbronzegladius = new WeaponPart("rawbronzegladius", PrimalAPI.ToolMaterials.TOOL_BRONZE);
|
||||
rawcoppergladius= new WeaponPart("rawcoppergladius", PrimalAPI.ToolMaterials.TOOL_COPPER);
|
||||
rawwroughtirongladius= new WeaponPart("rawwroughtirongladius", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||
rawcleanirongladius= new WeaponPart("rawcleanirongladius", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON);
|
||||
rawsteelgladius= new WeaponPart("rawsteelgladius", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL);
|
||||
rawwootzgladius= new WeaponPart("rawwootzgladius", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL);
|
||||
|
||||
rawcleanironlongsword = new WeaponPart("rawcleanironlongsword", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON);
|
||||
rawsteellongsword = new WeaponPart("rawsteellongsword", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL);
|
||||
rawwootzlongsword = new WeaponPart("rawwootzlongsword", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL);
|
||||
|
||||
rawironslayer = new WeaponPart("rawironslayer", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||
rawcleanironslayer = new WeaponPart("rawcleanironslayer", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON);
|
||||
rawsteelslayer = new WeaponPart("rawsteelslayer", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL);
|
||||
rawwootzslayer = new WeaponPart("rawwootzslayer", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL);
|
||||
|
||||
coppergladius = new CustomSword("coppergladius", PrimalAPI.ToolMaterials.TOOL_COPPER, 5D, 2D);
|
||||
bronzegladius = new CustomSword("bronzegladius", PrimalAPI.ToolMaterials.TOOL_BRONZE, 5.5D, 2D);
|
||||
wroughtirongladius = new CustomSword("wroughtirongladius", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 4.5D, -1.85D);
|
||||
cleanirongladius = new CustomSword("cleanirongladius", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 5D, -1.85D);
|
||||
@@ -303,6 +376,8 @@ public class ModItems {
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
//ForgeRegistries.ITEMS.register();
|
||||
|
||||
ForgeRegistries.ITEMS.register(itemnbtcrucible);
|
||||
ForgeRegistries.ITEMS.register(slottedtongs);
|
||||
//ForgeRegistries.ITEMS.register(itemcrucible);
|
||||
@@ -311,6 +386,9 @@ public class ModItems {
|
||||
ForgeRegistries.ITEMS.register(softcrucible);
|
||||
ForgeRegistries.ITEMS.register(wootzworkblade);
|
||||
ForgeRegistries.ITEMS.register(forgehammer);
|
||||
ForgeRegistries.ITEMS.register(grindingwheel);
|
||||
|
||||
|
||||
|
||||
ForgeRegistries.ITEMS.register(bronzeingotball);
|
||||
ForgeRegistries.ITEMS.register(bronzechunk);
|
||||
@@ -324,6 +402,23 @@ public class ModItems {
|
||||
ForgeRegistries.ITEMS.register(wootzchunk);
|
||||
|
||||
//ForgeRegistries.ITEMS.register(test);
|
||||
/**********
|
||||
GEARS AND ENGINES
|
||||
**********/
|
||||
ForgeRegistries.ITEMS.register(woodpistonarm);
|
||||
ForgeRegistries.ITEMS.register(woodcrank);
|
||||
ForgeRegistries.ITEMS.register(woodpiston);
|
||||
ForgeRegistries.ITEMS.register(woodaxle);
|
||||
|
||||
ForgeRegistries.ITEMS.register(woodfan);
|
||||
ForgeRegistries.ITEMS.register(ironsaw);
|
||||
|
||||
ForgeRegistries.ITEMS.register(woodensmallgear);
|
||||
ForgeRegistries.ITEMS.register(woodenmediumgear);
|
||||
ForgeRegistries.ITEMS.register(woodenlargegear);
|
||||
ForgeRegistries.ITEMS.register(woodengearboxcasecover);
|
||||
ForgeRegistries.ITEMS.register(woodengearbox);
|
||||
|
||||
|
||||
/**********
|
||||
TOOL PARTS
|
||||
@@ -401,8 +496,24 @@ public class ModItems {
|
||||
/**********
|
||||
WEAPONS
|
||||
**********/
|
||||
//ForgeRegistries.ITEMS.register(rawbronzegladius);
|
||||
|
||||
ForgeRegistries.ITEMS.register(rawbronzegladius);
|
||||
ForgeRegistries.ITEMS.register(rawcoppergladius);
|
||||
ForgeRegistries.ITEMS.register(rawwroughtirongladius);
|
||||
ForgeRegistries.ITEMS.register(rawcleanirongladius);
|
||||
ForgeRegistries.ITEMS.register(rawsteelgladius);
|
||||
ForgeRegistries.ITEMS.register(rawwootzgladius);
|
||||
|
||||
ForgeRegistries.ITEMS.register(rawcleanironlongsword);
|
||||
ForgeRegistries.ITEMS.register(rawsteellongsword);
|
||||
ForgeRegistries.ITEMS.register(rawwootzlongsword);
|
||||
|
||||
ForgeRegistries.ITEMS.register(rawironslayer);
|
||||
ForgeRegistries.ITEMS.register(rawcleanironslayer);
|
||||
ForgeRegistries.ITEMS.register(rawsteelslayer);
|
||||
ForgeRegistries.ITEMS.register(rawwootzslayer);
|
||||
|
||||
ForgeRegistries.ITEMS.register(coppergladius);
|
||||
ForgeRegistries.ITEMS.register(wroughtirongladius);
|
||||
ForgeRegistries.ITEMS.register(bronzegladius);
|
||||
ForgeRegistries.ITEMS.register(cleanirongladius);
|
||||
@@ -449,6 +560,7 @@ public class ModItems {
|
||||
registerRender(softcrucible);
|
||||
registerRender(forgehammer);
|
||||
registerRender(wootzworkblade);
|
||||
registerRender(grindingwheel);
|
||||
|
||||
registerRender(bronzeingotball);
|
||||
registerRender(bronzechunk);
|
||||
@@ -463,10 +575,27 @@ public class ModItems {
|
||||
|
||||
//registerRender(test);
|
||||
|
||||
/**********
|
||||
GEARS AND ENGINES
|
||||
**********/
|
||||
registerRender(woodpistonarm);
|
||||
registerRender(woodcrank);
|
||||
registerRender(woodpiston);
|
||||
registerRender(woodaxle);
|
||||
|
||||
registerRender(woodfan);
|
||||
registerRender(ironsaw);
|
||||
|
||||
registerRender(woodensmallgear);
|
||||
registerRender(woodenmediumgear);
|
||||
registerRender(woodenlargegear);
|
||||
registerRender(woodengearboxcasecover);
|
||||
registerRender(woodengearbox);
|
||||
|
||||
|
||||
/**********
|
||||
TOOL PARTS
|
||||
**********/
|
||||
|
||||
registerRender(copperpickaxehead);
|
||||
registerRender(copperaxehead);
|
||||
registerRender(coppershovelhead);
|
||||
@@ -536,13 +665,32 @@ public class ModItems {
|
||||
registerRender(wootzhoe);
|
||||
registerRender(wootzsledgehammer);
|
||||
|
||||
|
||||
/**********
|
||||
WEAPON PARTS
|
||||
**********/
|
||||
//registerRender(wroughtironshield);
|
||||
registerRender(rawbronzegladius);
|
||||
registerRender(rawcoppergladius);
|
||||
registerRender(rawwroughtirongladius);
|
||||
registerRender(rawcleanirongladius);
|
||||
registerRender(rawsteelgladius);
|
||||
registerRender(rawwootzgladius);
|
||||
|
||||
registerRender(rawcleanironlongsword);
|
||||
registerRender(rawsteellongsword);
|
||||
registerRender(rawwootzlongsword);
|
||||
|
||||
registerRender(rawironslayer);
|
||||
registerRender(rawcleanironslayer);
|
||||
registerRender(rawsteelslayer);
|
||||
registerRender(rawwootzslayer);
|
||||
|
||||
/**********
|
||||
WEAPONS
|
||||
**********/
|
||||
registerRender(wroughtironshield);
|
||||
|
||||
//registerRender(rawbronzegladius);
|
||||
|
||||
registerRender(coppergladius);
|
||||
registerRender(bronzegladius);
|
||||
registerRender(wroughtirongladius);
|
||||
registerRender(cleanirongladius);
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraftforge.registries.RegistryBuilder;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import nmd.primal.forgecraft.crafting.MachineSawCrafting;
|
||||
import nmd.primal.forgecraft.crafting.WorkbenchCrafting;
|
||||
|
||||
/**
|
||||
@@ -35,5 +36,12 @@ public class ModRegistries {
|
||||
registryWorkbench.setIDRange(0, 1000);
|
||||
registryWorkbench.create();
|
||||
|
||||
PrimalAPI.logger(1, "Custom Registry", MachineSawCrafting.RECIPE_PREFIX);
|
||||
RegistryBuilder registryMachineSaw = new RegistryBuilder();
|
||||
registryMachineSaw.setType(MachineSawCrafting.class);
|
||||
registryMachineSaw.setName(new ResourceLocation(ModInfo.MOD_ID, "recipes_" + MachineSawCrafting.RECIPE_PREFIX));
|
||||
registryMachineSaw.setIDRange(0, 1000);
|
||||
registryMachineSaw.create();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ public class ModSounds {
|
||||
public static SoundEvent BOW_TWANG;
|
||||
public static SoundEvent CHISEL_HIT;
|
||||
public static SoundEvent CHISEL_HIT_FINISHED;
|
||||
public static SoundEvent ENGINE_EXTENSION;
|
||||
public static SoundEvent ENGINE_RETRACTION;
|
||||
public static SoundEvent SAW_MACHINE;
|
||||
|
||||
public static void registerSounds()
|
||||
{
|
||||
@@ -23,6 +26,9 @@ public class ModSounds {
|
||||
BOW_TWANG = registerSound("bow_twang");
|
||||
CHISEL_HIT = registerSound("chisel_hit");
|
||||
CHISEL_HIT_FINISHED = registerSound("chisel_hit_finished");
|
||||
ENGINE_EXTENSION = registerSound("piston_engine_out");
|
||||
ENGINE_RETRACTION = registerSound("piston_engine_in");
|
||||
SAW_MACHINE = registerSound("saw_machine");
|
||||
}
|
||||
|
||||
private static SoundEvent registerSound(String name)
|
||||
|
||||
@@ -14,6 +14,26 @@ public class ModTileRenders {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBreaker.class, new TileBreakerRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCastingForm.class, new TileCastingformRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileWorkbench.class, new TileWorkbenchRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileSharpBench.class, new TileSharpBenchRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileRedstoneEngine.class, new TileRedstoneEngineRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileGearbox.class, new TileGearboxRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileMachineSaw.class, new TileMachineSawRender());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileRedstoneEngine.class, new AnimationTESR<TileRedstoneEngine>()
|
||||
{
|
||||
@Override
|
||||
public void handleEvents(TileRedstoneEngine tileRedstoneBellows, float time, Iterable<Event> pastEvents)
|
||||
{
|
||||
|
||||
//tileRedstoneBellows.handleEvents(time, pastEvents);
|
||||
}
|
||||
});
|
||||
*/
|
||||
@@ -18,6 +18,10 @@ public class ModTiles {
|
||||
registerTileEntity(TileCastingForm.class, "castingform");
|
||||
registerTileEntity(TileNBTCrucible.class, "nbtcrucible");
|
||||
registerTileEntity(TileWorkbench.class, "workbench");
|
||||
registerTileEntity(TileSharpBench.class, "sharpbench");
|
||||
registerTileEntity(TileRedstoneEngine.class, "redstoneengine");
|
||||
registerTileEntity(TileGearbox.class, "gearbox");
|
||||
registerTileEntity(TileMachineSaw.class, "machine");
|
||||
}
|
||||
|
||||
private static void registerTileEntity(Class<? extends TileEntity> tile_class, String baseName) {
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package nmd.primal.forgecraft.init.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.common.recipes.tile.CauldronRecipe;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.crafting.handlers.tile.CauldronRecipe;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@GameRegistry.ObjectHolder(ModInfo.MOD_ID)
|
||||
@Mod.EventBusSubscriber
|
||||
public class CauldronRecipes
|
||||
@@ -20,18 +25,117 @@ public class CauldronRecipes
|
||||
{
|
||||
final IForgeRegistry<CauldronRecipe> recipes = event.getRegistry();
|
||||
|
||||
ItemStack defaultBronze = new ItemStack(ModItems.bronzegladius);
|
||||
ItemStack defaultBronzeGladius = new ItemStack(ModItems.rawbronzegladius, 1);
|
||||
ItemStack defaultCopperGladius = new ItemStack(ModItems.rawcoppergladius, 1);
|
||||
ItemStack defaultWroughtIronGladius = new ItemStack(ModItems.rawwroughtirongladius, 1);
|
||||
ItemStack defaultCleanIronGladius = new ItemStack(ModItems.rawcleanirongladius, 1);
|
||||
ItemStack defaultSteelGladius = new ItemStack(ModItems.rawsteelgladius, 1);
|
||||
ItemStack defaultWootzGladius = new ItemStack(ModItems.rawwootzgladius, 1);
|
||||
|
||||
NBTTagCompound tags = new NBTTagCompound();
|
||||
defaultBronze.setTagCompound(tags);
|
||||
ItemStack defaultCleanIronLongsword = new ItemStack(ModItems.rawcleanironlongsword, 1);
|
||||
ItemStack defaultSteelLongsword = new ItemStack(ModItems.rawsteellongsword, 1);
|
||||
ItemStack defaultWootzLongsword = new ItemStack(ModItems.rawwootzlongsword, 1);
|
||||
|
||||
ItemStack lapisBronze = defaultBronze.copy();
|
||||
lapisBronze.getTagCompound().setTag("tags", tags);
|
||||
lapisBronze.getSubCompound("tags").setInteger("smite", 0);
|
||||
lapisBronze.getSubCompound("tags").setInteger("bane", 0);
|
||||
lapisBronze.getSubCompound("tags").setInteger("fire", 0);
|
||||
lapisBronze.getSubCompound("tags").setInteger("lapis", 1);
|
||||
lapisBronze.getSubCompound("tags").setBoolean("modified", true);
|
||||
ItemStack defaultIronSlayer = new ItemStack(ModItems.rawironslayer, 1);
|
||||
ItemStack defaultCleanIronSlayer = new ItemStack(ModItems.rawcleanironslayer, 1);
|
||||
ItemStack defaultSteelSlayer = new ItemStack(ModItems.rawsteelslayer, 1);
|
||||
ItemStack defaultWootzSlayer = new ItemStack(ModItems.rawwootzslayer, 1);
|
||||
|
||||
List<ItemStack> recipeList = RecipeHelper.buildList(defaultBronzeGladius, defaultCopperGladius, defaultWroughtIronGladius, defaultCleanIronGladius, defaultSteelGladius, defaultWootzGladius,
|
||||
defaultCleanIronLongsword, defaultSteelLongsword, defaultWootzLongsword,
|
||||
defaultIronSlayer, defaultCleanIronSlayer, defaultSteelSlayer, defaultWootzSlayer);
|
||||
|
||||
for(ItemStack s : recipeList){
|
||||
setDefaultNBT(s);
|
||||
}
|
||||
|
||||
genRecipesForList(recipeList, recipes);
|
||||
|
||||
recipes.register(new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 500),
|
||||
null,
|
||||
RecipeHelper.getOreStack("sand", 1),
|
||||
RecipeHelper.getOreStack("slackLime", 4),
|
||||
RecipeHelper.getOreStack("clayball", 2),
|
||||
new ItemStack(ModItems.grindingwheel, 1),
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, ModItems.grindingwheel.getUnlocalizedName().toString()));
|
||||
|
||||
}
|
||||
|
||||
static void setDefaultNBT(ItemStack stack){
|
||||
stack.getOrCreateSubCompound("tags");
|
||||
stack.getSubCompound("tags").setInteger("smite", 0);
|
||||
stack.getSubCompound("tags").setInteger("bane", 0);
|
||||
stack.getSubCompound("tags").setInteger("fire", 0);
|
||||
stack.getSubCompound("tags").setInteger("fortune", 0);
|
||||
stack.getSubCompound("tags").setInteger("leech", 0);
|
||||
stack.getSubCompound("tags").setInteger("sweeping", 0);
|
||||
stack.getSubCompound("tags").setInteger("sharpness", 0);
|
||||
stack.getSubCompound("tags").setBoolean("hot", false);
|
||||
}
|
||||
|
||||
static CauldronRecipe genSmiteRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
8,
|
||||
new FluidStack(PrimalAPI.Fluids.BRINE, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("dustSilver", 2),
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("smite"));
|
||||
}
|
||||
static CauldronRecipe genBaneRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
8,
|
||||
new FluidStack(PrimalAPI.Fluids.BRINE, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("foodPoison", 2),
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("bane"));
|
||||
}
|
||||
|
||||
static CauldronRecipe genFireRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
8,
|
||||
new FluidStack(PrimalAPI.Fluids.BRINE, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("dustBlaze", 2),
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("fire"));
|
||||
}
|
||||
|
||||
static CauldronRecipe genFortuneRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
8,
|
||||
new FluidStack(PrimalAPI.Fluids.BRINE, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("gemLapis", 2),
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("fortune"));
|
||||
}
|
||||
|
||||
/*static CauldronRecipe genLeechRecipe(ItemStack stack) {
|
||||
return new CauldronRecipe(
|
||||
5,
|
||||
new FluidStack(FluidRegistry.WATER, 1000),
|
||||
new FluidStack(PrimalAPI.Fluids.WASTE, 1000),
|
||||
RecipeHelper.getOreStack("dustWitheredBone", 1),
|
||||
RecipeHelper.buildList(stack),
|
||||
stack,
|
||||
ItemStack.EMPTY).setRecipeName(ModInfo.MOD_ID, stack.getUnlocalizedName().toString().concat("leech"));
|
||||
}*/
|
||||
|
||||
static void genRecipesForList(List<ItemStack> list, IForgeRegistry<CauldronRecipe> recipes){
|
||||
for(ItemStack s : list){
|
||||
recipes.register(genSmiteRecipe(s));
|
||||
recipes.register(genBaneRecipe(s));
|
||||
recipes.register(genFireRecipe(s));
|
||||
recipes.register(genFortuneRecipe(s));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.common.recipes.tile.DryingRecipe;
|
||||
import nmd.primal.core.common.crafting.handlers.tile.DryingRecipe;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import nmd.primal.core.common.recipes.tile.HibachiRecipe;
|
||||
import nmd.primal.core.common.crafting.handlers.tile.HibachiRecipe;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import nmd.primal.core.api.interfaces.crafting.IDictionaryName;
|
||||
import nmd.primal.core.common.helper.RegistryHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
/**
|
||||
* Created by kitsu on 11/26/2016.
|
||||
*/
|
||||
public class BaseItem extends Item
|
||||
public class BaseItem extends Item implements IDictionaryName<Item>
|
||||
{
|
||||
public BaseItem(String registryName)
|
||||
{
|
||||
@@ -24,4 +27,30 @@ public class BaseItem extends Item
|
||||
return false;
|
||||
}
|
||||
|
||||
// ***************************************************************************** //
|
||||
// IDictionaryName
|
||||
// ***************************************************************************** //
|
||||
private String[] dictionary_names;
|
||||
|
||||
@Override
|
||||
public Item setDictionaryNames(String... strings)
|
||||
{
|
||||
this.dictionary_names = strings;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDictionaryNames()
|
||||
{
|
||||
return this.dictionary_names;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerDictionaryNames()
|
||||
{
|
||||
for (String name : this.getDictionaryNames())
|
||||
//RegistryHelper.registerDictionaryNames(new ItemStack(this, 1, OreDictionary.WILDCARD_VALUE), REGISTRY_NAME);
|
||||
RegistryHelper.registerDictionaryNames(new ItemStack(this), name);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import nmd.primal.core.api.interfaces.crafting.IDictionaryName;
|
||||
import nmd.primal.core.common.helper.RegistryHelper;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
/**
|
||||
* Created by kitsu on 11/26/2016.
|
||||
*/
|
||||
public class BaseSingleItem extends BaseItem implements IDictionaryName<Item>
|
||||
{
|
||||
public BaseSingleItem(String registryName, int damage)
|
||||
{
|
||||
super(registryName);
|
||||
this.setMaxStackSize(1);
|
||||
this.canRepair = false;
|
||||
this.setMaxDamage(damage);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.getRegistryName().toString();
|
||||
}
|
||||
|
||||
public static boolean isHidden()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// ***************************************************************************** //
|
||||
// IDictionaryName
|
||||
// ***************************************************************************** //
|
||||
private String[] dictionary_names;
|
||||
|
||||
@Override
|
||||
public Item setDictionaryNames(String... strings)
|
||||
{
|
||||
this.dictionary_names = strings;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDictionaryNames()
|
||||
{
|
||||
return this.dictionary_names;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerDictionaryNames()
|
||||
{
|
||||
for (String name : this.getDictionaryNames())
|
||||
//RegistryHelper.registerDictionaryNames(new ItemStack(this, 1, OreDictionary.WILDCARD_VALUE), REGISTRY_NAME);
|
||||
RegistryHelper.registerDictionaryNames(new ItemStack(this), name);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package nmd.primal.forgecraft.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
|
||||
/**
|
||||
* Created by mminaie on 2/7/18.
|
||||
*/
|
||||
public class AbstractItemBlock extends ItemBlock {
|
||||
private boolean is_fire_proof;
|
||||
|
||||
public AbstractItemBlock(Block block, boolean sub_types) {
|
||||
super(block);
|
||||
this.setHasSubtypes(sub_types);
|
||||
}
|
||||
|
||||
public AbstractItemBlock(Block block) {
|
||||
this(block, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreativeTabs getCreativeTab() {
|
||||
return ModInfo.TAB_FORGECRAFT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the normal 'lifespan' of this item when it is dropped on the ground as amount EntityItem.
|
||||
* This is in ticks, standard result is 6000, or 5 mins.
|
||||
*
|
||||
* @param itemStack The current ItemStack
|
||||
* @param world The world the entity is in
|
||||
* @return The normal lifespan in ticks.
|
||||
*/
|
||||
@Override
|
||||
public int getEntityLifespan(ItemStack itemStack, World world) {
|
||||
return 6000;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package nmd.primal.forgecraft.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
|
||||
/**
|
||||
* Created by mminaie on 2/7/18.
|
||||
*/
|
||||
public abstract class DefaultItemBlock extends ItemBlock {
|
||||
|
||||
public DefaultItemBlock(String name, Block block) {
|
||||
super(block);
|
||||
this.setUnlocalizedName(name);
|
||||
this.setRegistryName(name);
|
||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package nmd.primal.forgecraft.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.inventory.ItemStackHelper;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ItemGearbox extends DefaultItemBlock {
|
||||
public ItemGearbox(String name, Block block) {
|
||||
super(name, block);
|
||||
|
||||
this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
|
||||
|
||||
if (stack.hasTagCompound()) {
|
||||
|
||||
NonNullList<ItemStack> renderList = NonNullList.<ItemStack>withSize(3, ItemStack.EMPTY);
|
||||
if(stack.getSubCompound("BlockEntityTag") != null) {
|
||||
|
||||
ItemStackHelper.loadAllItems(stack.getSubCompound("BlockEntityTag"), renderList);
|
||||
//System.out.println(renderList);
|
||||
|
||||
if (RecipeHelper.isOreName(renderList.get(2), "gearboxCoverPrimal")) {
|
||||
return 0.1f;
|
||||
} else {
|
||||
return 0.0F;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
|
||||
if(!world.isRemote) {
|
||||
|
||||
if (!item.hasTagCompound()) {
|
||||
NonNullList<ItemStack> list = NonNullList.withSize(3, ItemStack.EMPTY);
|
||||
item.getOrCreateSubCompound("BlockEntityTag");
|
||||
ItemStackHelper.saveAllItems(item.getSubCompound("BlockEntityTag"), list, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class ItemNBTCrucible extends ItemBlock {
|
||||
@Override
|
||||
public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
|
||||
if(!world.isRemote) {
|
||||
|
||||
System.out.println(getHot(item));
|
||||
if (!item.hasTagCompound()) {
|
||||
NonNullList<ItemStack> list = NonNullList.withSize(5, ItemStack.EMPTY);
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package nmd.primal.forgecraft.items.enginetools;
|
||||
|
||||
import nmd.primal.forgecraft.items.BaseSingleItem;
|
||||
|
||||
public class BaseEngineTool extends BaseSingleItem {
|
||||
|
||||
private ToolMaterial toolMaterial;
|
||||
|
||||
public BaseEngineTool(String registryName, int damage) {
|
||||
super(registryName, damage);
|
||||
}
|
||||
public BaseEngineTool(String registryName, ToolMaterial toolMaterial) {
|
||||
super(registryName, toolMaterial.getMaxUses()*2);
|
||||
this.toolMaterial = toolMaterial;
|
||||
|
||||
}
|
||||
|
||||
public ToolMaterial getMaterial() {return toolMaterial;}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package nmd.primal.forgecraft.items.enginetools;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EngineToolFan extends BaseEngineTool {
|
||||
|
||||
public EngineToolFan(String registryName, ToolMaterial toolMaterial) {
|
||||
super(registryName, toolMaterial);
|
||||
}
|
||||
|
||||
public void doExtraFanWork(World world, BlockPos pos, IBlockState state, EnumFacing facing){
|
||||
if(!world.isRemote){
|
||||
/***
|
||||
B L O O M E R Y
|
||||
***/
|
||||
|
||||
/***
|
||||
F O R G E
|
||||
***/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
package nmd.primal.forgecraft.items.misc;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
package nmd.primal.forgecraft.items.misc;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
package nmd.primal.forgecraft.items.misc;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.forgecraft.ForgeCraft;
|
||||
import nmd.primal.forgecraft.items.BaseItem;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 2/4/17.
|
||||
@@ -1,4 +1,6 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
package nmd.primal.forgecraft.items.misc;
|
||||
|
||||
import nmd.primal.forgecraft.items.BaseItem;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 1/22/17.
|
||||
@@ -1,4 +1,6 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
package nmd.primal.forgecraft.items.misc;
|
||||
|
||||
import nmd.primal.forgecraft.items.BaseItem;
|
||||
|
||||
/**
|
||||
* Created by kitsu on 11/26/2016.
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
package nmd.primal.forgecraft.items.misc;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
@@ -12,8 +12,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.core.common.crafting.handlers.irecipe.ToolCraftingRecipe;
|
||||
import nmd.primal.core.common.items.tools.Gallagher;
|
||||
import nmd.primal.core.common.recipes.irecipe.ToolCraftingRecipe;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.util.ToolMaterialMap;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
package nmd.primal.forgecraft.items.misc;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -32,10 +32,11 @@ import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.core.common.tiles.AbstractTileTank;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.blocks.AnvilBase;
|
||||
import nmd.primal.forgecraft.blocks.NBTCrucible;
|
||||
import nmd.primal.forgecraft.blocks.anvil.AnvilBase;
|
||||
import nmd.primal.forgecraft.blocks.misc.NBTCrucible;
|
||||
import nmd.primal.forgecraft.blocks.machine.Forge;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.BaseMultiItem;
|
||||
import nmd.primal.forgecraft.items.blocks.ItemNBTCrucible;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.tiles.TileNBTCrucible;
|
||||
@@ -1,4 +1,4 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
package nmd.primal.forgecraft.items.misc;
|
||||
|
||||
import nmd.primal.core.common.items.tools.WorkBlade;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
@@ -127,7 +127,6 @@ public class ToolPart extends Item implements ToolNBT{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
package nmd.primal.forgecraft.items.parts;
|
||||
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.util.WeaponNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 3/9/17.
|
||||
*/
|
||||
public class WeaponPart extends Item implements WeaponNBT {
|
||||
|
||||
private ToolMaterial toolMaterial;
|
||||
|
||||
public WeaponPart(String name, ToolMaterial material) {
|
||||
this.setMaxDamage(material.getMaxUses());
|
||||
this.setUnlocalizedName(name);
|
||||
this.setRegistryName(name);
|
||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||
this.setMaxStackSize(1);
|
||||
this.setNoRepair();
|
||||
|
||||
this.toolMaterial = material;
|
||||
|
||||
this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
|
||||
|
||||
/***
|
||||
|
||||
HOT | SMITE | BANE | FIRE | FORTUNE | leech
|
||||
X.0 | 0.X | 0.0X | 0.00X | 0.000X | 0.0000X
|
||||
|
||||
***/
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
|
||||
if (item.hasTagCompound()) {
|
||||
Float returnFloat = 0.0F;
|
||||
if(WeaponNBT.getSmiteLevel(item)>0){
|
||||
returnFloat += 0.1F;
|
||||
}
|
||||
if(WeaponNBT.getBaneLevel(item)>0){
|
||||
returnFloat += (0.01F);
|
||||
}
|
||||
if(WeaponNBT.getFireLevel(item)>0){
|
||||
returnFloat += (0.001F);
|
||||
}
|
||||
if(WeaponNBT.getFortuneLevel(item)>0){
|
||||
returnFloat += (0.0001F);
|
||||
}
|
||||
if(WeaponNBT.getLeechLevel(item)>0){
|
||||
returnFloat += (0.00001F);
|
||||
}
|
||||
if(WeaponNBT.getHot(item)){
|
||||
returnFloat += 1.0F;
|
||||
}
|
||||
return returnFloat;
|
||||
}
|
||||
return 0.0F;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean isHidden()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public ToolMaterial getMaterial() {return toolMaterial;}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
|
||||
//System.out.println(item.getTagCompound());
|
||||
if(!item.hasTagCompound()) {
|
||||
WeaponNBT.setDefaultNBT(item);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreated(ItemStack item, World worldIn, EntityPlayer playerIn) {
|
||||
|
||||
if(!item.hasTagCompound()) {
|
||||
WeaponNBT.setDefaultNBT(item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
|
||||
{
|
||||
if(stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
//System.out.println(WeaponNBT.materialModifiers.get(this.toolMaterial));
|
||||
//System.out.println(stack.getSubCompound("tags").getInteger("modifiers"));
|
||||
tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (WeaponNBT.materialModifiers.get(this.toolMaterial) - WeaponNBT.getModifiers(stack)));
|
||||
//if (WeaponNBT.getSmiteLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.GOLD + "Holy: " + WeaponNBT.getSmiteLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getBaneLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.GREEN + "Spider Killing: " + WeaponNBT.getBaneLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getFireLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.RED + "Flame: " + WeaponNBT.getFireLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getFortuneLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.BLUE + "Thieving: " + WeaponNBT.getFortuneLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getLeechLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Life Steal: " + WeaponNBT.getLeechLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getSharpnessLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.WHITE + "Sharpness: " + WeaponNBT.getSharpnessLevel(stack));
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,26 @@ package nmd.primal.forgecraft.items.weapons;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentDamage;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.util.WeaponNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
@@ -23,11 +30,11 @@ import java.util.List;
|
||||
/**
|
||||
* Created by mminaie on 3/23/17.
|
||||
*/
|
||||
public class CustomSword extends ItemSword {
|
||||
public class CustomSword extends ItemSword implements WeaponNBT {
|
||||
|
||||
private double attack, speed;
|
||||
|
||||
public CustomSword(String name, Item.ToolMaterial material, double attackDamage, double attackSpeed) {
|
||||
public ToolMaterial toolMaterial;
|
||||
public CustomSword(String name, ToolMaterial material, double attackDamage, double attackSpeed) {
|
||||
super(material);
|
||||
this.setUnlocalizedName(name);
|
||||
this.setRegistryName(name);
|
||||
@@ -36,7 +43,7 @@ public class CustomSword extends ItemSword {
|
||||
this.setNoRepair();
|
||||
this.attack = attackDamage;
|
||||
this.speed = attackSpeed;
|
||||
|
||||
this.toolMaterial= material;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -57,9 +64,78 @@ public class CustomSword extends ItemSword {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity playerin, int itemSlot, boolean isSelected) {
|
||||
if(!world.isRemote){
|
||||
if(isSelected) {
|
||||
if(!stack.hasTagCompound()) {
|
||||
WeaponNBT.setDefaultNBT(stack);
|
||||
}
|
||||
if(stack.hasTagCompound()) {
|
||||
if (stack.getItemDamage() < stack.getMaxDamage() * 0.5) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 5);
|
||||
//System.out.println("Sharpness = 5");
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.5 && stack.getItemDamage() < stack.getMaxDamage() * 0.6) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 4);
|
||||
//System.out.println("Sharpness = 4");
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.6 && stack.getItemDamage() < stack.getMaxDamage() * 0.7) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 3);
|
||||
//System.out.println("Sharpness = 3");
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.7 && stack.getItemDamage() < stack.getMaxDamage() * 0.8) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 2);
|
||||
//System.out.println("Sharpness = 2");
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.8 && stack.getItemDamage() < stack.getMaxDamage() * 0.9) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 1);
|
||||
//System.out.println("Sharpness = 1");
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.9 && stack.getItemDamage() < stack.getMaxDamage()) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 0);
|
||||
//System.out.println("Sharpness = 0");
|
||||
}
|
||||
}
|
||||
//System.out.println(WeaponNBT.getSharpnessLevel(stack));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
@Override
|
||||
public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
|
||||
//System.out.println(item.getTagCompound());
|
||||
if(!item.hasTagCompound()) {
|
||||
WeaponNBT.setDefaultNBT(item);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreated(ItemStack item, World worldIn, EntityPlayer playerIn) {
|
||||
|
||||
if(!item.hasTagCompound()) {
|
||||
WeaponNBT.setDefaultNBT(item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity)
|
||||
{
|
||||
if(!player.world.isRemote) {
|
||||
WeaponNBT.removeAndSetEnchantsForStack(stack);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, EntityPlayer player)
|
||||
{
|
||||
if(!player.world.isRemote) {
|
||||
System.out.println(WeaponNBT.getSharpnessLevel(stack));
|
||||
WeaponNBT.removeAndSetEnchantsForStack(stack);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,6 +148,7 @@ public class CustomSword extends ItemSword {
|
||||
{
|
||||
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", this.attack, 0));
|
||||
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.speed, 0));
|
||||
|
||||
}
|
||||
|
||||
return multimap;
|
||||
@@ -79,13 +156,34 @@ public class CustomSword extends ItemSword {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
|
||||
public void addInformation(ItemStack stack, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
|
||||
{
|
||||
//tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
|
||||
if(item.hasTagCompound())
|
||||
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + stack.getItemDamage() );
|
||||
if(stack.hasTagCompound())
|
||||
{
|
||||
tooltip.add(ChatFormatting.GRAY + "Upgrades: " );
|
||||
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
//System.out.println(WeaponNBT.materialModifiers.get(this.toolMaterial));
|
||||
//System.out.println(stack.getSubCompound("tags").getInteger("modifiers"));
|
||||
tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (WeaponNBT.materialModifiers.get(this.toolMaterial) - WeaponNBT.getModifiers(stack)));
|
||||
//if (WeaponNBT.getSmiteLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.GOLD + "Holy: " + WeaponNBT.getSmiteLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getBaneLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.GREEN + "Spider Killing: " + WeaponNBT.getBaneLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getFireLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.RED + "Flame: " + WeaponNBT.getFireLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getFortuneLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.BLUE + "Thieving: " + WeaponNBT.getFortuneLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getLeechLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Life Steal: " + WeaponNBT.getLeechLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getSharpnessLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.WHITE + "Sharpness: " + WeaponNBT.getSharpnessLevel(stack));
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,28 @@
|
||||
package nmd.primal.forgecraft.items.weapons;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Enchantments;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.ItemArrow;
|
||||
import net.minecraft.item.ItemBow;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.animation.ITimeValue;
|
||||
import net.minecraftforge.common.animation.TimeValues;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.common.model.animation.CapabilityAnimation;
|
||||
import net.minecraftforge.common.model.animation.IAnimationStateMachine;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.items.BaseItem;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
@@ -107,7 +102,6 @@ public class Longbow extends ItemBow {
|
||||
{
|
||||
ItemArrow itemarrow = (ItemArrow)((ItemArrow)(itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.ARROW));
|
||||
EntityArrow entityarrow = itemarrow.createArrow(worldIn, itemstack, entityplayer);
|
||||
System.out.println(f);
|
||||
entityarrow.setDamage(entityarrow.getDamage()+(entityarrow.getDamage()*f));
|
||||
entityarrow.shoot(entityplayer, entityplayer.rotationPitch, entityplayer.rotationYaw, 0.0F, f * 6.0F, 0.5F);
|
||||
|
||||
|
||||
@@ -2,75 +2,98 @@ package nmd.primal.forgecraft.items.weapons;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.util.WeaponNBT;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 6/25/17.
|
||||
*/
|
||||
public class SlayerSword extends ItemSword {
|
||||
|
||||
private double attack, speed;
|
||||
public class SlayerSword extends CustomSword {
|
||||
|
||||
public SlayerSword(String name, Item.ToolMaterial material, double attackDamage, double attackSpeed) {
|
||||
super(material);
|
||||
this.setUnlocalizedName(name);
|
||||
this.setRegistryName(name);
|
||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||
this.setMaxStackSize(1);
|
||||
this.setNoRepair();
|
||||
this.attack = attackDamage;
|
||||
this.speed = attackSpeed;
|
||||
|
||||
super(name, material, attackDamage, attackSpeed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack item, World world, Entity playerin, int itemSlot, boolean isSelected) {
|
||||
public void onUpdate(ItemStack stack, World world, Entity ent, int itemSlot, boolean isSelected) {
|
||||
|
||||
if(isSelected){
|
||||
playerin.setSprinting(false);
|
||||
EntityPlayer player = (EntityPlayer) ent;
|
||||
if(!stack.hasTagCompound()) {
|
||||
WeaponNBT.setDefaultNBT(stack);
|
||||
}
|
||||
|
||||
if(!player.inventory.offHandInventory.isEmpty()) {
|
||||
ent.setSprinting(false);
|
||||
}
|
||||
if(stack.hasTagCompound()) {
|
||||
if (stack.getItemDamage() < stack.getMaxDamage() * 0.5) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 5);
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.5 && stack.getItemDamage() < stack.getMaxDamage() * 0.6) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 4);
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.6 && stack.getItemDamage() < stack.getMaxDamage() * 0.7) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 3);
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.7 && stack.getItemDamage() < stack.getMaxDamage() * 0.8) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 2);
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.8 && stack.getItemDamage() < stack.getMaxDamage() * 0.9) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 1);
|
||||
}
|
||||
if (stack.getItemDamage() > stack.getMaxDamage() * 0.9 && stack.getItemDamage() < stack.getMaxDamage()) {
|
||||
WeaponNBT.setSharpnessLevel(stack, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack stack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepairable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getItemEnchantability(ItemStack stack)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot)
|
||||
{
|
||||
Multimap<String, AttributeModifier> multimap = HashMultimap.<String, AttributeModifier>create();
|
||||
|
||||
if (equipmentSlot == EntityEquipmentSlot.MAINHAND)
|
||||
{
|
||||
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", this.attack, 0));
|
||||
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.speed, 0));
|
||||
public void addInformation(ItemStack stack, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn) {
|
||||
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + stack.getItemDamage());
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
//System.out.println(WeaponNBT.materialModifiers.get(this.toolMaterial));
|
||||
//System.out.println(stack.getSubCompound("tags").getInteger("modifiers"));
|
||||
tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (WeaponNBT.materialModifiers.get(this.toolMaterial) - WeaponNBT.getModifiers(stack)));
|
||||
//if (WeaponNBT.getSmiteLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.GOLD + "Holy: " + WeaponNBT.getSmiteLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getBaneLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.GREEN + "Spider Killing: " + WeaponNBT.getBaneLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getFireLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.RED + "Flame: " + WeaponNBT.getFireLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getFortuneLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.BLUE + "Thieving: " + WeaponNBT.getFortuneLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getLeechLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Life Steal: " + WeaponNBT.getLeechLevel(stack));
|
||||
//}
|
||||
//if (WeaponNBT.getSharpnessLevel(stack) > 0) {
|
||||
tooltip.add(ChatFormatting.WHITE + "Sharpness: " + WeaponNBT.getSharpnessLevel(stack));
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
return multimap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.blocks.AnvilBase;
|
||||
import nmd.primal.forgecraft.blocks.AnvilStone;
|
||||
import nmd.primal.forgecraft.blocks.anvil.AnvilBase;
|
||||
import nmd.primal.forgecraft.blocks.anvil.AnvilStone;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.BaseMultiItem;
|
||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||
@@ -129,7 +129,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
if (item.equals(ModItems.ironshovelhead) ||
|
||||
item.equals(ModItems.cleanironshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead)
|
||||
item.equals(ModItems.wootzshovelhead)
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
@@ -143,7 +143,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
if (item.equals(ModItems.ironhoehead) ||
|
||||
item.equals(ModItems.cleanironhoehead) ||
|
||||
item.equals(ModItems.steelhoehead) ||
|
||||
item.equals(ModItems.steelhoehead)
|
||||
item.equals(ModItems.wootzhoehead)
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
@@ -215,7 +215,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
if (item.equals(ModItems.ironshovelhead) ||
|
||||
item.equals(ModItems.cleanironshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead)
|
||||
item.equals(ModItems.wootzshovelhead)
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
@@ -302,7 +302,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
if (item.equals(ModItems.ironshovelhead) ||
|
||||
item.equals(ModItems.cleanironshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead)
|
||||
item.equals(ModItems.wootzshovelhead)
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
@@ -312,7 +312,10 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (item.equals(ModItems.ironhoehead)) {
|
||||
if (item.equals(ModItems.ironhoehead) ||
|
||||
item.equals(ModItems.cleanironhoehead) ||
|
||||
item.equals(ModItems.steelhoehead) ||
|
||||
item.equals(ModItems.wootzhoehead) ){
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
@@ -386,7 +389,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
if (item.equals(ModItems.ironshovelhead) ||
|
||||
item.equals(ModItems.cleanironshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead)
|
||||
item.equals(ModItems.wootzshovelhead)
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
@@ -396,7 +399,10 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (item.equals(ModItems.ironhoehead)) {
|
||||
if (item.equals(ModItems.ironhoehead) ||
|
||||
item.equals(ModItems.cleanironhoehead) ||
|
||||
item.equals(ModItems.steelhoehead) ||
|
||||
item.equals(ModItems.wootzhoehead) ){
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
package nmd.primal.forgecraft.renders.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.blocks.machine.SharpBench;
|
||||
import nmd.primal.forgecraft.blocks.machine.Workbench;
|
||||
import nmd.primal.forgecraft.blocks.misc.Gearbox;
|
||||
import nmd.primal.forgecraft.tiles.TileGearbox;
|
||||
import nmd.primal.forgecraft.tiles.TileSharpBench;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
/**
|
||||
* Created by kitsu on 12/4/2016.
|
||||
*/
|
||||
public class TileGearboxRender extends TileEntitySpecialRenderer<TileGearbox>
|
||||
{
|
||||
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
|
||||
@Override
|
||||
public void render(TileGearbox tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
|
||||
{
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
if (state.getBlock() instanceof Gearbox) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
//GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
ItemStack stack0 = tile.getSlotStack(0);
|
||||
ItemStack stack1 = tile.getSlotStack(1);
|
||||
ItemStack stack2 = tile.getSlotStack(2);
|
||||
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.NORTH) {
|
||||
|
||||
if (!stack0.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(17/32D, 9/32D, 17/32D);
|
||||
//GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
//if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
// GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||
//}
|
||||
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (!stack1.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(25/32D, 9/32D, 17/32D);
|
||||
GL11.glRotated(11.25F, 0F, 0F, 1.0F);
|
||||
//if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
// GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||
//}
|
||||
renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (!stack2.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(16/32D, 16/32D, 16/32D);
|
||||
GL11.glRotated(180F, 0.0F, 1.0F, 0.0F);
|
||||
//if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
// GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||
//}
|
||||
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.SOUTH) {
|
||||
if (!stack0.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(15/32D, 9/32D, 15/32D);
|
||||
//GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (!stack1.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(7/32D, 9/32D, 15/32D);
|
||||
GL11.glRotated(11.25F, 0F, 0F, 1.0F);
|
||||
renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (!stack2.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(16/32D, 16/32D, 16/32D);
|
||||
//GL11.glRotated(180F, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.EAST) {
|
||||
if (!stack0.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(15/32D, 9/32D, 17/32D);
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (!stack1.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(15/32D, 9/32D, 25/32D);
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(11.25F, 0F, 0F, 1F);
|
||||
renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (!stack2.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(16/32D, 16/32D, 16/32D);
|
||||
GL11.glRotated(90, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.WEST) {
|
||||
if (!stack0.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(17/32D, 9/32D, 15/32D);
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (!stack1.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(17/32D, 9/32D, 7/32D);
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(11.25F, 0F, 0F, 1F);
|
||||
renderItem.renderItem(stack1, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if (!stack2.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslated(16/32D, 16/32D, 16/32D);
|
||||
GL11.glRotated(-90, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,418 @@
|
||||
package nmd.primal.forgecraft.renders.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacingActive;
|
||||
import nmd.primal.forgecraft.blocks.machine.MachineSaw;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.tiles.TileMachineSaw;
|
||||
import nmd.primal.forgecraft.tiles.TileRedstoneEngine;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 4/9/17.
|
||||
*/
|
||||
public class TileMachineSawRender extends TileEntitySpecialRenderer<TileMachineSaw> {
|
||||
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
private boolean sound1;
|
||||
|
||||
private boolean getSound1() {
|
||||
return sound1;
|
||||
}
|
||||
private void setSound1(boolean sound) {
|
||||
this.sound1 = sound;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileMachineSaw tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
World world = tile.getWorld();
|
||||
|
||||
ItemStack saw = tile.getSlotStack(0);
|
||||
|
||||
if (state.getBlock() instanceof MachineSaw) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glScalef(1.0f, 1.0f, 1.0f);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
//N O R T H
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.NORTH) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((16 / 32D), (27 / 32D), (16 / 32D));
|
||||
GL11.glRotatef(180 , 0.0F, 1.0F, 0.0F);
|
||||
if(world.getBlockState(pos.west()).getBlock().equals(ModBlocks.redstoneengine)) {
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) && tile.getTransfer()) {
|
||||
GL11.glRotatef(-360 * createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone()), 1.0F, 0.0F, 0.0F);
|
||||
if(createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone())<=0.02F && !getSound1()){
|
||||
world.playSound(pos.getX(), pos.getY(), pos.getZ(), ModSounds.SAW_MACHINE, SoundCategory.BLOCKS, 0.15F, 1.0F, true);
|
||||
}
|
||||
if(createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone())>0.02F && getSound1()){
|
||||
setSound1(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
renderItem.renderItem(saw, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
//S O U T H//
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.SOUTH) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((16 / 32D), (27 / 32D), (16 / 32D));
|
||||
if(world.getBlockState(pos.east()).getBlock().equals(ModBlocks.redstoneengine)) {
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) && tile.getTransfer()) {
|
||||
GL11.glRotatef(-360 * createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone()), 1.0F, 0.0F, 0.0F);
|
||||
if(createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone())<=0.02F && !getSound1()){
|
||||
world.playSound(pos.getX(), pos.getY(), pos.getZ(), ModSounds.SAW_MACHINE, SoundCategory.BLOCKS, 0.15F, 1.0F, true);
|
||||
}
|
||||
if(createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone())>0.02F && getSound1()){
|
||||
setSound1(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
renderItem.renderItem(saw, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
//E A S T//
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.EAST) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((16 / 32D), (27 / 32D), (16 / 32D));
|
||||
GL11.glRotatef(90 , 0.0F, 1.0F, 0.0F);
|
||||
if(world.getBlockState(pos.north()).getBlock().equals(ModBlocks.redstoneengine)) {
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) && tile.getTransfer()) {
|
||||
GL11.glRotatef(360 * createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone()), 1.0F, 0.0F, 0.0F);
|
||||
if(createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone())<=0.02F && !getSound1()){
|
||||
world.playSound(pos.getX(), pos.getY(), pos.getZ(), ModSounds.SAW_MACHINE, SoundCategory.BLOCKS, 0.15F, 1.0F, true);
|
||||
}
|
||||
if(createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone())>0.02F && getSound1()){
|
||||
setSound1(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
renderItem.renderItem(saw, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
//W E S T//
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.WEST) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((16 / 32D), (27 / 32D), (16 / 32D));
|
||||
GL11.glRotatef(-90 , 0.0F, 1.0F, 0.0F);
|
||||
if(world.getBlockState(pos.south()).getBlock().equals(ModBlocks.redstoneengine)) {
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE) && tile.getTransfer()) {
|
||||
GL11.glRotatef(360 * createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone()), 1.0F, 0.0F, 0.0F);
|
||||
if(createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone())<=0.02F && !getSound1()){
|
||||
world.playSound(pos.getX(), pos.getY(), pos.getZ(), ModSounds.SAW_MACHINE, SoundCategory.BLOCKS, 0.15F, 1.0F, true);
|
||||
}
|
||||
if(createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone())>0.02F && getSound1()){
|
||||
setSound1(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
renderItem.renderItem(saw, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public float createOutputK(World world, Float gearMulti, int redstone){
|
||||
if(gearMulti==1){
|
||||
float k = (60 - (redstone*2));
|
||||
float time = (int) (world.getTotalWorldTime() % k);
|
||||
float tempK = (time / k);
|
||||
return tempK;
|
||||
} else if (gearMulti==4){
|
||||
float fastk = (60 - (redstone*2))*0.25F;
|
||||
float fastTime = (int) (world.getTotalWorldTime() % fastk);
|
||||
float tempk = fastTime / fastk;
|
||||
return tempk;
|
||||
} else if(gearMulti==0.25){
|
||||
float slowk = (60 - (redstone*2))*4F;
|
||||
float slowTime = (int) (world.getTotalWorldTime() % slowk);
|
||||
float tempk = slowTime / slowk;
|
||||
return tempk;
|
||||
} else return 0;
|
||||
}
|
||||
|
||||
}
|
||||
/************************
|
||||
S O U T H
|
||||
************************/
|
||||
/*
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.SOUTH) {
|
||||
/***CRANK***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((21/32D), (16/32D), (25/32D));
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
GL11.glRotatef(360*(time / k), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(crank, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***PISTON***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((29/32D), 16/32D, 1/16D);
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
doPistonRotations(time, k, angle, percentK, testAngle);
|
||||
}
|
||||
renderItem.renderItem(piston, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***ARM1***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated((29/32D), 16/32D, 3/32D);
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doPistonRotations(time, k, angle, percentK, testAngle);
|
||||
GL11.glTranslated(0, 0, tempZ);
|
||||
}
|
||||
renderItem.renderItem(arm, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***GEARBOX***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(16/32D, 23/32D, 16/32D);
|
||||
GL11.glRotatef(90, 0F, 1F, 0.0F);
|
||||
renderItem.renderItem(gearbox, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***TOOL SLOT***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float gearMulti = 1;
|
||||
|
||||
GL11.glTranslated((16/32D), 16/32D, 16/32D);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
|
||||
NonNullList<ItemStack> gearList = NonNullList.<ItemStack>withSize(3, ItemStack.EMPTY);
|
||||
if(gearbox.getSubCompound("BlockEntityTag") != null) {
|
||||
ItemStackHelper.loadAllItems(gearbox.getSubCompound("BlockEntityTag"), gearList);
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalSmall")) {
|
||||
gearMulti=4F;
|
||||
}
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalMedium")) {
|
||||
gearMulti=1;
|
||||
}
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalLarge")) {
|
||||
gearMulti=0.25f;
|
||||
}
|
||||
}
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotatef(-360*(percentK*gearMulti), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(slotTool, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
/************************
|
||||
E A S T
|
||||
************************/
|
||||
/*
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.EAST) {
|
||||
/***CRANK***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((25/32D), (16/32D), (11/32D));
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
GL11.glRotatef(360*(time / k), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(crank, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***PISTON***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((3/32D), 16/32D, 3/32D);
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
doPistonRotations(time, k, angle, percentK, testAngle);
|
||||
}
|
||||
renderItem.renderItem(piston, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***ARM1***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated((3/32D), 16/32D, 3/32D);
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doPistonRotations(time, k, angle, percentK, testAngle);
|
||||
GL11.glTranslated(0, 0, tempZ);
|
||||
}
|
||||
|
||||
renderItem.renderItem(arm, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***GEARBOX***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(16/32D, 23/32D, 16/32D);
|
||||
GL11.glRotatef(180, 0F, 1F, 0.0F);
|
||||
renderItem.renderItem(gearbox, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***TOOL SLOT***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float gearMulti = 1;
|
||||
|
||||
GL11.glTranslated((16/32D), 16/32D, 16/32D);
|
||||
GL11.glRotatef(-90, 0F, 1F, 0F);
|
||||
|
||||
NonNullList<ItemStack> gearList = NonNullList.<ItemStack>withSize(3, ItemStack.EMPTY);
|
||||
if(gearbox.getSubCompound("BlockEntityTag") != null) {
|
||||
ItemStackHelper.loadAllItems(gearbox.getSubCompound("BlockEntityTag"), gearList);
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalSmall")) {
|
||||
gearMulti=4F;
|
||||
}
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalMedium")) {
|
||||
gearMulti=1;
|
||||
}
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalLarge")) {
|
||||
gearMulti=0.25f;
|
||||
}
|
||||
}
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotatef(-360*(percentK*gearMulti), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(slotTool, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
/************************
|
||||
W E S T
|
||||
************************/
|
||||
/*
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.WEST) {
|
||||
/***CRANK***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((7/32D), (16/32D), (21/32D));
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
GL11.glRotatef(360*(time / k), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(crank, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***PISTON***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((29/32D), 16/32D, 29/32D);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
doPistonRotations(time, k, angle, percentK, testAngle);
|
||||
}
|
||||
renderItem.renderItem(piston, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***ARM1***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated((29/32D), 16/32D, 29/32D);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doPistonRotations(time, k, angle, percentK, testAngle);
|
||||
GL11.glTranslated(0, 0, tempZ);
|
||||
}
|
||||
|
||||
renderItem.renderItem(arm, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***GEARBOX***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(16/32D, 23/32D, 16/32D);
|
||||
//GL11.glRotatef(180, 0F, 1F, 0.0F);
|
||||
renderItem.renderItem(gearbox, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***TOOL SLOT***/
|
||||
/*
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float gearMulti = 1;
|
||||
|
||||
GL11.glTranslated((16/32D), 16/32D, 16/32D);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
|
||||
NonNullList<ItemStack> gearList = NonNullList.<ItemStack>withSize(3, ItemStack.EMPTY);
|
||||
if(gearbox.getSubCompound("BlockEntityTag") != null) {
|
||||
ItemStackHelper.loadAllItems(gearbox.getSubCompound("BlockEntityTag"), gearList);
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalSmall")) {
|
||||
gearMulti=4F;
|
||||
}
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalMedium")) {
|
||||
gearMulti=1;
|
||||
}
|
||||
if(RecipeHelper.isOreName(gearList.get(0), "gearPrimalLarge")) {
|
||||
gearMulti=0.25f;
|
||||
}
|
||||
}
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotatef(-360*(percentK*gearMulti), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(slotTool, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
*/
|
||||
//OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
//GL11.glPopMatrix();
|
||||
//}
|
||||
|
||||
|
||||
/*if( percentK >= 0 && percentK < 0.25 ) {
|
||||
GL11.glRotatef(angle * (time/(k/4)), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
float halfFloat = time - (k/4);
|
||||
if( percentK >= 0.25 && percentK < 0.5) {
|
||||
GL11.glRotatef(angle * (((k/4)-halfFloat)/(k/4)), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
if( percentK >= 0.5 && percentK < 0.75) {
|
||||
GL11.glRotatef(-angle * ((time-(k/2))/(k/4)), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
float thirdFloat = time - ((k/4)*3);
|
||||
if( percentK >= 0.75 && percentK < 1) {
|
||||
GL11.glRotatef(-angle * (((k/4)-thirdFloat)/(k/4)), 1.0F, 0.0F, 0.0F);
|
||||
|
||||
}*/
|
||||
@@ -0,0 +1,382 @@
|
||||
package nmd.primal.forgecraft.renders.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.inventory.ItemStackHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacingActive;
|
||||
import nmd.primal.forgecraft.blocks.machine.RedstoneEngine;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.tiles.TileRedstoneEngine;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 4/9/17.
|
||||
*/
|
||||
public class TileRedstoneEngineRender extends TileEntitySpecialRenderer<TileRedstoneEngine>
|
||||
{
|
||||
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
private static int time =0;
|
||||
//private static float k =60;
|
||||
private static float angle = 17;
|
||||
private boolean sound1;
|
||||
private boolean sound2;
|
||||
|
||||
private boolean getSound1() {
|
||||
return sound1;
|
||||
}
|
||||
private void setSound1(boolean sound) {
|
||||
this.sound1 = sound;
|
||||
}
|
||||
|
||||
private boolean getSound2() {
|
||||
return sound2;
|
||||
}
|
||||
private void setSound2(boolean sound) {
|
||||
this.sound2 = sound;
|
||||
}
|
||||
|
||||
|
||||
private void doPistonRotations(int t, float kon, float a, float pk, float testa, World world, BlockPos pos){
|
||||
|
||||
if( pk >= 0 && pk < 0.25 ) {
|
||||
if(pk<=0.02 && !getSound2()){
|
||||
world.playSound(pos.getX(), pos.getY(), pos.getZ(), ModSounds.ENGINE_RETRACTION, SoundCategory.BLOCKS, 0.25F, 1.0F, true);
|
||||
setSound2(true);
|
||||
}
|
||||
|
||||
GL11.glRotatef(angle * (time/(kon/4)), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
if( pk >= 0.25 && pk < 0.5) {
|
||||
if(getSound2()){
|
||||
setSound2(false);
|
||||
}
|
||||
GL11.glRotatef(testa, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
if( pk >= 0.5 && pk < 0.75) {
|
||||
if(pk<=0.52 && !getSound1()){
|
||||
world.playSound(pos.getX(), pos.getY(), pos.getZ(), ModSounds.ENGINE_EXTENSION, SoundCategory.BLOCKS, 0.2F, 1.0F, true);
|
||||
setSound1(true);
|
||||
}
|
||||
|
||||
GL11.glRotatef(testa, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
float thirdFloat = time - ((kon/4)*3);
|
||||
if( pk >= 0.75 && pk <= 1) {
|
||||
if(getSound1()){
|
||||
setSound1(false);
|
||||
}
|
||||
GL11.glRotatef(-angle * (((kon/4)-thirdFloat)/(kon/4)), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(TileRedstoneEngine tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
|
||||
{
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
World world = tile.getWorld();
|
||||
|
||||
ItemStack crank = new ItemStack(ModItems.woodcrank);
|
||||
ItemStack arm = new ItemStack(ModItems.woodpistonarm);
|
||||
ItemStack piston = new ItemStack(ModItems.woodpiston);
|
||||
|
||||
ItemStack gearbox = tile.getSlotStack(0);
|
||||
ItemStack slotTool = tile.getSlotStack(1);
|
||||
|
||||
float k = (60 - (tile.getRedstone()*2));
|
||||
time = (int) (tile.getWorld().getTotalWorldTime() % k);
|
||||
float percentK = time / k;
|
||||
|
||||
if (state.getBlock() instanceof RedstoneEngine) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glScalef(1.0f, 1.0f, 1.0f);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
//ItemStack stack0 = tile.getSlotStack(0);
|
||||
//float angleZ = (float) ((3/16D) * (Math.sin(Math.toRadians( (360*(time / k))-90 ))) );
|
||||
float tempY = (float) ((3/16D) * (Math.cos(Math.toRadians( (360*(time / k))-90) )) );
|
||||
float tempZ = (float) ((3/16D)+((3/16D) * (Math.sin(Math.toRadians( (360*(time / k))-90 ))) ));
|
||||
float testRads = (float) Math.atan(tempY/ (tempZ+(6.5/16F)) );
|
||||
float testAngle = (float)Math.toDegrees(testRads);
|
||||
|
||||
/************************
|
||||
N O R T H
|
||||
************************/
|
||||
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.NORTH) {
|
||||
/***C R A N K***/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((11/32D), (16/32D), (7/32D));
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
GL11.glRotatef(360*(percentK), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(crank, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***P I S T O N***/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((3/32D), 16/32D, 15/16D);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
doPistonRotations(time, k, angle, percentK, testAngle, world, pos);
|
||||
}
|
||||
renderItem.renderItem(piston, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***A R M***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated((3/32D), 16/32D, 29/32D);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
//GL11.glTranslated(0.0, ((3/16D) * Math.cos(Math.toRadians( (360*(time / k))-90) )),
|
||||
// (3/16D)+((3/16D) * Math.sin(Math.toRadians( (360*(time / k))-90 ))) );
|
||||
doPistonRotations(time, k, angle, percentK, testAngle, world, pos);
|
||||
GL11.glTranslated(0, 0, tempZ);
|
||||
|
||||
}
|
||||
renderItem.renderItem(arm, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***G E A R B O X***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(16/32D, 23/32D, 16/32D);
|
||||
GL11.glRotatef(-90, 0F, 1F, 0.0F);
|
||||
renderItem.renderItem(gearbox, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***A X L E***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated((16/32D), 16/32D, 16/32D);
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
|
||||
GL11.glRotatef(-360 * createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone()) , 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(-360*(percentKFast), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(slotTool, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
/************************
|
||||
S O U T H
|
||||
************************/
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.SOUTH) {
|
||||
/***CRANK***/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((21/32D), (16/32D), (25/32D));
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
GL11.glRotatef(360*(time / k), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(crank, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***PISTON***/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((29/32D), 16/32D, 1/16D);
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
doPistonRotations(time, k, angle, percentK, testAngle, world, pos);
|
||||
}
|
||||
renderItem.renderItem(piston, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***ARM1***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated((29/32D), 16/32D, 3/32D);
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doPistonRotations(time, k, angle, percentK, testAngle, world, pos);
|
||||
GL11.glTranslated(0, 0, tempZ);
|
||||
}
|
||||
renderItem.renderItem(arm, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***GEARBOX***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(16/32D, 23/32D, 16/32D);
|
||||
GL11.glRotatef(90, 0F, 1F, 0.0F);
|
||||
renderItem.renderItem(gearbox, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***TOOL SLOT***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float gearMulti = 1;
|
||||
|
||||
GL11.glTranslated((16/32D), 16/32D, 16/32D);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotatef(-360*createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone()), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(slotTool, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
/************************
|
||||
E A S T
|
||||
************************/
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.EAST) {
|
||||
/***CRANK***/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((25/32D), (16/32D), (11/32D));
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
GL11.glRotatef(360*(time / k), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(crank, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***PISTON***/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((3/32D), 16/32D, 3/32D);
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
doPistonRotations(time, k, angle, percentK, testAngle, world, pos);
|
||||
}
|
||||
renderItem.renderItem(piston, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***ARM1***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated((3/32D), 16/32D, 3/32D);
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doPistonRotations(time, k, angle, percentK, testAngle, world, pos);
|
||||
GL11.glTranslated(0, 0, tempZ);
|
||||
}
|
||||
|
||||
renderItem.renderItem(arm, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***GEARBOX***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(16/32D, 23/32D, 16/32D);
|
||||
GL11.glRotatef(180, 0F, 1F, 0.0F);
|
||||
renderItem.renderItem(gearbox, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***TOOL SLOT***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float gearMulti = 1;
|
||||
|
||||
GL11.glTranslated((16/32D), 16/32D, 16/32D);
|
||||
GL11.glRotatef(-90, 0F, 1F, 0F);
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotatef(-360*createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone()), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(slotTool, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
/************************
|
||||
W E S T
|
||||
************************/
|
||||
if (state.getValue(CustomContainerFacingActive.FACING) == EnumFacing.WEST) {
|
||||
/***CRANK***/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((7/32D), (16/32D), (21/32D));
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
GL11.glRotatef(360*(time / k), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(crank, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***PISTON***/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated((29/32D), 16/32D, 29/32D);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
doPistonRotations(time, k, angle, percentK, testAngle, world, pos);
|
||||
}
|
||||
renderItem.renderItem(piston, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***ARM1***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated((29/32D), 16/32D, 29/32D);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doPistonRotations(time, k, angle, percentK, testAngle, world, pos);
|
||||
GL11.glTranslated(0, 0, tempZ);
|
||||
}
|
||||
|
||||
renderItem.renderItem(arm, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***GEARBOX***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(16/32D, 23/32D, 16/32D);
|
||||
//GL11.glRotatef(180, 0F, 1F, 0.0F);
|
||||
renderItem.renderItem(gearbox, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
/***TOOL SLOT***/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float gearMulti = 1;
|
||||
|
||||
GL11.glTranslated((16/32D), 16/32D, 16/32D);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotatef(-360*createOutputK(tile.getWorld(), tile.getGearMulti(), tile.getRedstone()), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(slotTool, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public float createOutputK(World world, Float gearMulti, int redstone){
|
||||
if(gearMulti==1){
|
||||
float k = (60 - (redstone*2));
|
||||
float time = (int) (world.getTotalWorldTime() % k);
|
||||
float tempK = (time / k);
|
||||
return tempK;
|
||||
} else if (gearMulti==4){
|
||||
float fastk = (60 - (redstone*2))*0.25F;
|
||||
float fastTime = (int) (world.getTotalWorldTime() % fastk);
|
||||
float tempk = fastTime / fastk;
|
||||
return tempk;
|
||||
} else if(gearMulti==0.25){
|
||||
float slowk = (60 - (redstone*2))*4F;
|
||||
float slowTime = (int) (world.getTotalWorldTime() % slowk);
|
||||
float tempk = slowTime / slowk;
|
||||
return tempk;
|
||||
} else return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package nmd.primal.forgecraft.renders.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.machine.SharpBench;
|
||||
import nmd.primal.forgecraft.blocks.machine.Workbench;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||
import nmd.primal.forgecraft.tiles.TileSharpBench;
|
||||
import nmd.primal.forgecraft.tiles.TileWorkbench;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
/**
|
||||
* Created by kitsu on 12/4/2016.
|
||||
*/
|
||||
public class TileSharpBenchRender extends TileEntitySpecialRenderer<TileSharpBench>
|
||||
{
|
||||
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
|
||||
@Override
|
||||
public void render(TileSharpBench tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
|
||||
{
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
if (state.getBlock() instanceof SharpBench) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
//GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
ItemStack stack0 = tile.getSlotStack(0);
|
||||
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.NORTH) {
|
||||
|
||||
if (!stack0.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(0.5D, 0.71875D, 0.28125D);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||
}
|
||||
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.SOUTH) {
|
||||
if (!stack0.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(0.5D, 0.71875D, 1-0.28125D);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||
}
|
||||
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.EAST) {
|
||||
if (!stack0.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(1-0.28125D, 0.71875D, 0.5D);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
//GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||
}
|
||||
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.WEST) {
|
||||
if (!stack0.isEmpty()) {
|
||||
float scale = 1.0f;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(0.28125D, 0.71875D, 0.5D);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
//GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
GL11.glRotated(PrimalAPI.getRandom().nextDouble(0D, 360D), 0.0D, 0.0D, 1.0D);
|
||||
}
|
||||
renderItem.renderItem(stack0, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,10 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.machine.Workbench;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||
import nmd.primal.forgecraft.items.weapons.CustomSword;
|
||||
import nmd.primal.forgecraft.tiles.TileWorkbench;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -84,13 +87,20 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
}
|
||||
if(!stack2.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.4375, 0.71875D, 0.26D);
|
||||
GL11.glScalef(0.7F, 1F, 0.55F);
|
||||
GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if(RecipeHelper.isOreName(stack2.getItem(), "cordageGeneral")){
|
||||
GL11.glTranslated(0.3375, 0.64125D, 0.26D);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotated(90.0F, 1.0F, .0F, 0.0F);
|
||||
//GL11.glRotated(45.0F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
} else {
|
||||
GL11.glTranslated(0.4375, 0.65625D, 0.26D);
|
||||
GL11.glScalef(0.7F, 1F, 0.55F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
}
|
||||
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -98,38 +108,56 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.37D, 0.27D, 0.21D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
|
||||
if(stack3.getItem() instanceof WeaponPart){
|
||||
GL11.glTranslated(0.67D, 0.376D, 0.25D);
|
||||
GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
|
||||
} else {
|
||||
GL11.glTranslated(0.37D, 0.2075D, 0.21D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
}
|
||||
GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack4.isEmpty()){
|
||||
if(!stack4.isEmpty()) {
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.85, 0.71875D, 0.25D);
|
||||
|
||||
GL11.glTranslated(0.85, 0.65625D, 0.25D);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glRotated(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
renderItem.renderItem(stack4, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack5.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.48D, 0.3D, -0.15D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
if(!(stack5.getItem() instanceof CustomSword)) {
|
||||
GL11.glTranslated(0.48D, 0.20625D, -0.15D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
}
|
||||
if(stack5.getItem() instanceof CustomSword){
|
||||
GL11.glTranslated(0.2D, 0.42D, 0.075D);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack6.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
GL11.glTranslated(0.09375D, 0.6D, 0.53125D);
|
||||
GL11.glRotated(-45.0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
renderItem.renderItem(stack6, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.SOUTH) {
|
||||
@@ -166,21 +194,31 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
if(!stack2.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.5625, 0.71875D, 0.7925D);
|
||||
GL11.glScalef(0.7F, 1F, 0.55F);
|
||||
GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if(RecipeHelper.isOreName(stack2.getItem(), "cordageGeneral")){
|
||||
GL11.glTranslated(0.75, 0.64125D, 0.75D);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotated(90.0F, 1.0F, .0F, 0.0F);
|
||||
//GL11.glRotated(45.0F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
} else {
|
||||
GL11.glTranslated(0.5625, 0.65625D, 0.7925D);
|
||||
GL11.glScalef(0.7F, 1F, 0.55F);
|
||||
GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack3.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.55, 0.27D, 0.77D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
if(stack3.getItem() instanceof WeaponPart){
|
||||
GL11.glTranslated(0.32D, 0.376D, 0.75D);
|
||||
GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
|
||||
} else {
|
||||
GL11.glTranslated(0.55, 0.2075D, 0.77D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
}
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
@@ -191,7 +229,7 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.175, 0.71875D, 0.78D);
|
||||
GL11.glTranslated(0.175, 0.65625D, 0.78D);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glRotated(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
@@ -203,14 +241,34 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.52D, 0.3D, 1.15D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
|
||||
if(!(stack5.getItem() instanceof CustomSword)) {
|
||||
GL11.glTranslated(0.52D, 0.20625D, 1.15D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
}
|
||||
if(stack5.getItem() instanceof CustomSword){
|
||||
GL11.glTranslated(0.8D, 0.42D, 0.9D);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack6.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glTranslated(0.09375D, 0.6D, 0.53125D);
|
||||
GL11.glTranslated(1-0.09375D, 0.6D, 1-0.53125D);
|
||||
GL11.glRotated(-45.0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
renderItem.renderItem(stack6, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.EAST) {
|
||||
|
||||
@@ -246,25 +304,33 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
}
|
||||
if(!stack2.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.7925D, 0.71875D, 0.4375);
|
||||
GL11.glScalef(0.55F, 1F, 0.7F);
|
||||
GL11.glRotated(45F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if(RecipeHelper.isOreName(stack2.getItem(), "cordageGeneral")){
|
||||
GL11.glTranslated(0.75, 0.64125D, 0.25D);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotated(90.0F, 1.0F, .0F, 0.0F);
|
||||
//GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
} else {
|
||||
GL11.glTranslated(0.7925D, 0.65625D, 0.4375);
|
||||
GL11.glScalef(0.55F, 1F, 0.7F);
|
||||
GL11.glRotated(45F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack3.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.75, 0.27D, 0.4D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
if(stack3.getItem() instanceof WeaponPart){
|
||||
GL11.glTranslated(0.75, 0.376D, 0.675D);
|
||||
GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
|
||||
} else {
|
||||
GL11.glTranslated(0.75, 0.2075D, 0.4D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -272,7 +338,7 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.755, 0.71875D, 0.8D);
|
||||
GL11.glTranslated(0.755, 0.65625D, 0.8D);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
@@ -282,16 +348,32 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
}
|
||||
if(!stack5.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(1.15D, 0.3D, 0.485D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
|
||||
if(!(stack5.getItem() instanceof CustomSword)) {
|
||||
GL11.glTranslated(1.15D, 0.20625D, 0.485D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
}
|
||||
if(stack5.getItem() instanceof CustomSword){
|
||||
GL11.glTranslated(0.91D, 0.42D, 0.235D);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack6.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
GL11.glTranslated(1-0.53125D, 0.6D, 0.09375D);
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(-45.0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
renderItem.renderItem(stack6, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
if (state.getValue(Workbench.FACING) == EnumFacing.WEST) {
|
||||
|
||||
@@ -325,24 +407,31 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
}
|
||||
if(!stack2.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.255D, 0.71875D, 0.565);
|
||||
GL11.glScalef(0.55F, 1F, 0.7F);
|
||||
GL11.glRotated(45F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if(RecipeHelper.isOreName(stack2.getItem(), "cordageGeneral")){
|
||||
GL11.glTranslated(0.25, 0.64125D, 0.75D);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotated(90.0F, 1.0F, .0F, 0.0F);
|
||||
//GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
} else {
|
||||
GL11.glTranslated(0.255D, 0.65625D, 0.565);
|
||||
GL11.glScalef(0.55F, 1F, 0.7F);
|
||||
GL11.glRotated(45F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack3.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.235, 0.27D, 0.6D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
//GL11.glRotated(-180.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if(stack3.getItem() instanceof WeaponPart){
|
||||
GL11.glTranslated(0.225, 0.376D, 0.325D);
|
||||
GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
|
||||
} else {
|
||||
GL11.glTranslated(0.235, 0.2075D, 0.6D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
}
|
||||
|
||||
renderItem.renderItem(stack3, ItemCameraTransforms.TransformType.HEAD);
|
||||
GL11.glPopMatrix();
|
||||
@@ -351,7 +440,7 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.2175, 0.71875D, 0.185D);
|
||||
GL11.glTranslated(0.2175, 0.65625D, 0.185D);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
@@ -361,16 +450,28 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
|
||||
}
|
||||
if(!stack5.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
//System.out.println(stack2);
|
||||
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(-0.138D, 0.3D, 0.52D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
//GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if(!(stack5.getItem() instanceof CustomSword)) {
|
||||
GL11.glTranslated(-0.138D, 0.20625D, 0.52D);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
}
|
||||
if(stack5.getItem() instanceof CustomSword){
|
||||
GL11.glTranslated(0.095D, 0.42D, 0.8D);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
renderItem.renderItem(stack5, ItemCameraTransforms.TransformType.HEAD);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(!stack6.isEmpty()){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.53125D, 0.6D, 1-0.09375D);
|
||||
GL11.glRotated(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(-45.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
renderItem.renderItem(stack6, ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.FireHelper;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.blocks.NBTCrucible;
|
||||
import nmd.primal.forgecraft.blocks.misc.NBTCrucible;
|
||||
import nmd.primal.forgecraft.blocks.machine.BloomeryBase;
|
||||
import nmd.primal.forgecraft.crafting.CrucibleCrafting;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package nmd.primal.forgecraft.tiles;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
|
||||
public class TileGearbox extends TileBaseSlot /*implements ITickable*/ {
|
||||
|
||||
public TileGearbox() {
|
||||
}
|
||||
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
||||
if(index == 0 || index == 1) {
|
||||
if(this.getSlotStack(0).isEmpty() && this.getSlotStack(1).isEmpty()){
|
||||
if (RecipeHelper.isOreName(stack, "gearPrimal")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(!this.getSlotStack(0).isEmpty()){
|
||||
if(index == 1){
|
||||
if(RecipeHelper.isOreName(this.getSlotStack(0), "gearPrimalSmall") &&
|
||||
RecipeHelper.isOreName(stack, "gearPrimalLarge")){
|
||||
return true;
|
||||
}
|
||||
if(RecipeHelper.isOreName(this.getSlotStack(0), "gearPrimalLarge") &&
|
||||
RecipeHelper.isOreName(stack, "gearPrimalSmall")){
|
||||
return true;
|
||||
}
|
||||
if(RecipeHelper.isOreName(this.getSlotStack(0), "gearPrimalMedium") &&
|
||||
RecipeHelper.isOreName(stack, "gearPrimalMedium")){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!this.getSlotStack(1).isEmpty()){
|
||||
if(index == 0){
|
||||
if(RecipeHelper.isOreName(this.getSlotStack(1), "gearPrimalSmall") &&
|
||||
RecipeHelper.isOreName(stack, "gearPrimalLarge")){
|
||||
return true;
|
||||
}
|
||||
if(RecipeHelper.isOreName(this.getSlotStack(1), "gearPrimalLarge") &&
|
||||
RecipeHelper.isOreName(stack, "gearPrimalSmall")){
|
||||
return true;
|
||||
}
|
||||
if(RecipeHelper.isOreName(this.getSlotStack(1), "gearPrimalMedium") &&
|
||||
RecipeHelper.isOreName(stack, "gearPrimalMedium")){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(index == 2){
|
||||
if(this.getSlotStack(2).isEmpty()) {
|
||||
if (RecipeHelper.isOreName(stack, "gearboxCoverPrimal")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package nmd.primal.forgecraft.tiles;
|
||||
|
||||
import net.minecraft.inventory.ItemStackHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import nmd.primal.forgecraft.items.blocks.ItemGearbox;
|
||||
import nmd.primal.forgecraft.items.enginetools.BaseEngineTool;
|
||||
|
||||
public class TileMachineSaw extends TileBaseSlot /*implements ITickable*/ {
|
||||
|
||||
|
||||
|
||||
private float torque;
|
||||
private float power;
|
||||
private float rpm;
|
||||
|
||||
private int redstone;
|
||||
private float gearMulti;
|
||||
|
||||
private boolean transfer;
|
||||
private boolean playSound;
|
||||
|
||||
public int getRedstone() {
|
||||
return redstone;
|
||||
}
|
||||
|
||||
public void setRedstone(int redstone) {
|
||||
this.redstone = redstone;
|
||||
}
|
||||
|
||||
public float getGearMulti() {
|
||||
return gearMulti;
|
||||
}
|
||||
|
||||
public void setGearMulti(float gearMulti) {
|
||||
this.gearMulti = gearMulti;
|
||||
}
|
||||
|
||||
public void setTorque(float torque) {
|
||||
this.torque = torque;
|
||||
}
|
||||
|
||||
public void setPower(float power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public void setRpm(float rpm) {
|
||||
this.rpm = rpm;
|
||||
}
|
||||
|
||||
public float getTorque() {
|
||||
return torque;
|
||||
}
|
||||
|
||||
public float getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
public float getRpm() {
|
||||
return rpm;
|
||||
}
|
||||
|
||||
public boolean getTransfer() {
|
||||
return transfer;
|
||||
}
|
||||
|
||||
public void setTransfer(boolean transfer) {
|
||||
this.transfer = transfer;
|
||||
}
|
||||
public boolean getPlaySound() {
|
||||
return playSound;
|
||||
}
|
||||
|
||||
public void setPlaySound(boolean playSound) {
|
||||
this.playSound = playSound;
|
||||
}
|
||||
|
||||
public TileMachineSaw() {
|
||||
}
|
||||
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
||||
|
||||
if(index == 0){
|
||||
if(this.getSlotStack(0).isEmpty() && stack.getItem() instanceof BaseEngineTool) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ***************************************************************************** //
|
||||
// NBT
|
||||
// ***************************************************************************** //
|
||||
@Override
|
||||
public NBTTagCompound readNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.readNBT(nbt);
|
||||
this.torque = nbt.getFloat("torque");
|
||||
this.power = nbt.getFloat("power");
|
||||
this.rpm = nbt.getFloat("rpm");
|
||||
this.redstone = nbt.getInteger("redstone");
|
||||
this.gearMulti = nbt.getFloat("gear");
|
||||
this.transfer = nbt.getBoolean("transfer");
|
||||
return nbt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeNBT(NBTTagCompound nbt)
|
||||
{
|
||||
nbt.setFloat("torque", this.torque);
|
||||
nbt.setFloat("power", this.power);
|
||||
nbt.setFloat("rpm", this.rpm);
|
||||
nbt.setInteger("redstone", this.redstone);
|
||||
nbt.setFloat("gear", this.gearMulti);
|
||||
nbt.setBoolean("transfer", this.transfer);
|
||||
super.writeNBT(nbt);
|
||||
return nbt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -76,12 +76,19 @@ public class TileNBTCrucible extends BaseTile implements ITickable {
|
||||
|
||||
private void dropsManager(){
|
||||
CrucibleCrafting recipe = CrucibleCrafting.getRecipe(this.ingList.get(0), this.ingList.get(1), this.ingList.get(2), this.ingList.get(3), this.ingList.get(4));
|
||||
if(recipe!=null){
|
||||
if( (this.getHot() == 15) && (this.getStatus()) ){
|
||||
this.setDrops(recipe.getDropsCooked());
|
||||
} else if ((this.getHot() == 15) && (!this.getStatus())){
|
||||
if(recipe!=null) {
|
||||
if(this.getDrops() == null){
|
||||
this.setDrops(recipe.getDropsRaw());
|
||||
}
|
||||
if(this.getDrops() != recipe.getDropsCooked()) {
|
||||
if ((this.getHot() == 6) && (this.getStatus())) {
|
||||
this.setDrops(recipe.getDropsCooked());
|
||||
}
|
||||
if ((this.getHot() == 15) && (this.getStatus())) {
|
||||
this.setDrops(recipe.getDropsRaw());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
package nmd.primal.forgecraft.tiles;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import nmd.primal.forgecraft.items.blocks.ItemGearbox;
|
||||
import nmd.primal.forgecraft.items.enginetools.BaseEngineTool;
|
||||
|
||||
public class TileRedstoneEngine extends TileBaseSlot {
|
||||
|
||||
private int redstone; // AKA power
|
||||
private float torque; // = power/speed
|
||||
private float power;// = 100*redstone;
|
||||
private float rpm;
|
||||
|
||||
private boolean transfer = false;
|
||||
private float gearMulti;
|
||||
|
||||
public float getGearMulti() { return gearMulti; }
|
||||
public void setGearMulti(float gearMulti){ this.gearMulti = gearMulti;}
|
||||
|
||||
public int getRedstone() { return redstone; }
|
||||
public void setRedstone(int redstone) { this.redstone = redstone; }
|
||||
|
||||
public float getTorque() { return torque; }
|
||||
public void setTorque(float torque) {
|
||||
this.torque = torque;
|
||||
}
|
||||
|
||||
public float getRPM() { return rpm; }
|
||||
public void setRPM(float rpm) {
|
||||
this.rpm = rpm;
|
||||
}
|
||||
|
||||
public float getPower() {return power; }
|
||||
public void setPower() { this.power = 100*redstone; }
|
||||
|
||||
public boolean getTransfer() { return transfer; }
|
||||
public void setTransfer(boolean transfer) {
|
||||
this.transfer = transfer;
|
||||
}
|
||||
|
||||
public TileRedstoneEngine() {
|
||||
}
|
||||
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
||||
if(index == 0 ) {
|
||||
if (this.getSlotStack(0).isEmpty() && stack.getItem() instanceof ItemGearbox) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(index == 1){
|
||||
if(this.getSlotStack(1).isEmpty() && !this.getSlotStack(0).isEmpty() && stack.getItem() instanceof BaseEngineTool) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ***************************************************************************** //
|
||||
// NBT
|
||||
// ***************************************************************************** //
|
||||
@Override
|
||||
public NBTTagCompound readNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.readNBT(nbt);
|
||||
this.redstone = nbt.getInteger("redstone");
|
||||
this.torque = nbt.getFloat("torque");
|
||||
this.power = nbt.getFloat("power");
|
||||
this.rpm = nbt.getFloat("rpm");
|
||||
this.transfer = nbt.getBoolean("transfer");
|
||||
this.gearMulti = nbt.getFloat("gear");
|
||||
return nbt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeNBT(NBTTagCompound nbt)
|
||||
{
|
||||
nbt.setInteger("redstone", this.redstone);
|
||||
nbt.setFloat("torque", this.torque);
|
||||
nbt.setFloat("power", this.power);
|
||||
nbt.setFloat("rpm", this.rpm);
|
||||
nbt.setBoolean("transfer", this.transfer);
|
||||
nbt.setFloat("gear", this.gearMulti);
|
||||
super.writeNBT(nbt);
|
||||
return nbt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package nmd.primal.forgecraft.tiles;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.core.common.items.tools.Gallagher;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponGuard;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomShovel;
|
||||
|
||||
public class TileSharpBench extends TileBaseSlot implements ITickable {
|
||||
|
||||
private int iteration = 0;
|
||||
|
||||
public int getCharge() {
|
||||
return charge;
|
||||
}
|
||||
|
||||
public void setCharge(int charge) {
|
||||
this.charge = charge;
|
||||
}
|
||||
|
||||
private int charge;
|
||||
|
||||
@Override
|
||||
public void update () {
|
||||
World world = this.getWorld();
|
||||
if (!world.isRemote) {
|
||||
IBlockState state = world.getBlockState(this.pos);
|
||||
|
||||
if(state.getValue(PrimalAPI.States.ACTIVE)){
|
||||
this.iteration++;
|
||||
if(iteration > 80){
|
||||
if(charge > 0){
|
||||
charge -= 1;
|
||||
}
|
||||
iteration = 0;
|
||||
}
|
||||
}
|
||||
if(this.charge==0){
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.ACTIVE, false), 2);
|
||||
this.updateBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
||||
if(index == 0){
|
||||
if(stack.getItem()== ModItems.grindingwheel){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ***************************************************************************** //
|
||||
// NBT
|
||||
// ***************************************************************************** //
|
||||
@Override
|
||||
public NBTTagCompound readNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.readNBT(nbt);
|
||||
this.charge = nbt.getInteger("charge");
|
||||
return nbt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeNBT(NBTTagCompound nbt)
|
||||
{
|
||||
nbt.setInteger("charge", this.charge);
|
||||
super.writeNBT(nbt);
|
||||
return nbt;
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,15 @@ package nmd.primal.forgecraft.tiles;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.core.common.items.tools.Gallagher;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponGuard;
|
||||
import nmd.primal.forgecraft.items.parts.WeaponPart;
|
||||
import nmd.primal.forgecraft.items.tools.CustomAxe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomHoe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomPickaxe;
|
||||
import nmd.primal.forgecraft.items.tools.CustomShovel;
|
||||
import nmd.primal.forgecraft.items.weapons.CustomSword;
|
||||
|
||||
public class TileWorkbench extends TileBaseSlot{
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
||||
@@ -25,22 +29,20 @@ public class TileWorkbench extends TileBaseSlot{
|
||||
}
|
||||
}*/
|
||||
if(index == 2){
|
||||
if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") || RecipeHelper.isOreName(stack.getItem(), "stickLacquer")){
|
||||
if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") ||
|
||||
RecipeHelper.isOreName(stack.getItem(), "stickLacquer") ||
|
||||
RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/*if(index == 3){
|
||||
if (RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")) {
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
if(index == 3){
|
||||
if ( (stack.getItem() instanceof ToolPart)) {
|
||||
if ( (stack.getItem() instanceof ToolPart) || stack.getItem() instanceof WeaponPart) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(index == 4){
|
||||
if (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) {
|
||||
if ( (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) ||
|
||||
stack.getItem() instanceof WeaponGuard) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -48,7 +50,13 @@ public class TileWorkbench extends TileBaseSlot{
|
||||
if(stack.getItem() instanceof CustomAxe ||
|
||||
stack.getItem() instanceof CustomHoe ||
|
||||
stack.getItem() instanceof CustomPickaxe ||
|
||||
stack.getItem() instanceof CustomShovel){
|
||||
stack.getItem() instanceof CustomShovel ||
|
||||
stack.getItem() instanceof CustomSword){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(index == 6){
|
||||
if (stack.getItem() instanceof Gallagher) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,15 +17,15 @@ import nmd.primal.forgecraft.CommonUtils;
|
||||
import nmd.primal.forgecraft.crafting.AnvilCrafting;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.BaseMultiItem;
|
||||
import nmd.primal.forgecraft.items.ForgeHammer;
|
||||
import nmd.primal.forgecraft.items.SlottedTongs;
|
||||
import nmd.primal.forgecraft.items.misc.ForgeHammer;
|
||||
import nmd.primal.forgecraft.items.misc.SlottedTongs;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
import static nmd.primal.forgecraft.blocks.CustomContainerFacing.FACING;
|
||||
import static nmd.primal.forgecraft.items.SlottedTongs.ITEM_HANDLER;
|
||||
import static nmd.primal.forgecraft.items.misc.SlottedTongs.ITEM_HANDLER;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 6/10/17.
|
||||
|
||||
@@ -8,9 +8,9 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
import nmd.primal.core.common.crafting.handlers.inworld.GallagherRecipe;
|
||||
import nmd.primal.core.common.helper.PlayerHelper;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.core.common.recipes.inworld.GallagherRecipe;
|
||||
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
|
||||
import nmd.primal.forgecraft.tiles.TileBreaker;
|
||||
|
||||
@@ -48,7 +48,7 @@ public interface BreakerHandler {
|
||||
|
||||
if (RecipeHelper.isOreName(smashStack, "cobblestone")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(Blocks.GRAVEL, randomChanceReturn(9, 1, 1)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -56,7 +56,7 @@ public interface BreakerHandler {
|
||||
}
|
||||
if (RecipeHelper.isOreName(smashStack, "gravel")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(Blocks.SAND, randomChanceReturn(9, 1, 1)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -66,7 +66,7 @@ public interface BreakerHandler {
|
||||
for (GallagherRecipe recipe : GallagherRecipe.RECIPES) {
|
||||
if (recipe.match(smashState)) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), recipe.getOutputStack());
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -76,7 +76,7 @@ public interface BreakerHandler {
|
||||
|
||||
if (RecipeHelper.isOreName(smashStack, "oreIron")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.IRON_DUST, randomChanceReturn(9, 1, 2)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -84,7 +84,7 @@ public interface BreakerHandler {
|
||||
}
|
||||
if (RecipeHelper.isOreName(smashStack, "oreCopper")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.COPPER_DUST, randomChanceReturn(9, 1, 2)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -92,7 +92,7 @@ public interface BreakerHandler {
|
||||
}
|
||||
if (RecipeHelper.isOreName(smashStack, "oreTin")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.TIN_DUST, randomChanceReturn(9, 1, 2)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -100,7 +100,7 @@ public interface BreakerHandler {
|
||||
}
|
||||
if (RecipeHelper.isOreName(smashStack, "oreZinc")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.ZINC_DUST, randomChanceReturn(9, 1, 2)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -108,7 +108,7 @@ public interface BreakerHandler {
|
||||
}
|
||||
if (RecipeHelper.isOreName(smashStack, "oreGold")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalAPI.Items.GOLD_DUST, randomChanceReturn(9, 1, 2)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -116,7 +116,7 @@ public interface BreakerHandler {
|
||||
}
|
||||
if (RecipeHelper.isOreName(smashStack, "cobblestone")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(Blocks.GRAVEL, randomChanceReturn(9, 1, 1)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
@@ -124,7 +124,7 @@ public interface BreakerHandler {
|
||||
}
|
||||
if (RecipeHelper.isOreName(smashStack, "gravel")) {
|
||||
if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
|
||||
world.setBlockToAir(pos.offset(face));
|
||||
world.destroyBlock(pos.offset(face), false);
|
||||
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(Blocks.SAND, randomChanceReturn(9, 1, 1)));
|
||||
tile.getSlotStack(0).setItemDamage(tile.getSlotStack(0).getItemDamage() + 1);
|
||||
return true;
|
||||
|
||||
@@ -10,12 +10,12 @@ import net.minecraftforge.items.IItemHandler;
|
||||
import nmd.primal.core.common.helper.RecipeHelper;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.BaseMultiItem;
|
||||
import nmd.primal.forgecraft.items.SlottedTongs;
|
||||
import nmd.primal.forgecraft.items.misc.SlottedTongs;
|
||||
import nmd.primal.forgecraft.items.parts.ToolPart;
|
||||
import nmd.primal.forgecraft.tiles.TileForge;
|
||||
|
||||
import static nmd.primal.forgecraft.blocks.CustomContainerFacing.FACING;
|
||||
import static nmd.primal.forgecraft.items.SlottedTongs.ITEM_HANDLER;
|
||||
import static nmd.primal.forgecraft.items.misc.SlottedTongs.ITEM_HANDLER;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 9/22/18.
|
||||
|
||||
@@ -105,4 +105,15 @@ public interface ToolNBT {
|
||||
return null;
|
||||
}
|
||||
|
||||
static void setDefaultNBT(ItemStack stack) {
|
||||
|
||||
stack.getOrCreateSubCompound("tags");
|
||||
stack.getSubCompound("tags").setBoolean("hot", false);
|
||||
stack.getSubCompound("tags").setBoolean("emerald", false);
|
||||
stack.getSubCompound("tags").setInteger("diamond", 0);
|
||||
stack.getSubCompound("tags").setInteger("redstone", 0);
|
||||
stack.getSubCompound("tags").setInteger("lapis", 0);
|
||||
stack.getSubCompound("tags").setInteger("modifiers", 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
238
kfc/src/main/java/nmd/primal/forgecraft/util/WeaponNBT.java
Normal file
238
kfc/src/main/java/nmd/primal/forgecraft/util/WeaponNBT.java
Normal file
@@ -0,0 +1,238 @@
|
||||
package nmd.primal.forgecraft.util;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.oredict.OreIngredient;
|
||||
import nmd.primal.core.api.PrimalAPI;
|
||||
|
||||
import java.util.Hashtable;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 3/17/17.
|
||||
*/
|
||||
public interface WeaponNBT {
|
||||
|
||||
/***
|
||||
* smite
|
||||
* bane
|
||||
* fire
|
||||
* fortune
|
||||
* leech
|
||||
* sweeping
|
||||
* sharpness
|
||||
***/
|
||||
|
||||
/***
|
||||
*
|
||||
* @param stack The ItemStack to get Modifiers from
|
||||
* @return int The number of modifiers applied
|
||||
*/
|
||||
static int getModifiers(ItemStack stack) {
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags").getInteger("modifiers");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***
|
||||
*
|
||||
* @param stack The stack to set modifiers to
|
||||
* @param mods The number of modifiers added
|
||||
*/
|
||||
static void setModifiers(ItemStack stack, Integer mods){
|
||||
stack.getSubCompound("tags").setInteger("modifiers", mods);
|
||||
}
|
||||
|
||||
static int getSmiteLevel(ItemStack stack){
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags").getInteger("smite");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static void setSmiteLevel(ItemStack stack, int smite){
|
||||
stack.getSubCompound("tags").setInteger("smite", smite);
|
||||
}
|
||||
|
||||
static int getBaneLevel(ItemStack stack) {
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags").getInteger("bane");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static void setBaneLevel(ItemStack stack, Integer level){
|
||||
stack.getSubCompound("tags").setInteger("bane", level);
|
||||
}
|
||||
|
||||
static int getFireLevel(ItemStack stack) {
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags").getInteger("fire");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static void setFireLevel(ItemStack stack, Integer level){
|
||||
stack.getSubCompound("tags").setInteger("fire", level);
|
||||
}
|
||||
|
||||
static int getFortuneLevel(ItemStack stack) {
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags").getInteger("fortune");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static void setFortuneLevel(ItemStack stack, Integer level){
|
||||
stack.getSubCompound("tags").setInteger("fortune", level);
|
||||
}
|
||||
|
||||
static int getSweepingLevel(ItemStack stack) {
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags").getInteger("sweeping");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static void setSweepingLevel(ItemStack stack, Integer level){
|
||||
stack.getSubCompound("tags").setInteger("sweeping", level);
|
||||
}
|
||||
|
||||
static int getSharpnessLevel(ItemStack stack) {
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags").getInteger("sharp");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static void setSharpnessLevel(ItemStack stack, Integer level){
|
||||
stack.getSubCompound("tags").setInteger("sharp", level);
|
||||
}
|
||||
|
||||
static int getLeechLevel(ItemStack stack) {
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags").getInteger("leech");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static void setLeechLevel(ItemStack stack, Integer level){
|
||||
stack.getSubCompound("tags").setInteger("leech", level);
|
||||
}
|
||||
|
||||
static NBTTagCompound getTags(ItemStack stack){
|
||||
if(!stack.isEmpty()) {
|
||||
if (stack.hasTagCompound()) {
|
||||
if (stack.getSubCompound("tags") != null) {
|
||||
return stack.getSubCompound("tags");
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static boolean getHot(ItemStack stack){
|
||||
|
||||
if(!stack.isEmpty()){
|
||||
if(stack.hasTagCompound()){
|
||||
if(stack.getSubCompound("tags") !=null){
|
||||
return stack.getSubCompound("tags").getBoolean("hot");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void setHot(ItemStack stack){
|
||||
|
||||
}
|
||||
|
||||
static void setDefaultNBT(ItemStack stack) {
|
||||
|
||||
stack.getOrCreateSubCompound("tags");
|
||||
stack.getSubCompound("tags").setInteger("smite", 0);
|
||||
stack.getSubCompound("tags").setInteger("bane", 0);
|
||||
stack.getSubCompound("tags").setInteger("fire", 0);
|
||||
stack.getSubCompound("tags").setInteger("fortune", 0);
|
||||
stack.getSubCompound("tags").setInteger("leech", 0);
|
||||
stack.getSubCompound("tags").setInteger("sweeping", 0);
|
||||
stack.getSubCompound("tags").setInteger("sharpness", 0);
|
||||
stack.getSubCompound("tags").setInteger("modifiers", 0);
|
||||
stack.getSubCompound("tags").setBoolean("hot", false);
|
||||
}
|
||||
|
||||
static void removeAndSetEnchantsForStack(ItemStack stack){
|
||||
if(stack.hasTagCompound()) {
|
||||
//if(stack.isItemEnchanted()) {
|
||||
stack.getTagCompound().removeTag("ench");
|
||||
if (getSmiteLevel(stack)>0) {
|
||||
stack.addEnchantment(Enchantment.getEnchantmentByID(17), getSmiteLevel(stack));
|
||||
}
|
||||
if (getBaneLevel(stack)>0) {
|
||||
stack.addEnchantment(Enchantment.getEnchantmentByID(18), getBaneLevel(stack));
|
||||
}
|
||||
if (getFireLevel(stack)>0) {
|
||||
stack.addEnchantment(Enchantment.getEnchantmentByID(20), getFireLevel(stack));
|
||||
}
|
||||
if (getFortuneLevel(stack)>0) {
|
||||
stack.addEnchantment(Enchantment.getEnchantmentByID(21), getFortuneLevel(stack));
|
||||
}
|
||||
if (getSweepingLevel(stack) > 0) {
|
||||
stack.addEnchantment(Enchantment.getEnchantmentByID(22), getSweepingLevel(stack));
|
||||
}
|
||||
if (getSharpnessLevel(stack)>0) {
|
||||
stack.addEnchantment(Enchantment.getEnchantmentByID(16), getSharpnessLevel(stack));
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Hashtable<Item.ToolMaterial, Integer> materialModifiers = new Hashtable<Item.ToolMaterial, Integer>(){{
|
||||
|
||||
put(PrimalAPI.ToolMaterials.TOOL_COPPER, 3);
|
||||
put(PrimalAPI.ToolMaterials.TOOL_BRONZE, 3);
|
||||
put(PrimalAPI.ToolMaterials.TOOL_CRUDE_IRON, 4);
|
||||
put(PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, 5);
|
||||
put(PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, 7);
|
||||
put(PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, 8);
|
||||
put(PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, 9);
|
||||
|
||||
}};
|
||||
|
||||
Hashtable<Ingredient, String> StackToUpgrade = new Hashtable<Ingredient, String>(){{
|
||||
|
||||
put(new OreIngredient("dustSilver"), "bane");
|
||||
|
||||
}};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"forge_marker":1,
|
||||
"defaults": {
|
||||
"textures": {
|
||||
"particle": "forgecraft:items/iron/0",
|
||||
"texture": "forgecraft:items/iron/0"
|
||||
},
|
||||
"parent": "forgecraft:block/saw_block_model"
|
||||
},
|
||||
"variants": {
|
||||
"active=false,facing=north": { "model": "forgecraft:saw_block_model" },
|
||||
"active=false,facing=east": { "model": "forgecraft:saw_block_model", "y": 90 },
|
||||
"active=false,facing=south": { "model": "forgecraft:saw_block_model", "y": 180 },
|
||||
"active=false,facing=west": { "model": "forgecraft:saw_block_model", "y": 270 },
|
||||
"active=true,facing=north": { "model": "forgecraft:saw_block_model" },
|
||||
"active=true,facing=east": { "model": "forgecraft:saw_block_model", "y": 90 },
|
||||
"active=true,facing=south": { "model": "forgecraft:saw_block_model", "y": 180 },
|
||||
"active=true,facing=west": { "model": "forgecraft:saw_block_model", "y": 270 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"forge_marker":1,
|
||||
"defaults": {
|
||||
"textures": {
|
||||
"particle": "blocks/planks_oak",
|
||||
"texture": "blocks/planks_oak"
|
||||
},
|
||||
"parent": "forgecraft:block/redstone_engine_model"
|
||||
},
|
||||
"variants": {
|
||||
"active=false,facing=north": { "model": "forgecraft:redstone_engine_model" },
|
||||
"active=false,facing=east": { "model": "forgecraft:redstone_engine_model", "y": 90 },
|
||||
"active=false,facing=south": { "model": "forgecraft:redstone_engine_model", "y": 180 },
|
||||
"active=false,facing=west": { "model": "forgecraft:redstone_engine_model", "y": 270 },
|
||||
"active=true,facing=north": { "model": "forgecraft:redstone_engine_model" },
|
||||
"active=true,facing=east": { "model": "forgecraft:redstone_engine_model", "y": 90 },
|
||||
"active=true,facing=south": { "model": "forgecraft:redstone_engine_model", "y": 180 },
|
||||
"active=true,facing=west": { "model": "forgecraft:redstone_engine_model", "y": 270 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"variants": {
|
||||
"active=false,facing=north": { "model": "forgecraft:grinder_model" },
|
||||
"active=false,facing=east": { "model": "forgecraft:grinder_model", "y": 90 },
|
||||
"active=false,facing=south": { "model": "forgecraft:grinder_model", "y": 180 },
|
||||
"active=false,facing=west": { "model": "forgecraft:grinder_model", "y": 270 },
|
||||
"active=true,facing=north": { "model": "forgecraft:grinder_model" },
|
||||
"active=true,facing=east": { "model": "forgecraft:grinder_model", "y": 90 },
|
||||
"active=true,facing=south": { "model": "forgecraft:grinder_model", "y": 180 },
|
||||
"active=true,facing=west": { "model": "forgecraft:grinder_model", "y": 270 }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"forge_marker":1,
|
||||
"defaults": {
|
||||
"textures": {
|
||||
"particle": "blocks/planks_oak",
|
||||
"texture": "blocks/planks_oak"
|
||||
},
|
||||
"parent": "forgecraft:gearbox_model"
|
||||
},
|
||||
"variants": {
|
||||
"facing=north": { "model": "forgecraft:gearbox_model", "y": 90 },
|
||||
"facing=east": { "model": "forgecraft:gearbox_model", "y": 180 },
|
||||
"facing=south": { "model": "forgecraft:gearbox_model", "y": 270 },
|
||||
"facing=west": { "model": "forgecraft:gearbox_model"}
|
||||
}
|
||||
}
|
||||
@@ -13,12 +13,12 @@ tile.ironanvil.name=Iron Anvil
|
||||
tile.yewstave.name=Yew Stave
|
||||
tile.nbtcrucible.name=Crucible
|
||||
|
||||
tile.pistonbellowsoak.name=Oak Piston Bellows
|
||||
tile.pistonbellowsjungle.name=Jungle Piston Bellows
|
||||
tile.pistonbellowsbirch.name=Birch Piston Bellows
|
||||
tile.pistonbellowsspruce.name=Spruce Piston Bellows
|
||||
tile.pistonbellowsdarkoak.name=Dark Oak Piston Bellows
|
||||
tile.pistonbellowsacacia.name=Acacia Piston Bellows
|
||||
tile.pistonbellowsoak.name=Oak Fukisashi Bellow
|
||||
tile.pistonbellowsjungle.name=Jungle Fukisashi Bellow
|
||||
tile.pistonbellowsbirch.name=Birch Fukisashi Bellow
|
||||
tile.pistonbellowsspruce.name=Spruce Fukisashi Bellow
|
||||
tile.pistonbellowsdarkoak.name=Dark Oak Fukisashi Bellow
|
||||
tile.pistonbellowsacacia.name=Acacia Fukisashi Bellow
|
||||
|
||||
tile.steelchisel.name=Steel Chisel
|
||||
tile.wootzchisel.name= Damascus Chisel
|
||||
@@ -28,6 +28,7 @@ tile.copperchisel.name=Copper Chisel
|
||||
tile.bronzechisel.name=Bronze Chisel
|
||||
|
||||
tile.toolbench.name=Tool Bench
|
||||
tile.sharpbench.name=Sharpening Bench
|
||||
|
||||
item.bronzeingotball.name=Bronze Ingot
|
||||
item.bronzechunk.name=Bronze Chunk
|
||||
@@ -49,6 +50,8 @@ item.brokenwootztool.name=Broken Damascus Tool
|
||||
item.unstrunglongbow.name=Unstrung Longbow
|
||||
item.longbow.name=Longbow
|
||||
item.rawlongbow.name=Raw Longbow
|
||||
item.grindingwheel.name=Grinding Wheel
|
||||
item.rawironslayer.name=Raw Wrought Iron Slayer
|
||||
|
||||
item.bellowshandle.name=Bellows Handle
|
||||
item.softcrucible.name=Soft Crucible
|
||||
@@ -62,17 +65,37 @@ item.cast_shovel.name=Shovel Cast
|
||||
item.cast_hoe.name=Hoe Cast
|
||||
item.castingmud.name=Casting Mud
|
||||
|
||||
item.rawcoppergladius.name=Raw Copper Gladius
|
||||
item.rawbronzegladius.name=Raw Bronze Gladius
|
||||
item.rawwroughtirongladius.name=Raw Wrought Iron Gladius
|
||||
item.rawcleanirongladius.name=Raw Clean Iron Gladius
|
||||
item.rawsteelgladius.name=Raw Steel Gladius
|
||||
item.rawwootzgladius.name=Raw Damascus Gladius
|
||||
|
||||
item.rawcleanironlongsword.name=Raw Clean Iron Longsword
|
||||
item.rawsteellongsword.name=Raw Steel Longsword
|
||||
item.rawwootzlongsword.name=Raw Damascus Longsword
|
||||
|
||||
item.rawtironslayer.name=Raw Wrought Iron Slayer
|
||||
item.rawcleanironslayer.name=Raw Clean Iron Slayer
|
||||
item.rawsteelslayer.name=Raw Steel Slayer
|
||||
item.rawwootzslayer.name=Raw Damascus Slayer
|
||||
|
||||
item.coppergladius.name=Copper Gladius
|
||||
item.bronzegladius.name=Bronze Gladius
|
||||
item.wroughtirongladius.name=Wrought Iron Gladius
|
||||
item.cleanirongladius.name=Clean Iron Gladius
|
||||
item.steelgladius.name=Steel Gladius
|
||||
item.wootzgladius.name=Damascus Gladius
|
||||
|
||||
item.cleanironlongsword.name=Clean Iron Longsword
|
||||
item.steellongsword.name=Steel Longsword
|
||||
item.wootzlongsword.name=Damascus Longsword
|
||||
|
||||
item.wroughtironslayer.name=Wrought Iron Slayer
|
||||
item.cleanironslayer.name=Clean Iron Slayer
|
||||
item.steelslayer.name=Steel Slayer
|
||||
item.wootzslayer.name=Damascus Slayer
|
||||
|
||||
item.bronzepickaxehead.name=Bronze Pickaxe Head
|
||||
item.bronzeaxehead.name=Bronze Axe Head
|
||||
@@ -121,9 +144,7 @@ item.wootzpickaxe.name=Damascus Pickaxe
|
||||
item.wootzaxe.name=Damascus Axe
|
||||
item.wootzshovel.name=Damascus Shovel
|
||||
item.wootzhoe.name=Damascus Hoe
|
||||
item.wootzgladius.name=Damascus Gladius
|
||||
item.wootzlongsword.name=Damascus Longsword
|
||||
item.wootzslayer.name=Damascus Slayer
|
||||
|
||||
|
||||
item.copperpickaxehead.name=Copper Pickaxe Head
|
||||
item.copperaxehead.name=Copper Axe Head
|
||||
@@ -157,10 +178,6 @@ jei.category.forgecraft.anvil=Anvil Crafting
|
||||
jei.category.forgecraft.casting=Casting
|
||||
jei.category.forgecraft.forging=Forging
|
||||
jei.category.forgecraft.workbench=Tool Bench
|
||||
jei.category.forgecraft.toolbench=Tool Bench
|
||||
|
||||
jei.info.forgecraft.crucible=Crucible Crafting
|
||||
jei.info.forgecraft.anvil=Anvil Crafting
|
||||
jei.info.forgecraft.casting=Casting
|
||||
jei.info.forgecraft.forging=Forging
|
||||
jei.info.forgecraft.workbench=Tool Bench
|
||||
jei.info.forgecraft.casting=Right Click the casting form while holding a hot crucible of the crafting material.
|
||||
jei.info.forgecraft.sharpbench=Right click with an empty hand to get the grinding wheel going. Make contact with the grinding wheel while holding a Weapon or Tool head.
|
||||
183
kfc/src/main/resources/assets/forgecraft/lang/ru_RU.lang
Normal file
183
kfc/src/main/resources/assets/forgecraft/lang/ru_RU.lang
Normal file
@@ -0,0 +1,183 @@
|
||||
itemGroup.forgecraft=ForgeCraft
|
||||
|
||||
|
||||
tile.castingform.name=Литейная Форма
|
||||
tile.castingblock.name=Литейный Блок
|
||||
tile.bloomery_adobe.name=Кричная Плавильня
|
||||
tile.bloomery_brick.name=Саманная Плавильня
|
||||
tile.forge_brick.name=Киричная кузница
|
||||
tile.forge_adobe.name=Саманная кузница
|
||||
tile.blockbreaker.name=Разрушитель Блоков
|
||||
tile.stoneanvil.name=Каменная Наковальня
|
||||
tile.ironanvil.name=Железная Наковальня
|
||||
tile.yewstave.name=Тисовый Стан
|
||||
tile.nbtcrucible.name=Тигель
|
||||
|
||||
tile.pistonbellowsoak.name=Дубовые Кузнечные Меха
|
||||
tile.pistonbellowsjungle.name=Тропические Кузнечные Меха
|
||||
tile.pistonbellowsbirch.name=Березовые Кузнечные Меха
|
||||
tile.pistonbellowsspruce.name=Еловые Кузнечные Меха
|
||||
tile.pistonbellowsdarkoak.name=Темнодеревные Кузнечные Меха
|
||||
tile.pistonbellowsacacia.name=Акациевые Кузнечные Меха
|
||||
|
||||
tile.steelchisel.name=Стальное Зубило
|
||||
tile.wootzchisel.name= Дамасское Зубило
|
||||
tile.cleanironchisel.name=Чистое железное Зубило
|
||||
tile.ironchisel.name=Зубило из кованого железа
|
||||
tile.copperchisel.name=Медное Зубило
|
||||
tile.bronzechisel.name=Бронзовое Зубило
|
||||
|
||||
tile.toolbench.name=Инструментальный Стол
|
||||
tile.sharpbench.name=Точильный Стол
|
||||
|
||||
item.bronzeingotball.name=Бронзовый Слиток
|
||||
item.bronzechunk.name=Кусочек Бронзы
|
||||
item.ironingotball.name=Кованный Железный Слиток
|
||||
item.wroughtironchunk.name=Кованный Железный Кусочек
|
||||
item.ironcleaningotball.name=Чистый Железный Слиток
|
||||
item.ironcleanchunk.name=Кусочек Чистого Железа
|
||||
item.steelingotball.name=Стальной Слиток
|
||||
item.steelchunk.name=Стальной Кусочек
|
||||
item.wootzingotball.name=Слиток Дамасской Стали
|
||||
item.wootzchunk.name=Кусочек Дамасской Стали
|
||||
|
||||
item.brokenbronzetool.name=Сломанный Бронзовый Инструмент
|
||||
item.brokenwroughtirontool.name=Сломанный Инструмент Из Кованого Железа
|
||||
item.brokencleanirontool.name=Сломанный Инструмент из Чистого Железа
|
||||
item.brokensteeltool.name=Сломанный Стальной Инструмет
|
||||
item.brokenwootztool.name=Сломанный Инструмент из Дамасской Стали
|
||||
|
||||
item.unstrunglongbow.name=Обработанный Длинный Лук
|
||||
item.longbow.name=Длинный Лук
|
||||
item.rawlongbow.name=Необработанный Длинный Лук
|
||||
item.grindingwheel.name=Шлифовальный круг
|
||||
item.rawironslayer.name=Необработанный убийца из кованого железа
|
||||
|
||||
item.bellowshandle.name=Ручка Мехов
|
||||
item.softcrucible.name=Мягкий Тигель
|
||||
item.slottedtongs.name=Каменные Щипцы
|
||||
item.forgehammer.name=Кузнечный Молот
|
||||
|
||||
item.cast_axe.name=Отлитый Топор
|
||||
item.cast_gladius.name=Отлитый Меч
|
||||
item.cast_pickaxe.name=Отлитая Кирка
|
||||
item.cast_shovel.name=Отлитая Лопата
|
||||
item.cast_hoe.name=Отлитая Мотыга
|
||||
item.castingmud.name=Отливочная глина
|
||||
|
||||
item.rawcoppergladius.name=Необработанный Медный Меч
|
||||
item.rawbronzegladius.name=Необработанный Бронзовый Меч
|
||||
item.rawwroughtirongladius.name=Необработанный Меч из Кованного Железа
|
||||
item.rawcleanirongladius.name=Необработанный Меч из Чистого Железа
|
||||
item.rawsteelgladius.name=Необработанный Стальной Меч
|
||||
item.rawwootzgladius.name=Необработанный Меч из Дамасской Стали
|
||||
|
||||
item.rawcleanironlongsword.name=Необработанный Clean Iron Longsword
|
||||
item.rawsteellongsword.name=Необработанный Steel Longsword
|
||||
item.rawwootzlongsword.name=Необработанный Damascus Longsword
|
||||
|
||||
item.rawtironslayer.name=Необработанный Кованный Убийца
|
||||
item.rawcleanironslayer.name=Необработанный Убийца из Чистого Железа
|
||||
item.rawsteelslayer.name=Необработанный Стальной Убийца
|
||||
item.rawwootzslayer.name=Необработанный Убийца из Дамасской Стали
|
||||
|
||||
item.coppergladius.name=Медный Меч
|
||||
item.bronzegladius.name=Бронзовый Меч
|
||||
item.wroughtirongladius.name=Кованный Меч
|
||||
item.cleanirongladius.name=Меч из Чистого Желаза
|
||||
item.steelgladius.name=Стальной Меч
|
||||
item.wootzgladius.name=Дамасский Меч
|
||||
|
||||
item.cleanironlongsword.name=Чистый Железный Длинный Меч
|
||||
item.steellongsword.name=Стальной Длинный Меч
|
||||
item.wootzlongsword.name=Дамасский Длинный Меч
|
||||
|
||||
item.wroughtironslayer.name=Кованный Убийца
|
||||
item.cleanironslayer.name=Чистый Железный Убийца
|
||||
item.steelslayer.name=Стальной Убийца
|
||||
item.wootzslayer.name=Дамасский Убийца
|
||||
|
||||
item.bronzepickaxehead.name=Бронзовоя навершие кирки
|
||||
item.bronzeaxehead.name=Бронзовое навершие топора
|
||||
item.bronzeshovelhead.name=Бронзовое навершие лопаты
|
||||
item.bronzehoehead.name=Бронзовое навершие мотыги
|
||||
item.bronzepickaxe.name=Бронзовая Кирка
|
||||
item.bronzeaxe.name=Бронзовый Топор
|
||||
item.bronzeshovel.name=Бронзовая Лопата
|
||||
item.bronzehoe.name=Бронзовая Мотыга
|
||||
|
||||
item.ironpickaxehead.name=Железное навершие кирки
|
||||
item.ironaxehead.name=Железное навершие топора
|
||||
item.ironshovelhead.name=Железное навершие лопаты
|
||||
item.ironhoehead.name=Железное навершие мотыги
|
||||
item.ironpickaxe.name=Железная Кирка
|
||||
item.ironaxe.name=Железный Топор
|
||||
item.ironshovel.name=Железная Лопата
|
||||
item.ironhoe.name=Железная Мотыга
|
||||
item.ironsword.name=Железный Меч
|
||||
|
||||
item.cleanironpickaxehead.name=Чистое железное навершие кирки
|
||||
item.cleanironaxehead.name=Чистое железное навершие топора
|
||||
item.cleanironshovelhead.name=Чистое железное навершие лопаты
|
||||
item.cleanironhoehead.name=Чистое железное навершие мотыги
|
||||
item.cleanironpickaxe.name=Чистая железная кирка
|
||||
item.cleanironaxe.name=Чистый Железный Топор
|
||||
item.cleanironshovel.name=Чистая Железная Лопата
|
||||
item.cleanironhoe.name=Чистая Железная Мотыга
|
||||
#item.cleanironsword.name=Чистый Железный Меч
|
||||
|
||||
item.steelpickaxehead.name=Стальное навершие кирки
|
||||
item.steelaxehead.name=Стальное навершие топора
|
||||
item.steelshovelhead.name=Стальное навершие лопаты
|
||||
item.steelhoehead.name=Стальное навершие мотыги
|
||||
item.steelpickaxe.name=Стальная Кирка
|
||||
item.steelaxe.name=Стальной Топор
|
||||
item.steelshovel.name=Стальная Лопата
|
||||
item.steelhoe.name=Стальная Мотыга
|
||||
#item.steelsword.name=Стальной Меч
|
||||
|
||||
item.wootzpickaxehead.name=Дамасское навершие кирки
|
||||
item.wootzaxehead.name=Дамасское навершие топора
|
||||
item.wootzshovelhead.name=Дамасское навершие лопаты
|
||||
item.wootzhoehead.name=Дамасское навершие мотыги
|
||||
item.wootzpickaxe.name=Дамасская Кирка
|
||||
item.wootzaxe.name=Дамасский Топор
|
||||
item.wootzshovel.name=Дамасская Лопата
|
||||
item.wootzhoe.name=Дамасская Мотыга
|
||||
|
||||
|
||||
item.copperpickaxehead.name=Медное навершие Кирки
|
||||
item.copperaxehead.name=Медное навершие топора
|
||||
item.coppershovelhead.name=Медное навершие лопаты
|
||||
item.copperhoehead.name=Медное навершие мотыги
|
||||
item.copperpickaxe.name=Медная Кирка
|
||||
item.copperaxe.name=Медный Топор
|
||||
item.coppershovel.name=Медная Лопата
|
||||
item.copperhoe.name=Медная Мотыга
|
||||
item.coppergladius.name=Медный Меч
|
||||
|
||||
item.leatherhelmet.name=Закаленный кожаный шлем
|
||||
|
||||
item.wootzsledgehammer.name=Дамасский Кузнечный Молот
|
||||
item.steelsledgehammer.name=Стальной Кузнечный Молот
|
||||
item.cleanironsledgehammer.name=Чистый Железный Кузнечный Молот
|
||||
item.ironsledgehammer.name=Кованный Кузнечный Молот
|
||||
item.bronzesledgehammer.name=Бронзовый Кузнечный Молот
|
||||
item.coppersledgehammer.name=Медный Кузнечный Молот
|
||||
|
||||
item.wootzworkblade.name=Дамасский Рабочий Нож
|
||||
|
||||
# -- configuration -- #
|
||||
forgecraft.config.title=ForgeCraft Config
|
||||
|
||||
forgecraft.compatibility=Совместимость
|
||||
forgecraft.compatibility.tooltip=Особенности Совместимости
|
||||
|
||||
jei.category.forgecraft.crucible=Изготовление Тиглей
|
||||
jei.category.forgecraft.anvil=Изготовление Наковален
|
||||
jei.category.forgecraft.casting=Литье
|
||||
jei.category.forgecraft.forging=Кузница
|
||||
jei.category.forgecraft.workbench=Инструментальный Стол
|
||||
|
||||
jei.info.forgecraft.casting=Щелкните правой кнопкой мыши форму литья, удерживая горячий тигель из крафт-материала.
|
||||
jei.info.forgecraft.sharpbench=Щелкните правой кнопкой мыши пустой рукой, чтобы запустить шлифовальный круг. Прикоснитесь к шлифовальному кругу, держа головку оружия или инструмента.
|
||||
@@ -1,111 +0,0 @@
|
||||
{
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "blocks/e_particle",
|
||||
"texture": "items/test"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 0, 2, 0 ],
|
||||
"to": [ 3, 5, 16 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 0, 0, 3, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 13, 11, 16, 14 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 11, 3, 14 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 11, 16, 14 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 11, 16, 14 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 13, 2, 0 ],
|
||||
"to": [ 16, 5, 16 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 13, 0, 16, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 11, 3, 14 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 13, 11, 16, 14 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 11, 16, 14 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 11, 16, 14 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box5",
|
||||
"from": [ 3, 2, 0 ],
|
||||
"to": [ 13, 5, 3 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 3, 0, 13, 3 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 3, 11, 13, 14 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 3, 11, 13, 14 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box5",
|
||||
"from": [ 3, 2, 13 ],
|
||||
"to": [ 13, 5, 16 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 3, 13, 13, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 3, 11, 13, 14 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 3, 11, 13, 14 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box8",
|
||||
"from": [ 0, 0, 0 ],
|
||||
"to": [ 16, 2, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 14, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box6",
|
||||
"from": [ 7.5, 5, 0 ],
|
||||
"to": [ 8.5, 6, 1 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 7.5, 0, 8.5, 1 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 7.5, 10, 8.5, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 7.5, 10, 8.5, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 10, 1, 11 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 15, 10, 16, 11 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 1.5 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 1.5 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"translation": [ 0, 2, 0 ],
|
||||
"scale": [ 0.4, 0.4, 0.4 ]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"translation": [ 0, 2, 0 ],
|
||||
"scale": [ 0.4, 0.4, 0.4 ]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [ 30, 225, 0 ],
|
||||
"scale": [ 0.625, 0.625, 0.625 ]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [ 0, 3, 0 ],
|
||||
"scale": [ 0.25, 0.25, 0.25 ]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 90, 0, 180 ],
|
||||
"translation": [ 0, 0, -3 ],
|
||||
"scale": [ 0.5, 0.5, 0.5 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
{
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "blocks/e_particle",
|
||||
"texture": "blocks/e_texture"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 7, 0, 0 ],
|
||||
"to": [ 10, 0.5, 14 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 7, 2, 10, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 7, 0, 10, 14 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 15.5, 9, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 7, 15.5, 10, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 15.5, 14, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 2, 15.5, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box2",
|
||||
"from": [ 7, 0.5, 0 ],
|
||||
"to": [ 8, 8.5, 3 ],
|
||||
"faces": {
|
||||
"north": { "uv": [ 8, 7.5, 9, 15.5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 7, 7.5, 8, 15.5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 7.5, 3, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 7.5, 16, 15.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 7, 8.5, 0 ],
|
||||
"to": [ 10, 9, 14 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 7, 2, 10, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 7, 0, 10, 14 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 7, 9, 7.5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 7, 7, 10, 7.5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 7, 14, 7.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 2, 7, 16, 7.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box5",
|
||||
"from": [ 7, 0.5, 13 ],
|
||||
"to": [ 10, 8.5, 14 ],
|
||||
"faces": {
|
||||
"north": { "uv": [ 6, 7.5, 9, 15.5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 7, 7.5, 10, 15.5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 7.5, 14, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 2, 7.5, 3, 15.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box2",
|
||||
"from": [ 7, 0.5, 4 ],
|
||||
"to": [ 8, 8.5, 7 ],
|
||||
"faces": {
|
||||
"north": { "uv": [ 8, 7.5, 9, 15.5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 4, 7.5, 7, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 9, 7.5, 12, 15.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box9",
|
||||
"from": [ 7, 0.5, 8 ],
|
||||
"to": [ 8, 8.5, 13 ],
|
||||
"faces": {
|
||||
"west": { "uv": [ 8, 7.5, 13, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 3, 7.5, 8, 15.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box10",
|
||||
"from": [ 7, 0.5, 3 ],
|
||||
"to": [ 8, 4, 4 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 7, 3, 8, 4 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 3, 12, 4, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 12, 12, 13, 15.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box12",
|
||||
"from": [ 7, 5, 3 ],
|
||||
"to": [ 8, 8.5, 4 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 7, 12, 8, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 3, 7.5, 4, 11 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 12, 7.5, 13, 11 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box12",
|
||||
"from": [ 7, 0.5, 7 ],
|
||||
"to": [ 8, 8.5, 8 ],
|
||||
"faces": {
|
||||
"west": { "uv": [ 7, 7.5, 8, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 8, 7.5, 9, 15.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box17",
|
||||
"from": [ 8, 4, 7 ],
|
||||
"to": [ 9, 5, 8 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 8, 8, 9, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 8, 7, 9, 8 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 7, 11, 8, 12 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 8, 11, 9, 12 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 8, 11, 9, 12 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box11",
|
||||
"from": [ 8, 0.5, 0 ],
|
||||
"to": [ 9.5, 8.5, 0.001 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 8, 15.999, 9.5, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 8, 0, 9.5, 0.001000404 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6.5, 7.5, 8, 15.5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 8, 7.5, 9.5, 15.5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 7.5, 0.001, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 15.999, 7.5, 16, 15.5 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 1, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 1, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [ 30, 225, 0 ],
|
||||
"scale": [ 0.625, 0.625, 0.625 ]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [ 0, 3, 0 ],
|
||||
"scale": [ 0.25, 0.25, 0.25 ]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 0, 90, 0 ],
|
||||
"scale": [ 1, 1, 1 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
{
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "blocks/planks_oak",
|
||||
"texture": "blocks/planks_oak",
|
||||
"lever_handle": "blocks/planks_big_oak"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 4.5, 0, 1 ],
|
||||
"to": [ 6.5, 9, 3 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 4.5, 13, 6.5, 15 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4.5, 1, 6.5, 3 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9.5, 7, 11.5, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4.5, 7, 6.5, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 1, 7, 3, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 7, 15, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 4.5, 0, 9 ],
|
||||
"to": [ 6.5, 9, 11 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 4.5, 5, 6.5, 7 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4.5, 9, 6.5, 11 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9.5, 7, 11.5, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4.5, 7, 6.5, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 9, 7, 11, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 5, 7, 7, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 9.5, 0, 9 ],
|
||||
"to": [ 11.5, 9, 11 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 9.5, 5, 11.5, 7 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 9.5, 9, 11.5, 11 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 4.5, 7, 6.5, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 9.5, 7, 11.5, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 9, 7, 11, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 5, 7, 7, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 9.5, 0, 1 ],
|
||||
"to": [ 11.5, 9, 3 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 9.5, 13, 11.5, 15 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 9.5, 1, 11.5, 3 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 4.5, 7, 6.5, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 9.5, 7, 11.5, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 1, 7, 3, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 7, 15, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box5",
|
||||
"from": [ 4.5, 9, 1 ],
|
||||
"to": [ 6.5, 11, 11 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 4.5, 5, 6.5, 15 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4.5, 1, 6.5, 11 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9.5, 5, 11.5, 7 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4.5, 5, 6.5, 7 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 1, 5, 11, 7 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 5, 5, 15, 7 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box5",
|
||||
"from": [ 9.5, 9, 1 ],
|
||||
"to": [ 11.5, 11, 11 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 9.5, 5, 11.5, 15 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 9.5, 1, 11.5, 11 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 4.5, 5, 6.5, 7 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 9.5, 5, 11.5, 7 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 1, 5, 11, 7 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 5, 5, 15, 7 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box18",
|
||||
"from": [ 5, 11, 4 ],
|
||||
"to": [ 11, 12, 5 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 5, 11, 11, 12 ], "texture": "#lever_handle" },
|
||||
"up": { "uv": [ 5, 4, 11, 5 ], "texture": "#lever_handle" },
|
||||
"north": { "uv": [ 5, 4, 11, 5 ], "texture": "#lever_handle" },
|
||||
"south": { "uv": [ 5, 4, 11, 5 ], "texture": "#lever_handle" },
|
||||
"west": { "uv": [ 4, 4, 5, 5 ], "texture": "#lever_handle" },
|
||||
"east": { "uv": [ 11, 4, 12, 5 ], "texture": "#lever_handle" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box23",
|
||||
"from": [ 5.5, 11, 8.5 ],
|
||||
"to": [ 10.5, 12, 9.5 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 5.5, 6.5, 10.5, 7.5 ], "texture": "#lever_handle" },
|
||||
"up": { "uv": [ 5.5, 8.5, 10.5, 9.5 ], "texture": "#lever_handle" },
|
||||
"north": { "uv": [ 5.5, 4, 10.5, 5 ], "texture": "#lever_handle" },
|
||||
"south": { "uv": [ 5.5, 4, 10.5, 5 ], "texture": "#lever_handle" },
|
||||
"west": { "uv": [ 8.5, 4, 9.5, 5 ], "texture": "#lever_handle" },
|
||||
"east": { "uv": [ 6.5, 4, 7.5, 5 ], "texture": "#lever_handle" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box24",
|
||||
"from": [ 5.5, 11, 9.5 ],
|
||||
"to": [ 10.5, 11.5, 10.5 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 5.5, 5.5, 10.5, 6.5 ], "texture": "#lever_handle" },
|
||||
"up": { "uv": [ 5.5, 9.5, 10.5, 10.5 ], "texture": "#lever_handle" },
|
||||
"north": { "uv": [ 5.5, 4.5, 10.5, 5 ], "texture": "#lever_handle" },
|
||||
"south": { "uv": [ 5.5, 4.5, 10.5, 5 ], "texture": "#lever_handle" },
|
||||
"west": { "uv": [ 9.5, 4.5, 10.5, 5 ], "texture": "#lever_handle" },
|
||||
"east": { "uv": [ 5.5, 4.5, 6.5, 5 ], "texture": "#lever_handle" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box25",
|
||||
"from": [ 4.5, 11, 2 ],
|
||||
"to": [ 6.5, 12, 4 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 4.5, 12, 6.5, 14 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4.5, 2, 6.5, 4 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9.5, 4, 11.5, 5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4.5, 4, 6.5, 5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 2, 4, 4, 5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 12, 4, 14, 5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box25",
|
||||
"from": [ 4.5, 11, 5 ],
|
||||
"to": [ 6.5, 12, 7 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 4.5, 9, 6.5, 11 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4.5, 5, 6.5, 7 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9.5, 4, 11.5, 5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4.5, 4, 6.5, 5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 5, 4, 7, 5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 9, 4, 11, 5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box27",
|
||||
"from": [ 4.5, 12, 3 ],
|
||||
"to": [ 6.5, 13, 6 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 4.5, 10, 6.5, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4.5, 3, 6.5, 6 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9.5, 3, 11.5, 4 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4.5, 3, 6.5, 4 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 3, 3, 6, 4 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 10, 3, 13, 4 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box25",
|
||||
"from": [ 9.5, 11, 2 ],
|
||||
"to": [ 11.5, 12, 4 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 9.5, 12, 11.5, 14 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 9.5, 2, 11.5, 4 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 4.5, 4, 6.5, 5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 9.5, 4, 11.5, 5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 2, 4, 4, 5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 12, 4, 14, 5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box25",
|
||||
"from": [ 9.5, 11, 5 ],
|
||||
"to": [ 11.5, 12, 7 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 9.5, 9, 11.5, 11 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 9.5, 5, 11.5, 7 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 4.5, 4, 6.5, 5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 9.5, 4, 11.5, 5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 5, 4, 7, 5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 9, 4, 11, 5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneX34",
|
||||
"from": [ 4.5, 11, 4 ],
|
||||
"to": [ 4.501, 12, 5 ],
|
||||
"faces": {
|
||||
"west": { "uv": [ 4, 4, 5, 5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 11, 4, 12, 5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box27",
|
||||
"from": [ 9.5, 12, 3 ],
|
||||
"to": [ 11.5, 13, 6 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 4.5, 10, 6.5, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4.5, 3, 6.5, 6 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9.5, 3, 11.5, 4 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4.5, 3, 6.5, 4 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 3, 3, 6, 4 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 10, 3, 13, 4 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneX34",
|
||||
"from": [ 11.5, 11, 4 ],
|
||||
"to": [ 11.501, 12, 5 ],
|
||||
"faces": {
|
||||
"west": { "uv": [ 4, 4, 5, 5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 11, 4, 12, 5 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 0, 45, 0 ],
|
||||
"scale": [ 0.4, 0.4, 0.4 ]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [ 0, 45, 0 ],
|
||||
"scale": [ 0.4, 0.4, 0.4 ]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [ 30, -45, 0 ],
|
||||
"scale": [ 0.625, 0.625, 0.625 ]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [ 0, 3, 0 ],
|
||||
"scale": [ 0.25, 0.25, 0.25 ]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 0, 90, 0 ],
|
||||
"scale": [ 0.5, 0.5, 0.5 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
{
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "blocks/e_particle",
|
||||
"texture": "blocks/planks_oak",
|
||||
"texture1": "blocks/e_texture",
|
||||
"texture2": "blocks/e_texture"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "Box1",
|
||||
"from": [ 5, 0, 12 ],
|
||||
"to": [ 11, 16, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 5, 2, 11, 4 ], "texture": "#texture1" },
|
||||
"up": { "uv": [ 5, 12, 11, 14 ], "texture": "#texture1" },
|
||||
"north": { "uv": [ 5, 0, 11, 16 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 5, 0, 11, 16 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 12, 0, 14, 16 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 2, 0, 4, 16 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box2",
|
||||
"from": [ 3, 1, 12 ],
|
||||
"to": [ 5, 15, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 3, 14, 5, 16 ], "texture": "#texture1" },
|
||||
"up": { "uv": [ 3, 0, 5, 2 ], "texture": "#texture1" },
|
||||
"north": { "uv": [ 11, 1, 13, 15 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 3, 1, 5, 15 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 0, 1, 2, 15 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 14, 1, 16, 15 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box3",
|
||||
"from": [ 2, 2, 12 ],
|
||||
"to": [ 3, 14, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 2, 14, 3, 16 ], "texture": "#texture1" },
|
||||
"up": { "uv": [ 2, 0, 3, 2 ], "texture": "#texture1" },
|
||||
"north": { "uv": [ 13, 2, 14, 14 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 2, 2, 3, 14 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 0, 2, 2, 14 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 14, 2, 16, 14 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box4",
|
||||
"from": [ 1, 4, 12 ],
|
||||
"to": [ 2, 12, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 1, 14, 2, 16 ], "texture": "#texture1" },
|
||||
"up": { "uv": [ 1, 0, 2, 2 ], "texture": "#texture1" },
|
||||
"north": { "uv": [ 14, 4, 15, 12 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 1, 4, 2, 12 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 0, 4, 2, 12 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 14, 4, 16, 12 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box5",
|
||||
"from": [ 0, 5, 12 ],
|
||||
"to": [ 1, 11, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 14, 1, 16 ], "texture": "#texture1" },
|
||||
"up": { "uv": [ 0, 0, 1, 2 ], "texture": "#texture1" },
|
||||
"north": { "uv": [ 15, 5, 16, 11 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 0, 5, 1, 11 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 0, 5, 2, 11 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 14, 5, 16, 11 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box5",
|
||||
"from": [ 15, 5, 12 ],
|
||||
"to": [ 16, 11, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 1, 1, 2 ], "texture": "#texture1", "rotation": 180 },
|
||||
"up": { "uv": [ 0, 14, 1, 15 ], "texture": "#texture1", "rotation": 180 },
|
||||
"north": { "uv": [ 0, 5, 1, 11 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 15, 5, 16, 11 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 1, 5, 2, 11 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 14, 5, 15, 11 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box4",
|
||||
"from": [ 14, 4, 12 ],
|
||||
"to": [ 15, 12, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 1, 1, 2, 2 ], "texture": "#texture1", "rotation": 180 },
|
||||
"up": { "uv": [ 1, 14, 2, 15 ], "texture": "#texture1", "rotation": 180 },
|
||||
"north": { "uv": [ 1, 4, 2, 12 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 14, 4, 15, 12 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 1, 4, 2, 12 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 14, 4, 15, 12 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box3",
|
||||
"from": [ 13, 2, 12 ],
|
||||
"to": [ 14, 14, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 2, 1, 3, 2 ], "texture": "#texture1", "rotation": 180 },
|
||||
"up": { "uv": [ 2, 14, 3, 15 ], "texture": "#texture1", "rotation": 180 },
|
||||
"north": { "uv": [ 2, 2, 3, 14 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 13, 2, 14, 14 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 1, 2, 2, 14 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 14, 2, 15, 14 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box2",
|
||||
"from": [ 11, 1, 12 ],
|
||||
"to": [ 13, 15, 14 ],
|
||||
"rotation": { "origin": [ 5, 0, 12 ], "axis": "x", "angle": -22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 3, 1, 5, 2 ], "texture": "#texture1", "rotation": 180 },
|
||||
"up": { "uv": [ 3, 14, 5, 15 ], "texture": "#texture1", "rotation": 180 },
|
||||
"north": { "uv": [ 3, 1, 5, 15 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 11, 1, 13, 15 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 1, 1, 2, 15 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 14, 1, 15, 15 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box10",
|
||||
"from": [ 4, 0.5, 2.5 ],
|
||||
"to": [ 5, 12.5, 3.5 ],
|
||||
"rotation": { "origin": [ 4, 0.5, 2.5 ], "axis": "x", "angle": 22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 1, 0, 2, 1 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 14, 4, 15, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 1, 4, 2, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 4, 1, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 15, 4, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box10",
|
||||
"from": [ 11, 0.5, 2.5 ],
|
||||
"to": [ 12, 12.5, 3.5 ],
|
||||
"rotation": { "origin": [ 11, 0.5, 2.5 ], "axis": "x", "angle": 22.5 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 1, 15, 2, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 1, 0, 2, 1 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 14, 4, 15, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 1, 4, 2, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 4, 1, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 15, 4, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "blocks/e_particle",
|
||||
"texture": "blocks/e_texture"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "Box16",
|
||||
"from": [ 3, 0.5, 14 ],
|
||||
"to": [ 10, 9, 16 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 3, 14, 10, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 7, 13, 15.5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 3, 7, 10, 15.5 ], "texture": "#texture", "cullface": "south" },
|
||||
"west": { "uv": [ 14, 7, 16, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 7, 2, 15.5 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box75",
|
||||
"from": [ 4, 0.5, 0 ],
|
||||
"to": [ 7, 9, 14 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 4, 0, 7, 14 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9, 7, 12, 15.5 ], "texture": "#texture", "cullface": "north" },
|
||||
"west": { "uv": [ 0, 7, 14, 15.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 2, 7, 16, 15.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box46",
|
||||
"from": [ 0, 0, 0 ],
|
||||
"to": [ 10, 0.5, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 10, 16 ], "texture": "#texture", "cullface": "down" },
|
||||
"up": { "uv": [ 0, 0, 10, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 15.5, 16, 16 ], "texture": "#texture", "cullface": "north" },
|
||||
"south": { "uv": [ 0, 15.5, 10, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 15.5, 16, 16 ], "texture": "#texture", "cullface": "west" },
|
||||
"east": { "uv": [ 0, 15.5, 16, 16 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 0, 45, 0 ],
|
||||
"scale": [ 0.4, 0.4, 0.4 ]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [ 0, 45, 0 ],
|
||||
"scale": [ 0.4, 0.4, 0.4 ]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [ 30, 225, 0 ],
|
||||
"scale": [ 0.625, 0.625, 0.625 ]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [ 0, 3, 0 ],
|
||||
"scale": [ 0.25, 0.25, 0.25 ]
|
||||
},
|
||||
"fixed": {
|
||||
"scale": [ 1, 1, 1 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
{
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "blocks/e_particle",
|
||||
"texture": "blocks/e_texture"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "Box16",
|
||||
"from": [ 3, 1, 14 ],
|
||||
"to": [ 10, 12.5, 16 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 3, 14, 10, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 3.5, 13, 15 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 3, 3.5, 10, 15 ], "texture": "#texture", "cullface": "south" },
|
||||
"west": { "uv": [ 14, 3.5, 16, 15 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 3.5, 2, 15 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box75",
|
||||
"from": [ 4, 1, 4 ],
|
||||
"to": [ 7, 12.5, 14 ],
|
||||
"faces": {
|
||||
"north": { "uv": [ 9, 3.5, 12, 15 ], "texture": "#texture", "cullface": "north" },
|
||||
"west": { "uv": [ 4, 3.5, 14, 15 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 2, 3.5, 12, 15 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box46",
|
||||
"from": [ 0, 0, 0 ],
|
||||
"to": [ 10, 1, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 10, 16 ], "texture": "#texture", "cullface": "down" },
|
||||
"up": { "uv": [ 0, 0, 10, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 15, 16, 16 ], "texture": "#texture", "cullface": "north" },
|
||||
"south": { "uv": [ 0, 15, 10, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 15, 16, 16 ], "texture": "#texture", "cullface": "west" },
|
||||
"east": { "uv": [ 0, 15, 16, 16 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box4",
|
||||
"from": [ 4, 1, 0 ],
|
||||
"to": [ 7, 12.5, 3 ],
|
||||
"faces": {
|
||||
"north": { "uv": [ 9, 3.5, 12, 15 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4, 3.5, 7, 15 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 3.5, 3, 15 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 3.5, 16, 15 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box5",
|
||||
"from": [ 4, 1, 3 ],
|
||||
"to": [ 7, 7.5, 4 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 4, 3, 7, 4 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 3, 8.5, 4, 15 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 12, 8.5, 13, 15 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box6",
|
||||
"from": [ 4, 8.5, 3 ],
|
||||
"to": [ 7, 12.5, 4 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 12, 7, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 3, 3.5, 4, 7.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 12, 3.5, 13, 7.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box7",
|
||||
"from": [ 3, 12.5, 0 ],
|
||||
"to": [ 10, 13.5, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 3, 0, 10, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 3, 0, 10, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 2.5, 13, 3.5 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 3, 2.5, 10, 3.5 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 2.5, 16, 3.5 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 2.5, 16, 3.5 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box8",
|
||||
"from": [ 7, 1, 0 ],
|
||||
"to": [ 10, 3.5, 16 ],
|
||||
"faces": {
|
||||
"up": { "uv": [ 7, 0, 10, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 12.5, 9, 15 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 0, 12.5, 16, 15 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 12.5, 16, 15 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [ 75, 45, 0 ],
|
||||
"translation": [ 0, 2.5, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 0, 45, 0 ],
|
||||
"scale": [ 0.4, 0.4, 0.4 ]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [ 0, 45, 0 ],
|
||||
"scale": [ 0.4, 0.4, 0.4 ]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [ 30, 225, 0 ],
|
||||
"scale": [ 0.625, 0.625, 0.625 ]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [ 0, 3, 0 ],
|
||||
"scale": [ 0.25, 0.25, 0.25 ]
|
||||
},
|
||||
"fixed": {
|
||||
"scale": [ 1, 1, 1 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user