need to add bounding for chisel, chisel and sledgehammer crafting, chisel and sledgehammer asset updates
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
# To-Dos
|
||||
|
||||
## Bugs
|
||||
- [x] Hot Crucible block form missing texture
|
||||
- [x] Soft Crucible drop from tongs
|
||||
- [x] Pickaxe upgrades printout
|
||||
- [ ] Can't put a crucible straight from creative inventory into bloomery and pull with tongs
|
||||
- [ ] Hot Crucible block form missing texture
|
||||
- [ ] Soft Crucible drop from tongs
|
||||
- [ ] Pickaxe upgrades printout
|
||||
|
||||
## Current Feature
|
||||
- [ ] SledgeHammer and Chisel
|
||||
- [x] SledgeHammer and Chisel item and blocks
|
||||
- [ ] Chisel Bounding Box changes
|
||||
- [ ] SledgeHammer and Chisel crafting
|
||||
- [ ] Play a sound when bloomery or forge finishes
|
||||
- [ ] Hardness and Resistance calculation for durability damage
|
||||
- [ ] Craft Tweaker Support
|
||||
|
||||
6
kfc/idea_backup/excludeFromValidation.xml
Normal file
6
kfc/idea_backup/excludeFromValidation.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExcludeFromValidation">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java/nmd/primal/forgecraft/blocks/Chisel.java" />
|
||||
</component>
|
||||
</project>
|
||||
16
kfc/idea_backup/gradle.xml
Normal file
16
kfc/idea_backup/gradle.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
117
kfc/idea_backup/inspectionProfiles/Project_Default.xml
Normal file
117
kfc/idea_backup/inspectionProfiles/Project_Default.xml
Normal file
@@ -0,0 +1,117 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="AndroidDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidElementNotAllowed" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintByteOrderMark" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintContentDescription" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintCustomError" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintCustomWarning" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintEnforceUTF8" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintExtraTranslation" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintHardcodedText" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintImpliedQuantity" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintLabelFor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintMissingQuantity" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintMissingTranslation" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintPluralsCandidate" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintRelativeOverlap" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintRtlCompat" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintRtlEnabled" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintRtlHardcoded" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintRtlSymmetry" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintSetTextI18n" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintStringFormatCount" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintStringFormatInvalid" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintStringFormatMatches" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintTypos" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidLintUnusedQuantity" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidMissingOnClickHandler" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidNonConstantResIdsInSwitch" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AndroidUnknownAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="AntDuplicateTargetsInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AntMissingPropertiesFileInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="AntResolveInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckDtdRefs" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckEmptyScriptTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckNodeTest" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckTagEmptyBody" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckValidXmlInScriptTagBody" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="CheckXmlFileWithXercesValidator" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="ConceptInspectionProvider" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="DeprecatedClassUsageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HardwiredNamespacePrefix" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlExtraClosingTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlUnknownAnchorTarget" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlUnknownAttribute" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="0" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="HtmlUnknownBooleanAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="HtmlUnknownTag" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="6">
|
||||
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
||||
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
||||
<item index="2" class="java.lang.String" itemvalue="comment" />
|
||||
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
||||
<item index="4" class="java.lang.String" itemvalue="embed" />
|
||||
<item index="5" class="java.lang.String" itemvalue="script" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="HtmlUnknownTarget" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ImplicitTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="BITS" value="1720" />
|
||||
<option name="FLAG_EXPLICIT_CONVERSION" value="true" />
|
||||
<option name="IGNORE_NODESET_TO_BOOLEAN_VIA_STRING" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="IndexZeroUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JavaFxColorRgb" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JavaFxDefaultTag" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JavaFxEventHandler" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JavaFxRedundantPropertyValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JavaFxResourcePropertyValue" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JavaFxUnresolvedFxIdReference" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="JavaFxUnusedImports" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="LossyEncoding" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PatternNotApplicable" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="PatternOverriddenByNonAnnotatedMethod" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PatternValidation" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="CHECK_NON_CONSTANT_VALUES" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="RedundantTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="CHECK_ANY" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="RequiredAttributes" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="myAdditionalRequiredHtmlAttributes" value="" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ResourceType" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="SimplifiableIfStatement" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SpecInspectionProvider" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="XmlDuplicatedId" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlHighlighting" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlInvalidId" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlPathReference" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlUnboundNsPrefix" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlUnusedNamespaceDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlWrongFileType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XmlWrongRootElement" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltDeclarations" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltTemplateInvocation" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltUnusedDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="XsltVariableShadowing" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
||||
17
kfc/idea_backup/misc.xml
Normal file
17
kfc/idea_backup/misc.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<list size="3">
|
||||
<item index="0" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.Mod" />
|
||||
<item index="1" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.Mod.EventHandler" />
|
||||
<item index="2" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.eventhandler.SubscribeEvent" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="PreferredVcsStorage">
|
||||
<preferredVcsName>ApexVCS</preferredVcsName>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
6
kfc/idea_backup/vcs.xml
Normal file
6
kfc/idea_backup/vcs.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
1649
kfc/idea_backup/workspace.xml
Normal file
1649
kfc/idea_backup/workspace.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,8 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderBlockOverlayEvent;
|
||||
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.init.ModBlocks;
|
||||
@@ -65,105 +67,185 @@ public class Chisel extends CustomFacing {
|
||||
if(!player.isSwingInProgress) {
|
||||
if (playerStack.getItem() instanceof SledgeHammer) {
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, ModSounds.CHISEL_HIT, SoundCategory.BLOCKS, 0.8F, 0.3F / (PrimalAPI.getRandom().nextFloat() * 0.4F + 0.8F));
|
||||
playerStack.damageItem(1, player);
|
||||
|
||||
if (state.getValue(FACING) == EnumFacing.UP) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (1), (i - 1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, pos, breakState);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.up(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (1), (i - 1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
world.sendBlockBreakProgress(player.getEntityId() + PrimalAPI.getRandom().nextInt(100), movePos, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (state.getValue(FACING) == EnumFacing.DOWN) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (-1), (i - 1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, pos, breakState);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.down(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (-1), (i - 1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
world.sendBlockBreakProgress(player.getEntityId() + PrimalAPI.getRandom().nextInt(100), movePos, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.SOUTH) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (i-1), (1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, pos, breakState);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.south(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (i-1), (1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
world.sendBlockBreakProgress(player.getEntityId() + PrimalAPI.getRandom().nextInt(100), movePos, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
||||
if(PrimalAPI.getRandom().nextInt(1,10)!=1) {
|
||||
if (state.getValue(FACING) == EnumFacing.UP) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a-1), (i-1), (1));
|
||||
BlockPos movePos = pos.add((a - 1), (1), (i - 1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
doBreaking(world, movePos, pos, breakState);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.up(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (1), (i - 1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
doDamaging(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (state.getValue(FACING) == EnumFacing.DOWN) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (-1), (i - 1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.down(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (-1), (i - 1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
doDamaging(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.SOUTH) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (i - 1), (1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.south(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (i - 1), (1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
doDamaging(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (i - 1), (-1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.north(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((a - 1), (i - 1), (-1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
doDamaging(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.EAST) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((1), (i - 1), (a - 1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.east(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((1), (i - 1), (a - 1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
doDamaging(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (state.getValue(FACING) == EnumFacing.WEST) {
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((-1), (i - 1), (a - 1));
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
if (state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
doBreaking(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos.west(), state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, Boolean.valueOf(false)), 2);
|
||||
world.setBlockToAir(pos);
|
||||
return true;
|
||||
}
|
||||
if (!state.getValue(PrimalAPI.States.ACTIVE)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int a = 0; a < 3; a++) {
|
||||
BlockPos movePos = pos.add((-1), (i - 1), (a - 1));
|
||||
if (world.getBlockState(movePos).getBlock() != ModBlocks.chisel) {
|
||||
IBlockState breakState = world.getBlockState(movePos);
|
||||
doDamaging(world, movePos, breakState, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlockState(pos, state.withProperty(FACING, state.getValue(FACING)).withProperty(PrimalAPI.States.ACTIVE, true), 2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,13 +306,27 @@ public class Chisel extends CustomFacing {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void doBreaking(World world, BlockPos movePos, BlockPos pos, IBlockState state){
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasCustomBreakingProgress(IBlockState state)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private void doBreaking(World world, BlockPos movePos, IBlockState state, EntityPlayer player){
|
||||
if (!(state.getBlock().equals(Blocks.AIR))) {
|
||||
NonNullList<ItemStack> tempDrops = NonNullList.create();
|
||||
world.getBlockState(movePos).getBlock().getDrops(tempDrops, world, movePos, state, 0);
|
||||
PlayerHelper.spawnItemOnGround(world, pos, tempDrops);
|
||||
world.setBlockToAir(movePos);
|
||||
if(world.getBlockState(movePos).getBlock().getBlockHardness(state, world, movePos)>0) {
|
||||
world.destroyBlock(movePos, player.canHarvestBlock(state));
|
||||
world.sendBlockBreakProgress(player.getEntityId()+PrimalAPI.getRandom().nextInt(100), movePos, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void doDamaging(World world, BlockPos movePos, IBlockState state, EntityPlayer player){
|
||||
if (!(state.getBlock().equals(Blocks.AIR))) {
|
||||
if(world.getBlockState(movePos).getBlock().getBlockHardness(state, world, movePos)>0) {
|
||||
world.sendBlockBreakProgress(player.getEntityId() + PrimalAPI.getRandom().nextInt(100), movePos, PrimalAPI.getRandom().nextInt(3,10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,12 @@ public class ModBlocks {
|
||||
public static Block blockbreaker;
|
||||
public static Block castingform;
|
||||
|
||||
public static Block chisel;
|
||||
public static Block bronzechisel;
|
||||
public static Block copperchisel;
|
||||
public static Block ironchisel;
|
||||
public static Block cleanironchisel;
|
||||
public static Block steelchisel;
|
||||
public static Block wootzchisel;
|
||||
|
||||
public static Block pistonbellowsoak;
|
||||
public static Block pistonbellowsjungle;
|
||||
@@ -54,7 +59,12 @@ public class ModBlocks {
|
||||
blockbreaker = new Breaker(Material.WOOD, "blockbreaker", 4.0f);
|
||||
castingform = new CastingForm(Material.WOOD, "castingform");
|
||||
|
||||
chisel = new Chisel(Material.IRON, "chisel");
|
||||
copperchisel = new Chisel(Material.IRON, "copperchisel");
|
||||
ironchisel = new Chisel(Material.IRON, "ironchisel");
|
||||
bronzechisel = new Chisel(Material.IRON, "bronzechisel");
|
||||
cleanironchisel = new Chisel(Material.IRON, "cleanironchisel");
|
||||
steelchisel = new Chisel(Material.IRON, "steelchisel");
|
||||
wootzchisel = new Chisel(Material.IRON, "wootzchisel");
|
||||
|
||||
pistonbellowsoak = new PistonBellows(Material.WOOD, "pistonbellowsoak");
|
||||
pistonbellowsjungle = new PistonBellows(Material.WOOD, "pistonbellowsjungle");
|
||||
@@ -80,7 +90,12 @@ public class ModBlocks {
|
||||
registerBlockWithItem(blockbreaker);
|
||||
registerBlockWithItem(castingform);
|
||||
|
||||
registerBlockWithItem(chisel);
|
||||
registerBlockWithItem(copperchisel);
|
||||
registerBlockWithItem(bronzechisel);
|
||||
registerBlockWithItem(ironchisel);
|
||||
registerBlockWithItem(cleanironchisel);
|
||||
registerBlockWithItem(steelchisel);
|
||||
registerBlockWithItem(wootzchisel);
|
||||
|
||||
registerBlockWithItem(pistonbellowsoak);
|
||||
registerBlockWithItem(pistonbellowsjungle);
|
||||
@@ -102,7 +117,12 @@ public class ModBlocks {
|
||||
registerRender(forge_adobe);
|
||||
registerRender(castingform);
|
||||
|
||||
registerRender(chisel);
|
||||
registerRender(copperchisel);
|
||||
registerRender(bronzechisel);
|
||||
registerRender(ironchisel);
|
||||
registerRender(cleanironchisel);
|
||||
registerRender(steelchisel);
|
||||
registerRender(wootzchisel);
|
||||
|
||||
registerRender(blockbreaker);
|
||||
registerRender(pistonbellowsoak);
|
||||
|
||||
@@ -53,7 +53,12 @@ public class ModItems {
|
||||
public static Item wootzingotball;
|
||||
public static Item wootzchunk;
|
||||
|
||||
public static Item IRON_SLEDGE_HAMMER;
|
||||
public static Item ironsledgehammer;
|
||||
public static Item coppersledgehammer;
|
||||
public static Item bronzesledgehammer;
|
||||
public static Item cleanironsledgehammer;
|
||||
public static Item steelsledgehammer;
|
||||
public static Item wootzsledgehammer;
|
||||
|
||||
public static Item copperpickaxehead;
|
||||
public static Item copperaxehead;
|
||||
@@ -180,12 +185,6 @@ public class ModItems {
|
||||
coppershovelhead= new ToolPart("coppershovelhead", PrimalAPI.ToolMaterials.TOOL_COPPER, "shovel");
|
||||
copperhoehead = new ToolPart("copperhoehead", PrimalAPI.ToolMaterials.TOOL_COPPER, "hoe");
|
||||
|
||||
copperpickaxe = new CustomPickaxe("copperpickaxe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
|
||||
copperaxe = new CustomAxe("copperaxe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool, 4, -2.6F);
|
||||
coppershovel = new CustomShovel("coppershovel", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
|
||||
copperhoe = new CustomHoe("copperhoe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
|
||||
|
||||
|
||||
bronzepickaxehead = new ToolPart("bronzepickaxehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "pickaxe");
|
||||
bronzeaxehead = new ToolPart("bronzeaxehead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "axe");
|
||||
bronzeshovelhead = new ToolPart("bronzeshovelhead", PrimalAPI.ToolMaterials.TOOL_BRONZE, "shovel");
|
||||
@@ -214,31 +213,41 @@ public class ModItems {
|
||||
/**********
|
||||
TOOLS
|
||||
**********/
|
||||
copperpickaxe = new CustomPickaxe("copperpickaxe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
|
||||
copperaxe = new CustomAxe("copperaxe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool, 4, -2.6F);
|
||||
coppershovel = new CustomShovel("coppershovel", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
|
||||
copperhoe = new CustomHoe("copperhoe", PrimalAPI.ToolMaterials.TOOL_COPPER, brokencoppertool);
|
||||
coppersledgehammer = new SledgeHammer("coppersledgehammer", PrimalAPI.ToolMaterials.TOOL_COPPER);
|
||||
|
||||
bronzepickaxe = new CustomPickaxe("bronzepickaxe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzepickaxehead);
|
||||
bronzeaxe = new CustomAxe("bronzeaxe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzeaxehead, 5, -2.4f);
|
||||
bronzeshovel = new CustomShovel("bronzeshovel", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzeshovelhead);
|
||||
bronzehoe = new CustomHoe("bronzehoe", PrimalAPI.ToolMaterials.TOOL_BRONZE, bronzehoehead);
|
||||
bronzesledgehammer = new SledgeHammer("bronzesledgehammer", PrimalAPI.ToolMaterials.TOOL_BRONZE);
|
||||
|
||||
ironpickaxe = new CustomPickaxe("ironpickaxe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, pickaxehead);
|
||||
ironaxe = new CustomAxe("ironaxe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironaxehead, 5, -3.6f);
|
||||
ironshovel = new CustomShovel("ironshovel", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironshovelhead);
|
||||
ironhoe = new CustomHoe("ironhoe", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON, ironhoehead);
|
||||
IRON_SLEDGE_HAMMER = new SledgeHammer("ironsledgehammer", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL);
|
||||
ironsledgehammer = new SledgeHammer("ironsledgehammer", PrimalAPI.ToolMaterials.TOOL_WROUGHT_IRON);
|
||||
|
||||
cleanironpickaxe = new CustomPickaxe("cleanironpickaxe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironpickaxehead);
|
||||
cleanironaxe = new CustomAxe("cleanironaxe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironaxehead, 6, -3.2f);
|
||||
cleanironshovel = new CustomShovel("cleanironshovel", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironshovelhead);
|
||||
cleanironhoe = new CustomHoe("cleanironhoe", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON, cleanironhoehead);
|
||||
cleanironsledgehammer = new SledgeHammer("cleanironsledgehammer", PrimalAPI.ToolMaterials.TOOL_CLEAN_IRON);
|
||||
|
||||
steelpickaxe = new CustomPickaxe("steelpickaxe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelpickaxehead);
|
||||
steelaxe = new CustomAxe("steelaxe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelaxehead, 7, -2.8f);
|
||||
steelshovel = new CustomShovel("steelshovel", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelshovelhead);
|
||||
steelhoe = new CustomHoe("steelhoe", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL, steelhoehead);
|
||||
steelsledgehammer = new SledgeHammer("steelsledgehammer", PrimalAPI.ToolMaterials.TOOL_BASIC_STEEL);
|
||||
|
||||
wootzpickaxe = new CustomPickaxe("wootzpickaxe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzpickaxehead);
|
||||
wootzaxe = new CustomAxe("wootzaxe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzaxehead, 8, -2.4f);
|
||||
wootzshovel = new CustomShovel("wootzshovel", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzshovelhead);
|
||||
wootzhoe = new CustomHoe("wootzhoe", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL, wootzhoehead);
|
||||
wootzsledgehammer = new SledgeHammer("wootzsledgehammer", PrimalAPI.ToolMaterials.TOOL_WOOTZ_STEEL);
|
||||
|
||||
/**********
|
||||
WEAPONS
|
||||
@@ -328,12 +337,6 @@ public class ModItems {
|
||||
ForgeRegistries.ITEMS.register(coppershovelhead);
|
||||
ForgeRegistries.ITEMS.register(copperhoehead);
|
||||
|
||||
ForgeRegistries.ITEMS.register(copperpickaxe);
|
||||
ForgeRegistries.ITEMS.register(copperaxe);
|
||||
ForgeRegistries.ITEMS.register(coppershovel);
|
||||
ForgeRegistries.ITEMS.register(copperhoe);
|
||||
|
||||
|
||||
ForgeRegistries.ITEMS.register(bronzepickaxehead);
|
||||
ForgeRegistries.ITEMS.register(bronzeaxehead);
|
||||
ForgeRegistries.ITEMS.register(bronzeshovelhead);
|
||||
@@ -343,7 +346,6 @@ public class ModItems {
|
||||
ForgeRegistries.ITEMS.register(ironaxehead);
|
||||
ForgeRegistries.ITEMS.register(ironshovelhead);
|
||||
ForgeRegistries.ITEMS.register(ironhoehead);
|
||||
ForgeRegistries.ITEMS.register(IRON_SLEDGE_HAMMER);
|
||||
|
||||
ForgeRegistries.ITEMS.register(cleanironpickaxehead);
|
||||
ForgeRegistries.ITEMS.register(cleanironaxehead);
|
||||
@@ -363,30 +365,41 @@ public class ModItems {
|
||||
/**********
|
||||
TOOLS
|
||||
**********/
|
||||
ForgeRegistries.ITEMS.register(copperpickaxe);
|
||||
ForgeRegistries.ITEMS.register(copperaxe);
|
||||
ForgeRegistries.ITEMS.register(coppershovel);
|
||||
ForgeRegistries.ITEMS.register(copperhoe);
|
||||
ForgeRegistries.ITEMS.register(coppersledgehammer);
|
||||
|
||||
ForgeRegistries.ITEMS.register(bronzepickaxe);
|
||||
ForgeRegistries.ITEMS.register(bronzeaxe);
|
||||
ForgeRegistries.ITEMS.register(bronzeshovel);
|
||||
ForgeRegistries.ITEMS.register(bronzehoe);
|
||||
ForgeRegistries.ITEMS.register(bronzesledgehammer);
|
||||
|
||||
ForgeRegistries.ITEMS.register(ironpickaxe);
|
||||
ForgeRegistries.ITEMS.register(ironaxe);
|
||||
ForgeRegistries.ITEMS.register(ironshovel);
|
||||
ForgeRegistries.ITEMS.register(ironhoe);
|
||||
ForgeRegistries.ITEMS.register(ironsledgehammer);
|
||||
|
||||
ForgeRegistries.ITEMS.register(cleanironpickaxe);
|
||||
ForgeRegistries.ITEMS.register(cleanironaxe);
|
||||
ForgeRegistries.ITEMS.register(cleanironshovel);
|
||||
ForgeRegistries.ITEMS.register(cleanironhoe);
|
||||
ForgeRegistries.ITEMS.register(cleanironsledgehammer);
|
||||
|
||||
ForgeRegistries.ITEMS.register(steelpickaxe);
|
||||
ForgeRegistries.ITEMS.register(steelaxe);
|
||||
ForgeRegistries.ITEMS.register(steelshovel);
|
||||
ForgeRegistries.ITEMS.register(steelhoe);
|
||||
ForgeRegistries.ITEMS.register(steelsledgehammer);
|
||||
|
||||
ForgeRegistries.ITEMS.register(wootzpickaxe);
|
||||
ForgeRegistries.ITEMS.register(wootzaxe);
|
||||
ForgeRegistries.ITEMS.register(wootzshovel);
|
||||
ForgeRegistries.ITEMS.register(wootzhoe);
|
||||
ForgeRegistries.ITEMS.register(wootzsledgehammer);
|
||||
|
||||
/**********
|
||||
WEAPONS
|
||||
@@ -462,12 +475,6 @@ public class ModItems {
|
||||
registerRender(coppershovelhead);
|
||||
registerRender(copperhoehead);
|
||||
|
||||
registerRender(copperpickaxe);
|
||||
registerRender(copperaxe);
|
||||
registerRender(coppershovel);
|
||||
registerRender(copperhoe);
|
||||
|
||||
|
||||
registerRender(bronzepickaxehead);
|
||||
registerRender(bronzeaxehead);
|
||||
registerRender(bronzeshovelhead);
|
||||
@@ -496,31 +503,41 @@ public class ModItems {
|
||||
/**********
|
||||
TOOLS
|
||||
**********/
|
||||
registerRender(copperpickaxe);
|
||||
registerRender(copperaxe);
|
||||
registerRender(coppershovel);
|
||||
registerRender(copperhoe);
|
||||
registerRender(coppersledgehammer);
|
||||
|
||||
registerRender(bronzepickaxe);
|
||||
registerRender(bronzeaxe);
|
||||
registerRender(bronzeshovel);
|
||||
registerRender(bronzehoe);
|
||||
registerRender(bronzesledgehammer);
|
||||
|
||||
registerRender(ironpickaxe);
|
||||
registerRender(ironaxe);
|
||||
registerRender(ironshovel);
|
||||
registerRender(ironhoe);
|
||||
registerRender(IRON_SLEDGE_HAMMER);
|
||||
registerRender(ironsledgehammer);
|
||||
|
||||
registerRender(cleanironpickaxe);
|
||||
registerRender(cleanironaxe);
|
||||
registerRender(cleanironshovel);
|
||||
registerRender(cleanironhoe);
|
||||
registerRender(cleanironsledgehammer);
|
||||
|
||||
registerRender(steelpickaxe);
|
||||
registerRender(steelaxe);
|
||||
registerRender(steelshovel);
|
||||
registerRender(steelhoe);
|
||||
registerRender(steelsledgehammer);
|
||||
|
||||
registerRender(wootzpickaxe);
|
||||
registerRender(wootzaxe);
|
||||
registerRender(wootzshovel);
|
||||
registerRender(wootzhoe);
|
||||
registerRender(wootzsledgehammer);
|
||||
|
||||
/**********
|
||||
WEAPONS
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
@@ -10,9 +12,14 @@ import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
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.core.api.PrimalAPI;
|
||||
import nmd.primal.forgecraft.util.ToolMaterialMap;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class SledgeHammer extends BaseItem implements ToolMaterialMap {
|
||||
|
||||
|
||||
@@ -45,7 +52,8 @@ public class SledgeHammer extends BaseItem implements ToolMaterialMap {
|
||||
{
|
||||
if(!world.isRemote) {
|
||||
if (!player.isSwingInProgress) {
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.MINING_FATIGUE, (100/materialModifiers.get(this.getMaterial()) / (player.getActivePotionEffect(MobEffects.STRENGTH).getAmplifier()+1)), 100));
|
||||
int tempInt = 0;
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.MINING_FATIGUE, (100/(materialModifiers.get(this.getMaterial())+tempInt)), 100));
|
||||
player.swingArm(hand);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.PASS, player.getHeldItem(hand));
|
||||
}
|
||||
@@ -56,4 +64,12 @@ public class SledgeHammer extends BaseItem implements ToolMaterialMap {
|
||||
public ToolMaterial getMaterial() {
|
||||
return material;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
|
||||
{
|
||||
tooltip.add(ChatFormatting.LIGHT_PURPLE + "Damage: " + item.getItemDamage() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -136,11 +136,10 @@ public abstract class AbstractPickaxe extends ItemPickaxe implements ToolNBT {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack item, @Nullable World world, List<String> tooltip, ITooltipFlag flagIn)
|
||||
{
|
||||
//tooltip.add(ChatFormatting.GRAY + "Damage: " + item.getItemDamage() );
|
||||
if(item.hasTagCompound())
|
||||
{
|
||||
tooltip.add(ChatFormatting.GRAY + "Upgrades left: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) - getModifiers(item)));
|
||||
if (getEmerald(item) == true) {
|
||||
tooltip.add(ChatFormatting.GRAY + "Total Allowed: " + (ToolMaterialMap.materialModifiers.get(this.toolMaterial) ));
|
||||
if (getEmerald(item)) {
|
||||
tooltip.add(ChatFormatting.DARK_GREEN + "Emerald");
|
||||
}
|
||||
if (getDiamondLevel(item) > 0) {
|
||||
|
||||
@@ -287,7 +287,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
||||
}
|
||||
if(index == 1){
|
||||
if (stack.getItem() == ModItems.softcrucible) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
if(Block.getBlockFromItem(stack.getItem()) instanceof NBTCrucible ){
|
||||
return true;
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
"textures": {
|
||||
"particle": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture1": "forgecraft:items/hot_bronze"
|
||||
"texture1": "forgecraft:items/bronze/1"
|
||||
},
|
||||
"model": "forgecraft:castingcrucible"
|
||||
},
|
||||
@@ -84,7 +84,7 @@
|
||||
"textures": {
|
||||
"particle": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture1": "forgecraft:items/hot_bronze"
|
||||
"texture1": "forgecraft:items/bronze/1"
|
||||
},
|
||||
"model": "forgecraft:castingcrucible"
|
||||
},
|
||||
@@ -92,7 +92,7 @@
|
||||
"textures": {
|
||||
"particle": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture1": "forgecraft:items/hot_bronze"
|
||||
"texture1": "forgecraft:items/bronze/1"
|
||||
},
|
||||
"model": "forgecraft:castingcrucible"
|
||||
},
|
||||
@@ -100,7 +100,7 @@
|
||||
"textures": {
|
||||
"particle": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture1": "forgecraft:items/hot_bronze"
|
||||
"texture1": "forgecraft:items/bronze/1"
|
||||
},
|
||||
"model": "forgecraft:castingcrucible"
|
||||
},
|
||||
@@ -108,7 +108,7 @@
|
||||
"textures": {
|
||||
"particle": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture1": "forgecraft:items/hot_bronze"
|
||||
"texture1": "forgecraft:items/bronze/1"
|
||||
},
|
||||
"model": "forgecraft:castingcrucible"
|
||||
},
|
||||
@@ -116,7 +116,7 @@
|
||||
"textures": {
|
||||
"particle": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture1": "forgecraft:items/hot_bronze"
|
||||
"texture1": "forgecraft:items/bronze/1"
|
||||
},
|
||||
"model": "forgecraft:castingcrucible"
|
||||
},
|
||||
@@ -124,7 +124,7 @@
|
||||
"textures": {
|
||||
"particle": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture1": "forgecraft:items/hot_bronze"
|
||||
"texture1": "forgecraft:items/bronze/1"
|
||||
},
|
||||
"model": "forgecraft:castingcrucible"
|
||||
},
|
||||
@@ -132,7 +132,7 @@
|
||||
"textures": {
|
||||
"particle": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture": "forgecraft:blocks/stone_slab_hot",
|
||||
"texture1": "forgecraft:items/hot_bronze"
|
||||
"texture1": "forgecraft:items/bronze/1"
|
||||
},
|
||||
"model": "forgecraft:castingcrucible"
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 846 B |
Reference in New Issue
Block a user