added canola stack
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
loader_version=0.15.1
|
loader_version=0.15.1
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.20.4.6
|
mod_version = 1.20.4.7
|
||||||
maven_group = de.jottyfan.minecraft
|
maven_group = de.jottyfan.minecraft
|
||||||
archives_base_name = quickiefabric
|
archives_base_name = quickiefabric
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public abstract class DrillBlock extends FallingBlock {
|
|||||||
@Override
|
@Override
|
||||||
public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
Integer fuelLeft = state.get(FUEL);
|
Integer fuelLeft = state.get(FUEL);
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.REDSTONE, fuelLeft)));
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(QuickieItems.CANOLABOTTLE, fuelLeft)));
|
||||||
return super.onBreak(world, pos, state, player);
|
return super.onBreak(world, pos, state, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,6 +51,7 @@ public abstract class DrillBlock extends FallingBlock {
|
|||||||
BlockHitResult hit) {
|
BlockHitResult hit) {
|
||||||
Map<Item, Integer> loadings = new HashMap<>();
|
Map<Item, Integer> loadings = new HashMap<>();
|
||||||
loadings.put(QuickieItems.CANOLABOTTLE, 8);
|
loadings.put(QuickieItems.CANOLABOTTLE, 8);
|
||||||
|
loadings.put(QuickieItems.CANOLABOTTLESTACK, 72);
|
||||||
ItemStack stack = player.getStackInHand(hand);
|
ItemStack stack = player.getStackInHand(hand);
|
||||||
Item item = stack.getItem();
|
Item item = stack.getItem();
|
||||||
if (stack.isEmpty() || !loadings.containsKey(item) ) {
|
if (stack.isEmpty() || !loadings.containsKey(item) ) {
|
||||||
@ -64,11 +65,12 @@ public abstract class DrillBlock extends FallingBlock {
|
|||||||
if (load < fuelWeight) {
|
if (load < fuelWeight) {
|
||||||
Integer numberOfTooMuchLoad = fuelWeight - load;
|
Integer numberOfTooMuchLoad = fuelWeight - load;
|
||||||
fuelWeight = load;
|
fuelWeight = load;
|
||||||
// world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(QuickieItems.CANOLABOTTLE, numberOfTooMuchLoad)));
|
|
||||||
}
|
}
|
||||||
world.setBlockState(pos, state.with(FUEL, state.get(FUEL) + fuelWeight));
|
world.setBlockState(pos, state.with(FUEL, state.get(FUEL) + fuelWeight));
|
||||||
if (item.equals(QuickieItems.CANOLABOTTLE)) {
|
if (item.equals(QuickieItems.CANOLABOTTLE)) {
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 1)));
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 1)));
|
||||||
|
} else if (item.equals(QuickieItems.CANOLABOTTLESTACK)) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 9)));
|
||||||
}
|
}
|
||||||
stack.decrement(1);
|
stack.decrement(1);
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,7 @@ public class RegistryManager {
|
|||||||
stacks.add(new ItemStack(QuickieItems.CANOLA));
|
stacks.add(new ItemStack(QuickieItems.CANOLA));
|
||||||
stacks.add(new ItemStack(QuickieItems.CANOLASEED));
|
stacks.add(new ItemStack(QuickieItems.CANOLASEED));
|
||||||
stacks.add(new ItemStack(QuickieItems.CANOLABOTTLE));
|
stacks.add(new ItemStack(QuickieItems.CANOLABOTTLE));
|
||||||
|
stacks.add(new ItemStack(QuickieItems.CANOLABOTTLESTACK));
|
||||||
stacks.add(new ItemStack(QuickieItems.BACKPACK_BROWN));
|
stacks.add(new ItemStack(QuickieItems.BACKPACK_BROWN));
|
||||||
stacks.add(new ItemStack(QuickieItems.BACKPACK_WHITE));
|
stacks.add(new ItemStack(QuickieItems.BACKPACK_WHITE));
|
||||||
stacks.add(new ItemStack(QuickieItems.BACKPACK_BLACK));
|
stacks.add(new ItemStack(QuickieItems.BACKPACK_BLACK));
|
||||||
@ -248,6 +249,7 @@ public class RegistryManager {
|
|||||||
registerItem(QuickieItems.CANOLA, "canola");
|
registerItem(QuickieItems.CANOLA, "canola");
|
||||||
registerItem(QuickieItems.CANOLASEED, "canolaseed");
|
registerItem(QuickieItems.CANOLASEED, "canolaseed");
|
||||||
registerItem(QuickieItems.CANOLABOTTLE, "canolabottle");
|
registerItem(QuickieItems.CANOLABOTTLE, "canolabottle");
|
||||||
|
registerItem(QuickieItems.CANOLABOTTLESTACK, "canolabottlestack");
|
||||||
registerItem(QuickieItems.BACKPACK_BROWN, "backpack_brown");
|
registerItem(QuickieItems.BACKPACK_BROWN, "backpack_brown");
|
||||||
registerItem(QuickieItems.BACKPACK_WHITE, "backpack_white");
|
registerItem(QuickieItems.BACKPACK_WHITE, "backpack_white");
|
||||||
registerItem(QuickieItems.BACKPACK_BLACK, "backpack_black");
|
registerItem(QuickieItems.BACKPACK_BLACK, "backpack_black");
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package de.jottyfan.minecraft.quickiefabric.items;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ItemCanolabottlestack extends Item {
|
||||||
|
|
||||||
|
public ItemCanolabottlestack() {
|
||||||
|
super(new FabricItemSettings().maxCount(64));
|
||||||
|
}
|
||||||
|
}
|
@ -40,4 +40,5 @@ public class QuickieItems {
|
|||||||
public static final ItemSpeedingot SPEEDINGOT = new ItemSpeedingot();
|
public static final ItemSpeedingot SPEEDINGOT = new ItemSpeedingot();
|
||||||
public static final ItemQuickieingot QUICKIEINGOT = new ItemQuickieingot();
|
public static final ItemQuickieingot QUICKIEINGOT = new ItemQuickieingot();
|
||||||
public static final ItemCanolabottle CANOLABOTTLE = new ItemCanolabottle();
|
public static final ItemCanolabottle CANOLABOTTLE = new ItemCanolabottle();
|
||||||
|
public static final ItemCanolabottlestack CANOLABOTTLESTACK = new ItemCanolabottlestack();
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
"item.quickiefabric.canola": "Raps",
|
"item.quickiefabric.canola": "Raps",
|
||||||
"item.quickiefabric.canolaseed": "Rapssaat",
|
"item.quickiefabric.canolaseed": "Rapssaat",
|
||||||
"item.quickiefabric.canolabottle": "Rapsöl",
|
"item.quickiefabric.canolabottle": "Rapsöl",
|
||||||
|
"item.quickiefabric.canolabottlestack": "Rapsölsammlung",
|
||||||
"item.quickiefabric.stub": "Stummel",
|
"item.quickiefabric.stub": "Stummel",
|
||||||
"item.quickiefabric.oxidizedcopperpowder": "oxidiertes Kupferpulver",
|
"item.quickiefabric.oxidizedcopperpowder": "oxidiertes Kupferpulver",
|
||||||
"item.quickiefabric.speedingot": "Fluchtpulverbarren",
|
"item.quickiefabric.speedingot": "Fluchtpulverbarren",
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
"item.quickiefabric.canola": "canola",
|
"item.quickiefabric.canola": "canola",
|
||||||
"item.quickiefabric.canolaseed": "canola seed",
|
"item.quickiefabric.canolaseed": "canola seed",
|
||||||
"item.quickiefabric.canolabottle": "canola oil",
|
"item.quickiefabric.canolabottle": "canola oil",
|
||||||
|
"item.quickiefabric.canolabottlestack": "canola oil collection",
|
||||||
"item.quickiefabric.stub": "stub",
|
"item.quickiefabric.stub": "stub",
|
||||||
"item.quickiefabric.oxidizedcopperpowder": "oxidized copper powder",
|
"item.quickiefabric.oxidizedcopperpowder": "oxidized copper powder",
|
||||||
"item.quickiefabric.speedingot": "Speedpowderingot",
|
"item.quickiefabric.speedingot": "Speedpowderingot",
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickiefabric:item/canolabottlestack"
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4.7 KiB |
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shapeless",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "quickiefabric:canolabottlestack"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "quickiefabric:canolabottle",
|
||||||
|
"count": 9
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"type": "crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"ccc",
|
||||||
|
"ccc",
|
||||||
|
"ccc"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"item": "quickiefabric:canolabottle"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "quickiefabric:canolabottlestack",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user