Compare commits
2 Commits
4c5dea1756
...
1.21.4
Author | SHA1 | Date | |
---|---|---|---|
06db4df2cb | |||
0c744ef52b |
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.8-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.9-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
|
@ -4,14 +4,14 @@ org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.21.3
|
||||
yarn_mappings=1.21.3+build.2
|
||||
minecraft_version=1.21.4
|
||||
yarn_mappings=1.21.4+build.1
|
||||
loader_version=0.16.9
|
||||
|
||||
# Mod Properties
|
||||
mod_version=1.21.3.1
|
||||
mod_version=1.21.4.0
|
||||
maven_group=de.jottyfan.quickiemod
|
||||
archives_base_name=quickiemod
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.108.0+1.21.3
|
||||
fabric_version=0.110.5+1.21.4
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
@ -3,6 +3,7 @@ package de.jottyfan.quickiemod.event;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.jottyfan.quickiemod.Quickiemod;
|
||||
import de.jottyfan.quickiemod.item.HarvestRange;
|
||||
import de.jottyfan.quickiemod.item.ModItems;
|
||||
import de.jottyfan.quickiemod.item.ToolRangeable;
|
||||
@ -63,34 +64,40 @@ public class EventBlockBreak {
|
||||
BlockPos pos, PlayerEntity player) {
|
||||
List<Block> validBlocks = tool.getBlockList(currentBlock);
|
||||
HarvestRange range = tool.getRange(itemStack);
|
||||
if (tool instanceof Item) {
|
||||
Item toolItem = (Item) tool; // a rangeable tool should always be an item
|
||||
List<String> visitedBlocks = new ArrayList<>();
|
||||
if (tool instanceof ToolSpeedpowderAxe) {
|
||||
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.UPWARDS,
|
||||
player, true);
|
||||
} else if (ModItems.TOOL_SPEEDPOWDERPICKAXE.getName().equals(tool.getName())) {
|
||||
} else if (ModItems.TOOL_SPEEDPOWDERPICKAXE.getName().equals(toolItem.getName())) {
|
||||
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else if (ModItems.TOOL_SPEEDPOWDERSHOVEL.getName().equals(tool.getName())) {
|
||||
} else if (ModItems.TOOL_SPEEDPOWDERSHOVEL.getName().equals(toolItem.getName())) {
|
||||
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else if (ModItems.TOOL_SPEEDPOWDERHOE.getName().equals(tool.getName())) {
|
||||
} else if (ModItems.TOOL_SPEEDPOWDERHOE.getName().equals(toolItem.getName())) {
|
||||
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else if (ModItems.TOOL_QUICKIEPOWDERAXE.getName().equals(tool.getName())) {
|
||||
} else if (ModItems.TOOL_QUICKIEPOWDERAXE.getName().equals(toolItem.getName())) {
|
||||
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.UPWARDS,
|
||||
player, true);
|
||||
} else if (ModItems.TOOL_QUICKIEPOWDERPICKAXE.getName().equals(tool.getName())) {
|
||||
} else if (ModItems.TOOL_QUICKIEPOWDERPICKAXE.getName().equals(toolItem.getName())) {
|
||||
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else if (ModItems.TOOL_QUICKIEPOWDERSHOVEL.getName().equals(tool.getName())) {
|
||||
} else if (ModItems.TOOL_QUICKIEPOWDERSHOVEL.getName().equals(toolItem.getName())) {
|
||||
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else if (ModItems.TOOL_QUICKIEPOWDERHOE.getName().equals(tool.getName())) {
|
||||
} else if (ModItems.TOOL_QUICKIEPOWDERHOE.getName().equals(toolItem.getName())) {
|
||||
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||
player, false);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
Quickiemod.LOGGER.warn("using a tool that is not an item - no rangeable operations are possible.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,6 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -14,13 +13,6 @@ import net.minecraft.text.Text;
|
||||
*/
|
||||
public interface ToolRangeable {
|
||||
|
||||
/**
|
||||
* dummy to have a getName method that comes with the item
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
public Text getName();
|
||||
|
||||
/**
|
||||
* @param stack the item stack that keeps the range
|
||||
* @return range of blocks to be harvested
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/blockquickiepowder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blocksalpeter"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blockspeedpowder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blockstackerdown"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blockstackereast"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blockstackernorth"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blockstackersouth"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blockstackerup"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blockstackerwest"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/blocksulphor"
|
||||
}
|
||||
}
|
6
src/main/resources/assets/quickiemod/items/canola.json
Normal file
6
src/main/resources/assets/quickiemod/items/canola.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/canola"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/canolabottle"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/canolabottlestack"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/canolaseed"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/canolaseed"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/carrotstack"
|
||||
}
|
||||
}
|
6
src/main/resources/assets/quickiemod/items/cotton.json
Normal file
6
src/main/resources/assets/quickiemod/items/cotton.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/cotton"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/cottonseed"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/cottonseed"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/dirtsalpeter"
|
||||
}
|
||||
}
|
6
src/main/resources/assets/quickiemod/items/drill.json
Normal file
6
src/main/resources/assets/quickiemod/items/drill.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/drill"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/drilleast"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/drillnorth"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/drillsouth"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/drillwest"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/emptylavahoarder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/itemhoarder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/kelpstack"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/lavahoarder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/monsterhoarder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/oredeepslatesulphor"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/orenethersulphor"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/oresalpeter"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/oresandsalpeter"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/oresulphor"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/oxidizedcopperpowder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/quickieingot"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/quickiepowder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/quickiepowderaxe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/quickiepowderhoe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/quickiepowderpickaxe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/quickiepowdershovel"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/quickiepowderwaterhoe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/rotten_flesh_stripes"
|
||||
}
|
||||
}
|
6
src/main/resources/assets/quickiemod/items/salpeter.json
Normal file
6
src/main/resources/assets/quickiemod/items/salpeter.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/salpeter"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:block/sandsalpeter"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/speedingot"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/speedpowder"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/speedpowderaxe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/speedpowderhoe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/speedpowderpickaxe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/speedpowdershears"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/speedpowdershovel"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/speedpowderwaterhoe"
|
||||
}
|
||||
}
|
6
src/main/resources/assets/quickiemod/items/stub.json
Normal file
6
src/main/resources/assets/quickiemod/items/stub.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/stub"
|
||||
}
|
||||
}
|
6
src/main/resources/assets/quickiemod/items/sulphor.json
Normal file
6
src/main/resources/assets/quickiemod/items/sulphor.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "quickiemod:item/sulphor"
|
||||
}
|
||||
}
|
@ -29,7 +29,7 @@
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.9",
|
||||
"minecraft": "~1.21.3",
|
||||
"minecraft": "~1.21.4",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
|
Reference in New Issue
Block a user