Compare commits
10 Commits
plants-dev
...
9ad284a95a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ad284a95a | ||
|
|
5020d30a30 | ||
|
|
bc4eb4220d | ||
|
|
20ec69b571 | ||
|
|
127bdfc782 | ||
|
|
b0ceac38cb | ||
|
|
1856271617 | ||
|
|
3f7eaf48e3 | ||
|
|
a4dd705db3 | ||
|
|
83ddc724bd |
@@ -4,16 +4,12 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import de.jottyfan.minecraft.block.QuicklyBlocks;
|
import de.jottyfan.minecraft.block.QuicklyBlocks;
|
||||||
|
import de.jottyfan.minecraft.composter.QuicklyComposter;
|
||||||
import de.jottyfan.minecraft.feature.QuicklyFeatures;
|
import de.jottyfan.minecraft.feature.QuicklyFeatures;
|
||||||
import de.jottyfan.minecraft.item.QuicklyItems;
|
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||||
|
import de.jottyfan.minecraft.loot.QuicklyLootTables;
|
||||||
|
import de.jottyfan.minecraft.tab.QuicklyTab;
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import net.fabricmc.fabric.api.loot.v3.LootTableEvents;
|
|
||||||
import net.fabricmc.fabric.api.registry.CompostingChanceRegistry;
|
|
||||||
import net.minecraft.resources.Identifier;
|
|
||||||
import net.minecraft.world.level.storage.loot.LootPool;
|
|
||||||
import net.minecraft.world.level.storage.loot.entries.LootItem;
|
|
||||||
import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition;
|
|
||||||
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
@@ -24,39 +20,15 @@ public class Quickly implements ModInitializer {
|
|||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
|
public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
|
||||||
|
|
||||||
private void registerComposterItems() {
|
|
||||||
CompostingChanceRegistry.INSTANCE.add(QuicklyItems.COTTONSEED, 0.5f);
|
|
||||||
CompostingChanceRegistry.INSTANCE.add(QuicklyItems.COTTON, 0.75f);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void registerLootTableChanges() {
|
|
||||||
LootTableEvents.MODIFY.register((key, tableBuilder, source, registries) -> {
|
|
||||||
if (source.isBuiltin()) {
|
|
||||||
// TODO: maybe, better harvest cotton from dry grass instead?
|
|
||||||
Identifier shortGrass = Identifier.fromNamespaceAndPath("minecraft", "blocks/short_grass");
|
|
||||||
Identifier tallGrass = Identifier.fromNamespaceAndPath("minecraft", "blocks/tall_grass");
|
|
||||||
if (key.identifier().equals(shortGrass)) {
|
|
||||||
LootPool.Builder poolBuilder = LootPool.lootPool()
|
|
||||||
.setRolls(ConstantValue.exactly(1f))
|
|
||||||
.when(LootItemRandomChanceCondition.randomChance(0.1f))
|
|
||||||
.add(LootItem.lootTableItem(QuicklyItems.COTTONSEED));
|
|
||||||
tableBuilder.withPool(poolBuilder);
|
|
||||||
} else if (key.identifier().equals(tallGrass)) {
|
|
||||||
// for the canola loot table block later
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
LOGGER.info("loading {}", MOD_ID);
|
LOGGER.info("loading {}", MOD_ID);
|
||||||
|
|
||||||
|
QuicklyTab.registerItemGroup();
|
||||||
QuicklyItems.registerModItems();
|
QuicklyItems.registerModItems();
|
||||||
QuicklyBlocks.registerModBlocks();
|
QuicklyBlocks.registerModBlocks();
|
||||||
QuicklyFeatures.registerFeatures();
|
QuicklyFeatures.registerFeatures();
|
||||||
registerComposterItems();
|
QuicklyComposter.registerComposterItems();
|
||||||
registerLootTableChanges();
|
QuicklyLootTables.registerChanges();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,5 +15,6 @@ public class QuicklyClient implements ClientModInitializer {
|
|||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
BlockRenderLayerMap.putBlock(QuicklyBlocks.COTTONPLANT, ChunkSectionLayer.CUTOUT);
|
BlockRenderLayerMap.putBlock(QuicklyBlocks.COTTONPLANT, ChunkSectionLayer.CUTOUT);
|
||||||
|
BlockRenderLayerMap.putBlock(QuicklyBlocks.CANOLAPLANT, ChunkSectionLayer.CUTOUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package de.jottyfan.minecraft.block;
|
package de.jottyfan.minecraft.block;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import de.jottyfan.minecraft.item.QuicklyItems;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
||||||
|
|
||||||
@@ -14,14 +13,18 @@ import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
|||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BlockOreDeepslateTurquoise extends BlockOreTurquoise {
|
public class BlockDrops extends Block {
|
||||||
|
|
||||||
public BlockOreDeepslateTurquoise(Properties properties) {
|
private ItemStack dropItems;
|
||||||
|
|
||||||
|
public BlockDrops(Properties properties, ItemStack dropItems) {
|
||||||
super(properties);
|
super(properties);
|
||||||
|
this.dropItems = dropItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<ItemStack> getDrops(BlockState state, Builder builder) {
|
protected List<ItemStack> getDrops(BlockState state, Builder builder) {
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuicklyItems.RAWTURQUOISE, 2) });
|
ItemStack droppable = dropItems == null ? new ItemStack(this.asItem()) : dropItems;
|
||||||
|
return Arrays.asList(new ItemStack[] { droppable });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
package de.jottyfan.minecraft.block;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
import net.minecraft.util.RandomSource;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockEmptyLavahoarder extends Block {
|
||||||
|
|
||||||
|
public BlockEmptyLavahoarder(Properties properties) {
|
||||||
|
super(properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ItemStack> getDrops(BlockState state, Builder params) {
|
||||||
|
List<ItemStack> list = new ArrayList<>();
|
||||||
|
list.add(new ItemStack(QuicklyBlocks.EMPTYLAVAHOARDER));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
|
||||||
|
boolean found = BlockLavahoarder.suckLava(level, pos.north());
|
||||||
|
found = found || BlockLavahoarder.suckLava(level, pos.south());
|
||||||
|
found = found || BlockLavahoarder.suckLava(level, pos.east());
|
||||||
|
found = found || BlockLavahoarder.suckLava(level, pos.west());
|
||||||
|
found = found || BlockLavahoarder.suckLava(level, pos.above());
|
||||||
|
found = found || BlockLavahoarder.suckLava(level, pos.below());
|
||||||
|
if (found) {
|
||||||
|
level.setBlock(pos, QuicklyBlocks.LAVAHOARDER.defaultBlockState(), 2);
|
||||||
|
level.scheduleTick(pos, QuicklyBlocks.LAVAHOARDER, 1);
|
||||||
|
} else {
|
||||||
|
level.scheduleTick(pos, this, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final String stringOf(BlockPos pos) {
|
||||||
|
StringBuilder buf = new StringBuilder();
|
||||||
|
buf.append(pos.getX()).append(":");
|
||||||
|
buf.append(pos.getY()).append(":");
|
||||||
|
buf.append(pos.getZ());
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final BlockPos blockPosOf(String s) {
|
||||||
|
if (s.contains(":")) {
|
||||||
|
String[] parts = s.split(":");
|
||||||
|
if (parts.length > 2) {
|
||||||
|
Integer x = Integer.valueOf(parts[0]);
|
||||||
|
Integer y = Integer.valueOf(parts[1]);
|
||||||
|
Integer z = Integer.valueOf(parts[2]);
|
||||||
|
return new BlockPos(x, y, z);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findAllAttachedLavaBlocks(Set<String> list, BlockPos pos, Level level, Integer counter) {
|
||||||
|
if (counter < 1) {
|
||||||
|
return;
|
||||||
|
} else if (Blocks.LAVA.equals(level.getBlockState(pos).getBlock())) {
|
||||||
|
String p = stringOf(pos);
|
||||||
|
if (!list.contains(p)) {
|
||||||
|
list.add(p);
|
||||||
|
findAllAttachedLavaBlocks(list, pos.above(), level, counter - 1);
|
||||||
|
findAllAttachedLavaBlocks(list, pos.below(), level, counter - 1);
|
||||||
|
findAllAttachedLavaBlocks(list, pos.north(), level, counter - 1);
|
||||||
|
findAllAttachedLavaBlocks(list, pos.south(), level, counter - 1);
|
||||||
|
findAllAttachedLavaBlocks(list, pos.east(), level, counter - 1);
|
||||||
|
findAllAttachedLavaBlocks(list, pos.west(), level, counter - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) {
|
||||||
|
Set<String> positions = new HashSet<>();
|
||||||
|
Integer counter = 8; // TODO: make it level up - able
|
||||||
|
findAllAttachedLavaBlocks(positions, pos.above(), level, counter);
|
||||||
|
findAllAttachedLavaBlocks(positions, pos.below(), level, counter);
|
||||||
|
findAllAttachedLavaBlocks(positions, pos.north(), level, counter);
|
||||||
|
findAllAttachedLavaBlocks(positions, pos.south(), level, counter);
|
||||||
|
findAllAttachedLavaBlocks(positions, pos.east(), level, counter);
|
||||||
|
findAllAttachedLavaBlocks(positions, pos.west(), level, counter);
|
||||||
|
Integer amount = positions.size();
|
||||||
|
for (String p : positions) {
|
||||||
|
level.setBlock(blockPosOf(p), Blocks.AIR.defaultBlockState(), 2);
|
||||||
|
}
|
||||||
|
if (amount > 0) {
|
||||||
|
level.setBlock(pos, QuicklyBlocks.LAVAHOARDER.defaultBlockState(), 2);
|
||||||
|
level.scheduleTick(pos, QuicklyBlocks.LAVAHOARDER, 1);
|
||||||
|
int count = 0;
|
||||||
|
Random random = new Random();
|
||||||
|
for (int i = 0; i < amount; i++) {
|
||||||
|
if (random.nextFloat() < 0.0125) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count > 0) {
|
||||||
|
BlockLavahoarder.spawnRandomItems(level, pos.above(), count);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
level.scheduleTick(pos, this, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
128
src/main/java/de/jottyfan/minecraft/block/BlockLavahoarder.java
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
package de.jottyfan.minecraft.block;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
import net.minecraft.util.RandomSource;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.InteractionResult;
|
||||||
|
import net.minecraft.world.entity.item.ItemEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
||||||
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockLavahoarder extends Block {
|
||||||
|
|
||||||
|
public BlockLavahoarder(Properties properties) {
|
||||||
|
super(properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ItemStack> getDrops(BlockState state, Builder params) {
|
||||||
|
List<ItemStack> list = new ArrayList<>();
|
||||||
|
list.add(new ItemStack(QuicklyBlocks.LAVAHOARDER));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final void spawnRandomItems(Level level, BlockPos pos, Integer count) {
|
||||||
|
Integer which = level.getRandom().nextInt(10);
|
||||||
|
ItemStack stack = null;
|
||||||
|
if (which < 1) {
|
||||||
|
stack = new ItemStack(Items.DIAMOND, level.getRandom().nextInt(count + 2));
|
||||||
|
} else if (which < 2) {
|
||||||
|
stack = new ItemStack(Items.EMERALD, level.getRandom().nextInt(count + 1));
|
||||||
|
} else if (which < 3) {
|
||||||
|
stack = new ItemStack(Items.RAW_GOLD, level.getRandom().nextInt(count));
|
||||||
|
} else if (which < 4) {
|
||||||
|
stack = new ItemStack(Items.RAW_IRON, level.getRandom().nextInt(count + 1));
|
||||||
|
} else if (which < 5) {
|
||||||
|
stack = new ItemStack(Items.RAW_COPPER, level.getRandom().nextInt(count + 2));
|
||||||
|
} else if (which < 6) {
|
||||||
|
stack = new ItemStack(Items.OBSIDIAN);
|
||||||
|
} else if (which < 7) {
|
||||||
|
stack = new ItemStack(Items.LAPIS_LAZULI);
|
||||||
|
} else if (which < 8) {
|
||||||
|
stack = new ItemStack(QuicklyItems.RAWTURQUOISE);
|
||||||
|
// } else if (which < 9) {
|
||||||
|
// stack = new ItemStack(QuicklyItems.SULFOR);
|
||||||
|
}
|
||||||
|
if (stack != null) {
|
||||||
|
level.addFreshEntity(new ItemEntity(level, pos.getX(), pos.getY(), pos.getZ(), stack));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sucks the lava that touches the block
|
||||||
|
*
|
||||||
|
* @param world the world
|
||||||
|
* @param pos the pos
|
||||||
|
* @return true if lava was found
|
||||||
|
*/
|
||||||
|
public static final boolean suckLava(ServerLevel level, BlockPos pos) {
|
||||||
|
if (level == null) {
|
||||||
|
return false;
|
||||||
|
} else if (Blocks.LAVA.equals(level.getBlockState(pos).getBlock())) {
|
||||||
|
level.setBlock(pos, Blocks.AIR.defaultBlockState(), 2);
|
||||||
|
if (new Random().nextFloat() > 0.9f) {
|
||||||
|
spawnRandomItems(level, pos.above(), 2);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
|
||||||
|
suckLava(level, pos.north());
|
||||||
|
suckLava(level, pos.south());
|
||||||
|
suckLava(level, pos.east());
|
||||||
|
suckLava(level, pos.west());
|
||||||
|
suckLava(level, pos.above());
|
||||||
|
suckLava(level, pos.below());
|
||||||
|
level.scheduleTick(pos, this, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player,
|
||||||
|
BlockHitResult hitResult) {
|
||||||
|
if (!level.isClientSide()) {
|
||||||
|
ItemStack handStack = player.getMainHandItem();
|
||||||
|
if (handStack != null && Items.BUCKET.equals(handStack.getItem())) {
|
||||||
|
Integer amount = handStack.getCount();
|
||||||
|
ItemStack lavaBucketStack = new ItemStack(Items.LAVA_BUCKET, 1);
|
||||||
|
ItemStack emptyBucketStack = new ItemStack(Items.BUCKET, amount - 1);
|
||||||
|
if (emptyBucketStack.getCount() < 1) {
|
||||||
|
player.setItemInHand(InteractionHand.MAIN_HAND, lavaBucketStack);
|
||||||
|
} else {
|
||||||
|
player.setItemInHand(InteractionHand.MAIN_HAND, emptyBucketStack);
|
||||||
|
level.addFreshEntity(new ItemEntity(level, pos.getX(), pos.getY(), pos.getZ(), lavaBucketStack));
|
||||||
|
}
|
||||||
|
spawnRandomItems(level, pos, 2);
|
||||||
|
level.setBlock(pos, QuicklyBlocks.EMPTYLAVAHOARDER.defaultBlockState(), 2);
|
||||||
|
level.scheduleTick(pos, this, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return InteractionResult.SUCCESS; // forbid to empty the just filled lava bucket
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) {
|
||||||
|
level.scheduleTick(pos, this, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
package de.jottyfan.minecraft.block;
|
||||||
|
|
||||||
|
import org.jspecify.annotations.Nullable;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.Quickly;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
|
import net.minecraft.sounds.SoundEvents;
|
||||||
|
import net.minecraft.sounds.SoundSource;
|
||||||
|
import net.minecraft.util.RandomSource;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.InteractionResult;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.monster.Monster;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.block.state.StateDefinition.Builder;
|
||||||
|
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||||
|
import net.minecraft.world.phys.AABB;
|
||||||
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
|
import net.minecraft.world.ticks.ScheduledTick;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockMonsterhoarder extends Block {
|
||||||
|
|
||||||
|
private static final Integer MINSUCKRADIUS = 2;
|
||||||
|
private static final Integer MAXSUCKRADIUS = 20;
|
||||||
|
private static final Integer MINBURNTICKS = 10;
|
||||||
|
private static final Integer MAXBURNTICKS = 200;
|
||||||
|
private static final IntegerProperty SUCKRADIUS = IntegerProperty.create("suckradius", MINSUCKRADIUS, MAXSUCKRADIUS);
|
||||||
|
private static final IntegerProperty BURNTICKS = IntegerProperty.create("burnticks", MINBURNTICKS, MAXBURNTICKS);
|
||||||
|
|
||||||
|
public BlockMonsterhoarder(Properties properties) {
|
||||||
|
super(properties.strength(2.5f).lightLevel(state -> state.getValue(SUCKRADIUS)));
|
||||||
|
registerDefaultState(stateDefinition.any().setValue(SUCKRADIUS, MINSUCKRADIUS).setValue(BURNTICKS, MINBURNTICKS));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void createBlockStateDefinition(Builder<Block, BlockState> builder) {
|
||||||
|
builder.add(SUCKRADIUS, BURNTICKS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected InteractionResult useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player,
|
||||||
|
InteractionHand hand, BlockHitResult hitResult) {
|
||||||
|
if (Items.WATER_BUCKET.equals(itemStack.getItem())) {
|
||||||
|
level.setBlock(pos, state.setValue(SUCKRADIUS, MINSUCKRADIUS), UPDATE_ALL);
|
||||||
|
player.setItemInHand(hand, new ItemStack(Items.BUCKET));
|
||||||
|
} else if (Items.TORCH.equals(itemStack.getItem())) {
|
||||||
|
level.setBlock(pos, state.cycle(SUCKRADIUS), UPDATE_ALL);
|
||||||
|
itemStack.shrink(1);
|
||||||
|
} else if (Items.SOUL_TORCH.equals(itemStack.getItem())) {
|
||||||
|
int newBurnTicks = state.getValue(BURNTICKS) + 10;
|
||||||
|
newBurnTicks = newBurnTicks < MAXBURNTICKS ? newBurnTicks : MAXBURNTICKS;
|
||||||
|
level.setBlock(pos, state.setValue(BURNTICKS, newBurnTicks), UPDATE_ALL);
|
||||||
|
itemStack.shrink(1);
|
||||||
|
} else if (Items.REDSTONE_TORCH.equals(itemStack.getItem())) {
|
||||||
|
level.setBlock(pos, state.cycle(SUCKRADIUS), UPDATE_ALL);
|
||||||
|
} else if (Items.COPPER_TORCH.equals(itemStack.getItem())) {
|
||||||
|
level.setBlock(pos, state.setValue(BURNTICKS, MINBURNTICKS), UPDATE_ALL);
|
||||||
|
itemStack.shrink(1);
|
||||||
|
} else {
|
||||||
|
int suckRadius = state.getValue(SUCKRADIUS);
|
||||||
|
int burnTicks = state.getValue(BURNTICKS);
|
||||||
|
Component message = Component.translatable("info.block.monsterhoarder", suckRadius, burnTicks);
|
||||||
|
if (player instanceof ServerPlayer serverPlayer) {
|
||||||
|
serverPlayer.displayClientMessage(message, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return InteractionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
|
||||||
|
if (!level.isClientSide()) {
|
||||||
|
AABB checkArea = new AABB(pos).inflate(state.getValue(SUCKRADIUS));
|
||||||
|
for (Monster monster : level.getEntitiesOfClass(Monster.class, checkArea)) {
|
||||||
|
if (monster.fireImmune()) {
|
||||||
|
monster.kill(level);
|
||||||
|
} else {
|
||||||
|
monster.igniteForTicks(state.getValue(BURNTICKS));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (level instanceof ServerLevel serverLevel) {
|
||||||
|
serverLevel.getBlockTicks()
|
||||||
|
.schedule(new ScheduledTick<>(this, pos, level.getGameTime() + 20, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity by, ItemStack itemStack) {
|
||||||
|
if (level instanceof ServerLevel serverLevel) {
|
||||||
|
serverLevel.getBlockTicks()
|
||||||
|
.schedule(new ScheduledTick<>(this, pos, level.getGameTime() + 20, 1));
|
||||||
|
level.playSound(null, pos, SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, SoundSource.PLAYERS, 1f, 1f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
47
src/main/java/de/jottyfan/minecraft/block/BlockOre.java
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
package de.jottyfan.minecraft.block;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.sounds.SoundEvent;
|
||||||
|
import net.minecraft.sounds.SoundSource;
|
||||||
|
import net.minecraft.world.entity.projectile.Projectile;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
||||||
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockOre extends Block {
|
||||||
|
|
||||||
|
private SoundEvent soundEvent;
|
||||||
|
private ItemStack dropItems;
|
||||||
|
|
||||||
|
public BlockOre(Properties properties, SoundEvent soundEvent, ItemStack dropItems) {
|
||||||
|
super(properties.requiresCorrectToolForDrops());
|
||||||
|
this.soundEvent = soundEvent;
|
||||||
|
this.dropItems = dropItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ItemStack> getDrops(BlockState state, Builder builder) {
|
||||||
|
ItemStack droppable = dropItems == null ? new ItemStack(this.asItem()) : dropItems;
|
||||||
|
return Arrays.asList(new ItemStack[] { droppable });
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onProjectileHit(final Level level, final BlockState state, final BlockHitResult hitResult,
|
||||||
|
final Projectile projectile) {
|
||||||
|
if (!level.isClientSide() && soundEvent != null) {
|
||||||
|
BlockPos hitPos = hitResult.getBlockPos();
|
||||||
|
level.playSound(null, hitPos, soundEvent, SoundSource.BLOCKS, 1.0F, 0.5F + level.getRandom().nextFloat() * 1.2F);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package de.jottyfan.minecraft.block;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.minecraft.item.QuicklyItems;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
|
||||||
import net.minecraft.world.level.block.AmethystBlock;
|
|
||||||
import net.minecraft.world.level.block.SoundType;
|
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
|
||||||
import net.minecraft.world.level.storage.loot.LootParams.Builder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockOreTurquoise extends AmethystBlock {
|
|
||||||
|
|
||||||
public BlockOreTurquoise(Properties properties) {
|
|
||||||
super(properties.strength(3.0f).sound(SoundType.AMETHYST).requiresCorrectToolForDrops());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected List<ItemStack> getDrops(BlockState state, Builder builder) {
|
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuicklyItems.RAWTURQUOISE) });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,15 +3,18 @@ package de.jottyfan.minecraft.block;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import de.jottyfan.minecraft.Quickly;
|
import de.jottyfan.minecraft.Quickly;
|
||||||
|
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||||
|
import de.jottyfan.minecraft.tab.QuicklyTab;
|
||||||
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.resources.Identifier;
|
import net.minecraft.resources.Identifier;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.sounds.SoundEvents;
|
||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.item.CreativeModeTabs;
|
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.SoundType;
|
import net.minecraft.world.level.block.SoundType;
|
||||||
@@ -26,11 +29,26 @@ public class QuicklyBlocks {
|
|||||||
public static final Block KELPBUNDLE = registerBlock("kelpbundle",
|
public static final Block KELPBUNDLE = registerBlock("kelpbundle",
|
||||||
Properties.of().instabreak().sound(SoundType.WET_GRASS).strength(0.1f).friction(0.95f));
|
Properties.of().instabreak().sound(SoundType.WET_GRASS).strength(0.1f).friction(0.95f));
|
||||||
public static final Block TURQUOISEBLOCK = registerBlock("blockturquoise", Properties.of().strength(1.5f));
|
public static final Block TURQUOISEBLOCK = registerBlock("blockturquoise", Properties.of().strength(1.5f));
|
||||||
public static final Block ORETURQUOISE = registerBlock("oreturquoise", p -> new BlockOreTurquoise(p));
|
public static final Block ORETURQUOISE = registerBlock("oreturquoise",
|
||||||
|
properties -> new BlockOre(properties.strength(3.0f).sound(SoundType.AMETHYST), SoundEvents.AMETHYST_BLOCK_CHIME,
|
||||||
|
new ItemStack(QuicklyItems.RAWTURQUOISE)));
|
||||||
public static final Block OREDEEPSLATETURQUOISE = registerBlock("oredeepslateturquoise",
|
public static final Block OREDEEPSLATETURQUOISE = registerBlock("oredeepslateturquoise",
|
||||||
p -> new BlockOreDeepslateTurquoise(p));
|
properties -> new BlockOre(properties, SoundEvents.AMETHYST_BLOCK_CHIME,
|
||||||
|
new ItemStack(QuicklyItems.RAWTURQUOISE, 2)));
|
||||||
public static final Block COTTONPLANT = registerBlock("blockcottonplant", Properties.ofFullCopy(Blocks.WHEAT),
|
public static final Block COTTONPLANT = registerBlock("blockcottonplant", Properties.ofFullCopy(Blocks.WHEAT),
|
||||||
p -> new BlockPlant(p, "cottonseed", "cotton"));
|
properties -> new BlockPlant(properties, "cottonseed", "cotton"));
|
||||||
|
public static final Block CANOLAPLANT = registerBlock("blockcanolaplant", Properties.ofFullCopy(Blocks.WHEAT),
|
||||||
|
properties -> new BlockPlant(properties, "canolaseed", "canola"));
|
||||||
|
public static final Block LAVAHOARDER = registerBlock("lavahoarder",
|
||||||
|
Properties.of().strength(2.5f).lightLevel(state -> 15), properties -> new BlockLavahoarder(properties));
|
||||||
|
public static final Block EMPTYLAVAHOARDER = registerBlock("emptylavahoarder", Properties.of().strength(2.5f),
|
||||||
|
properties -> new BlockEmptyLavahoarder(properties));
|
||||||
|
public static final Block QUICKIEPOWDER = registerBlock("blockquickiepowder",
|
||||||
|
properties -> new BlockDrops(properties, new ItemStack(QuicklyItems.QUICKIEPOWDER, 9)));
|
||||||
|
public static final Block SPEEDPOWDER = registerBlock("blockspeedpowder",
|
||||||
|
properties -> new BlockDrops(properties, new ItemStack(QuicklyItems.SPEEDPOWDER, 9)));
|
||||||
|
public static final Block MONSTERHOARDER = registerBlock("monsterhoarder",
|
||||||
|
properties -> new BlockMonsterhoarder(properties));
|
||||||
|
|
||||||
private static final Block registerBlock(String name, Properties properties) {
|
private static final Block registerBlock(String name, Properties properties) {
|
||||||
return QuicklyBlocks.registerBlock(name, properties, p -> new Block(p));
|
return QuicklyBlocks.registerBlock(name, properties, p -> new Block(p));
|
||||||
@@ -51,12 +69,15 @@ public class QuicklyBlocks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void registerModBlocks() {
|
public static void registerModBlocks() {
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.BUILDING_BLOCKS).register(block -> {
|
ItemGroupEvents.modifyEntriesEvent(QuicklyTab.QUICKLY_TAB).register(block -> {
|
||||||
block.accept(KELPBUNDLE);
|
block.accept(KELPBUNDLE);
|
||||||
block.accept(TURQUOISEBLOCK);
|
block.accept(TURQUOISEBLOCK);
|
||||||
block.accept(ORETURQUOISE);
|
block.accept(ORETURQUOISE);
|
||||||
block.accept(OREDEEPSLATETURQUOISE);
|
block.accept(OREDEEPSLATETURQUOISE);
|
||||||
block.accept(COTTONPLANT);
|
block.accept(EMPTYLAVAHOARDER);
|
||||||
|
block.accept(SPEEDPOWDER);
|
||||||
|
block.accept(QUICKIEPOWDER);
|
||||||
|
block.accept(MONSTERHOARDER);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package de.jottyfan.minecraft.composter;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||||
|
import net.fabricmc.fabric.api.registry.CompostingChanceRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class QuicklyComposter {
|
||||||
|
|
||||||
|
public static final void registerComposterItems() {
|
||||||
|
CompostingChanceRegistry.INSTANCE.add(QuicklyItems.COTTONSEED, 0.5f);
|
||||||
|
CompostingChanceRegistry.INSTANCE.add(QuicklyItems.COTTON, 0.75f);
|
||||||
|
CompostingChanceRegistry.INSTANCE.add(QuicklyItems.CANOLASEED, 0.5f);
|
||||||
|
CompostingChanceRegistry.INSTANCE.add(QuicklyItems.CANOLA, 0.75f);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package de.jottyfan.minecraft.item;
|
||||||
|
|
||||||
|
import java.util.EnumMap;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.Quickly;
|
||||||
|
import net.minecraft.core.Registry;
|
||||||
|
import net.minecraft.resources.Identifier;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.sounds.SoundEvents;
|
||||||
|
import net.minecraft.util.Util;
|
||||||
|
import net.minecraft.world.item.equipment.ArmorMaterial;
|
||||||
|
import net.minecraft.world.item.equipment.ArmorType;
|
||||||
|
import net.minecraft.world.item.equipment.EquipmentAsset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModArmorMaterials {
|
||||||
|
static ResourceKey<? extends Registry<EquipmentAsset>> REGISTRY_KEY = ResourceKey.createRegistryKey(Identifier.fromNamespaceAndPath("minecraft", "equipment_asset"));
|
||||||
|
public static final ResourceKey<EquipmentAsset> TURQUOISE_KEY = ResourceKey.create(REGISTRY_KEY, Identifier.fromNamespaceAndPath(Quickly.MOD_ID, "turquoise"));
|
||||||
|
|
||||||
|
public static final ArmorMaterial TURQUOISE_ARMOR_MATERIAL = new ArmorMaterial(500, Util.make(new EnumMap<>(ArmorType.class), map -> {
|
||||||
|
map.put(ArmorType.BOOTS, 4);
|
||||||
|
map.put(ArmorType.LEGGINGS, 8);
|
||||||
|
map.put(ArmorType.CHESTPLATE, 15);
|
||||||
|
map.put(ArmorType.HELMET, 4);
|
||||||
|
map.put(ArmorType.BODY, 8);
|
||||||
|
}), 20, SoundEvents.ARMOR_EQUIP_DIAMOND, 0, 0, null, TURQUOISE_KEY);
|
||||||
|
}
|
||||||
@@ -3,15 +3,16 @@ package de.jottyfan.minecraft.item;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import de.jottyfan.minecraft.Quickly;
|
import de.jottyfan.minecraft.Quickly;
|
||||||
|
import de.jottyfan.minecraft.tab.QuicklyTab;
|
||||||
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
import net.minecraft.resources.Identifier;
|
import net.minecraft.resources.Identifier;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.world.item.CreativeModeTabs;
|
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.Item.Properties;
|
import net.minecraft.world.item.Item.Properties;
|
||||||
|
import net.minecraft.world.item.equipment.ArmorType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -24,7 +25,34 @@ public class QuicklyItems {
|
|||||||
public static final Item TURQUOISEINGOT = registerItem("turquoiseingot");
|
public static final Item TURQUOISEINGOT = registerItem("turquoiseingot");
|
||||||
public static final Item COTTON = registerItem("cotton");
|
public static final Item COTTON = registerItem("cotton");
|
||||||
public static final Item COTTONPLANT = registerItem("cottonplant");
|
public static final Item COTTONPLANT = registerItem("cottonplant");
|
||||||
public static final Item COTTONSEED = registerItem("cottonseed", properties -> new Plant(properties, "blockcottonplant"));
|
public static final Item COTTONSEED = registerItem("cottonseed",
|
||||||
|
properties -> new Plant(properties, "blockcottonplant"));
|
||||||
|
public static final Item CANOLA = registerItem("canola");
|
||||||
|
public static final Item CANOLAPLANT = registerItem("canolaplant");
|
||||||
|
public static final Item CANOLASEED = registerItem("canolaseed",
|
||||||
|
properties -> new Plant(properties, "blockcanolaplant"));
|
||||||
|
public static final Item CANOLABOTTLE = registerItem("canolabottle");
|
||||||
|
public static final Item CANOLABOTTLESTACK = registerItem("canolabottlestack");
|
||||||
|
public static final Item ROTTENFLESHSTRIPES = registerItem("rotten_flesh_stripes");
|
||||||
|
public static final Item OXIDIZEDCOPPERPOWDER = registerItem("oxidizedcopperpowder");
|
||||||
|
public static final Item COPPERSTRING = registerItem("copperstring");
|
||||||
|
public static final Item COPPERPOWDER = registerItem("copperpowder");
|
||||||
|
public static final Item COPPERSTUB = registerItem("copperstub");
|
||||||
|
public static final Item COPPERSTICK = registerItem("copperstick");
|
||||||
|
public static final Item SPEEDPOWDER = registerItem("speedpowder");
|
||||||
|
public static final Item QUICKIEPOWDER = registerItem("quickiepowder");
|
||||||
|
public static final Item SPEEDINGOT = registerItem("speedingot");
|
||||||
|
public static final Item QUICKIEINGOT = registerItem("quickieingot");
|
||||||
|
|
||||||
|
public static final Item ARMOR_TURQUOISE_BOOTS = registerItem("turquoise_boots", ArmorType.BOOTS);
|
||||||
|
public static final Item ARMOR_TURQUOISE_HELMET = registerItem("turquoise_helmet", ArmorType.HELMET);
|
||||||
|
public static final Item ARMOR_TURQUOISE_LEGGINGS = registerItem("turquoise_leggings", ArmorType.LEGGINGS);
|
||||||
|
public static final Item ARMOR_TURQUOISE_CHESTPLATE = registerItem("turquoise_chestplate", ArmorType.CHESTPLATE);
|
||||||
|
|
||||||
|
private static final Item registerItem(String name, ArmorType armorType) {
|
||||||
|
return QuicklyItems.registerItem(name,
|
||||||
|
new Item.Properties().stacksTo(1).humanoidArmor(ModArmorMaterials.TURQUOISE_ARMOR_MATERIAL, armorType));
|
||||||
|
}
|
||||||
|
|
||||||
private static final Item registerItem(String name) {
|
private static final Item registerItem(String name) {
|
||||||
return QuicklyItems.registerItem(name, new Item.Properties());
|
return QuicklyItems.registerItem(name, new Item.Properties());
|
||||||
@@ -45,13 +73,31 @@ public class QuicklyItems {
|
|||||||
return Registry.register(BuiltInRegistries.ITEM, identifier, item);
|
return Registry.register(BuiltInRegistries.ITEM, identifier, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerModItems() {
|
public static final void registerModItems() {
|
||||||
ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.TOOLS_AND_UTILITIES).register(item -> {
|
ItemGroupEvents.modifyEntriesEvent(QuicklyTab.QUICKLY_TAB).register(item -> {
|
||||||
item.accept(STUB);
|
item.accept(STUB);
|
||||||
item.accept(RAWTURQUOISE);
|
|
||||||
item.accept(TURQUOISEINGOT);
|
|
||||||
item.accept(COTTON);
|
item.accept(COTTON);
|
||||||
item.accept(COTTONSEED);
|
item.accept(COTTONSEED);
|
||||||
|
item.accept(ROTTENFLESHSTRIPES);
|
||||||
|
item.accept(CANOLA);
|
||||||
|
item.accept(CANOLASEED);
|
||||||
|
item.accept(CANOLABOTTLE);
|
||||||
|
item.accept(CANOLABOTTLESTACK);
|
||||||
|
item.accept(RAWTURQUOISE);
|
||||||
|
item.accept(SPEEDPOWDER);
|
||||||
|
item.accept(QUICKIEPOWDER);
|
||||||
|
item.accept(TURQUOISEINGOT);
|
||||||
|
item.accept(SPEEDINGOT);
|
||||||
|
item.accept(QUICKIEINGOT);
|
||||||
|
item.accept(COPPERPOWDER);
|
||||||
|
item.accept(OXIDIZEDCOPPERPOWDER);
|
||||||
|
item.accept(COPPERSTRING);
|
||||||
|
item.accept(COPPERSTICK);
|
||||||
|
item.accept(COPPERSTUB);
|
||||||
|
item.accept(ARMOR_TURQUOISE_HELMET);
|
||||||
|
item.accept(ARMOR_TURQUOISE_CHESTPLATE);
|
||||||
|
item.accept(ARMOR_TURQUOISE_LEGGINGS);
|
||||||
|
item.accept(ARMOR_TURQUOISE_BOOTS);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,19 +24,16 @@ import net.minecraft.world.level.block.Blocks;
|
|||||||
*/
|
*/
|
||||||
public class Stub extends Item {
|
public class Stub extends Item {
|
||||||
|
|
||||||
// @formatter:off
|
|
||||||
private static final Map<Block, Item> SLASH_MAP = Map.of(
|
|
||||||
Blocks.HAY_BLOCK, Items.WHEAT,
|
|
||||||
Blocks.DRIED_KELP_BLOCK, Items.DRIED_KELP,
|
|
||||||
QuicklyBlocks.KELPBUNDLE, Items.KELP);
|
|
||||||
// @formatter:on
|
|
||||||
|
|
||||||
public Stub(Properties properties) {
|
public Stub(Properties properties) {
|
||||||
super(properties.stacksTo(64));
|
super(properties.stacksTo(64));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InteractionResult useOn(UseOnContext context) {
|
public InteractionResult useOn(UseOnContext context) {
|
||||||
|
Map<Block, Item> SLASH_MAP = Map.of(
|
||||||
|
Blocks.HAY_BLOCK, Items.WHEAT,
|
||||||
|
Blocks.DRIED_KELP_BLOCK, Items.DRIED_KELP,
|
||||||
|
QuicklyBlocks.KELPBUNDLE, Items.KELP);
|
||||||
Level level = context.getLevel();
|
Level level = context.getLevel();
|
||||||
BlockPos pos = context.getClickedPos();
|
BlockPos pos = context.getClickedPos();
|
||||||
Block clickedBlock = level.getBlockState(pos).getBlock();
|
Block clickedBlock = level.getBlockState(pos).getBlock();
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package de.jottyfan.minecraft.loot;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||||
|
import net.fabricmc.fabric.api.loot.v3.LootTableEvents;
|
||||||
|
import net.minecraft.resources.Identifier;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.level.storage.loot.LootPool;
|
||||||
|
import net.minecraft.world.level.storage.loot.entries.LootItem;
|
||||||
|
import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition;
|
||||||
|
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class QuicklyLootTables {
|
||||||
|
|
||||||
|
public static final void registerChanges() {
|
||||||
|
LootTableEvents.MODIFY.register((key, tableBuilder, source, registries) -> {
|
||||||
|
if (source.isBuiltin()) {
|
||||||
|
Identifier shortGrass = Identifier.fromNamespaceAndPath("minecraft", "blocks/short_grass");
|
||||||
|
Identifier tallGrass = Identifier.fromNamespaceAndPath("minecraft", "blocks/tall_grass");
|
||||||
|
if (key.identifier().equals(shortGrass)) {
|
||||||
|
tableBuilder.withPool(harvestItemByChance(QuicklyItems.COTTONSEED, 0.05f));
|
||||||
|
} else if (key.identifier().equals(tallGrass)) {
|
||||||
|
tableBuilder.withPool(harvestItemByChance(QuicklyItems.CANOLASEED, 0.03f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final LootPool.Builder harvestItemByChance(Item item, float chance) {
|
||||||
|
return LootPool.lootPool().setRolls(ConstantValue.exactly(1f))
|
||||||
|
.when(LootItemRandomChanceCondition.randomChance(chance)).add(LootItem.lootTableItem(item));
|
||||||
|
}
|
||||||
|
}
|
||||||
31
src/main/java/de/jottyfan/minecraft/tab/QuicklyTab.java
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
package de.jottyfan.minecraft.tab;
|
||||||
|
|
||||||
|
import de.jottyfan.minecraft.Quickly;
|
||||||
|
import de.jottyfan.minecraft.item.QuicklyItems;
|
||||||
|
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
|
||||||
|
import net.minecraft.core.Registry;
|
||||||
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
|
import net.minecraft.core.registries.Registries;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.resources.Identifier;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.world.item.CreativeModeTab;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class QuicklyTab {
|
||||||
|
|
||||||
|
public static final ResourceKey<CreativeModeTab> QUICKLY_TAB = ResourceKey.create(Registries.CREATIVE_MODE_TAB,
|
||||||
|
Identifier.fromNamespaceAndPath(Quickly.MOD_ID, "itemgroup"));
|
||||||
|
|
||||||
|
public static final void registerItemGroup() {
|
||||||
|
Registry.register(BuiltInRegistries.CREATIVE_MODE_TAB, QUICKLY_TAB,
|
||||||
|
FabricItemGroup.builder().icon(() -> new ItemStack(QuicklyItems.STUB))
|
||||||
|
.title(Component.translatable("tab." + Quickly.MOD_ID)).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"age=0": { "model": "quickly:block/canolaplant0" },
|
||||||
|
"age=1": { "model": "quickly:block/canolaplant1" },
|
||||||
|
"age=2": { "model": "quickly:block/canolaplant2" },
|
||||||
|
"age=3": { "model": "quickly:block/canolaplant3" },
|
||||||
|
"age=4": { "model": "quickly:block/canolaplant4" },
|
||||||
|
"age=5": { "model": "quickly:block/canolaplant5" },
|
||||||
|
"age=6": { "model": "quickly:block/canolaplant6" },
|
||||||
|
"age=7": { "model": "quickly:block/canolaplant7" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "quickly:block/blockquickiepowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "quickly:block/blockspeedpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "quickly:block/emptylavahoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "quickly:block/lavahoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "quickly:block/monsterhoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
src/main/resources/assets/quickly/equipment/turquoise.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"layers": {
|
||||||
|
"humanoid": [
|
||||||
|
{
|
||||||
|
"texture": "quickly:turquoise"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"humanoid_leggings": [
|
||||||
|
{
|
||||||
|
"texture": "quickly:turquoise"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/blockquickiepowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:block/blockspeedpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/assets/quickly/items/canola.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/canola"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/canolabottle"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/canolabottlestack"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/assets/quickly/items/canolaplant.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/canolaseed"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/assets/quickly/items/canolaseed.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/canolaseed"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/copperpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/assets/quickly/items/copperstick.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/copperstick"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/copperstring"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/assets/quickly/items/copperstub.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/copperstub"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:block/emptylavahoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/assets/quickly/items/lavahoarder.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:block/lavahoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:block/monsterhoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/oxidizedcopperpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/quickieingot"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/quickiepowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/rotten_flesh_stripes"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/assets/quickly/items/speedingot.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/speedingot"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/assets/quickly/items/speedpowder.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/speedpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/turquoise_boots"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/turquoise_chestplate"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/turquoise_helmet"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "quickly:item/turquoise_leggings"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,39 @@
|
|||||||
{
|
{
|
||||||
|
"info.block.monsterhoarder": "Radius: %s, Brenndauer: %s Ticks",
|
||||||
|
"item.quickly.blockcanolaplant": "Rapspflanze",
|
||||||
"item.quickly.blockcottonplant": "Baumwollpflanze",
|
"item.quickly.blockcottonplant": "Baumwollpflanze",
|
||||||
|
"item.quickly.blockquickiepowder": "Eilpulverblock",
|
||||||
|
"item.quickly.blockspeedpowder": "Fluchtpulverblock",
|
||||||
"item.quickly.blockturquoise": "Türkisblock",
|
"item.quickly.blockturquoise": "Türkisblock",
|
||||||
|
"item.quickly.canola": "Raps",
|
||||||
|
"item.quickly.canolabottle": "Rapsöl",
|
||||||
|
"item.quickly.canolabottlestack": "Rapsölsammlung",
|
||||||
|
"item.quickly.canolaseed": "Rapssaat",
|
||||||
|
"item.quickly.copperpowder": "Kupferpulver",
|
||||||
|
"item.quickly.copperstick": "Kupferstock",
|
||||||
|
"item.quickly.copperstring": "Kupferband",
|
||||||
|
"item.quickly.copperstub": "Kupferstummel",
|
||||||
"item.quickly.cotton": "Baumwolle",
|
"item.quickly.cotton": "Baumwolle",
|
||||||
"item.quickly.cottonseed": "Baumwollsaat",
|
"item.quickly.cottonseed": "Baumwollsaat",
|
||||||
|
"item.quickly.emptylavahoarder": "Lavasauger",
|
||||||
|
"item.quickly.itemhoarder": "Itemsauger",
|
||||||
"item.quickly.kelpbundle": "Seegrassbündel",
|
"item.quickly.kelpbundle": "Seegrassbündel",
|
||||||
|
"item.quickly.lavahoarder": "voller Lavasauger",
|
||||||
|
"item.quickly.monsterhoarder": "Monstersauger",
|
||||||
"item.quickly.oredeepslateturquoise": "Türkistiefenerz",
|
"item.quickly.oredeepslateturquoise": "Türkistiefenerz",
|
||||||
"item.quickly.oreturquoise": "Türkiserz",
|
"item.quickly.oreturquoise": "Türkiserz",
|
||||||
|
"item.quickly.oxidizedcopperpowder": "oxidiertes Kupferpulver",
|
||||||
|
"item.quickly.quickieingot": "Eilpulverbarren",
|
||||||
|
"item.quickly.quickiepowder": "Eilpulver",
|
||||||
"item.quickly.rawturquoise": "rohes Türkis",
|
"item.quickly.rawturquoise": "rohes Türkis",
|
||||||
|
"item.quickly.rotten_flesh_stripes": "geschnittenes Gammelfleisch",
|
||||||
|
"item.quickly.speedingot": "Fluchtpulverbarren",
|
||||||
|
"item.quickly.speedpowder": "Fluchtpulver",
|
||||||
"item.quickly.stub": "Stummel",
|
"item.quickly.stub": "Stummel",
|
||||||
"item.quickly.turquoiseingot": "Türkisbarren"
|
"item.quickly.turquoise_boots": "Türkisschuhe",
|
||||||
|
"item.quickly.turquoise_chestplate": "Türkisbrustpanzer",
|
||||||
|
"item.quickly.turquoise_helmet": "Türkishelm",
|
||||||
|
"item.quickly.turquoise_leggings": "Türkishose",
|
||||||
|
"item.quickly.turquoiseingot": "Türkisbarren",
|
||||||
|
"tab.quickly": "quickly"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,39 @@
|
|||||||
{
|
{
|
||||||
|
"info.block.monsterhoarder": "radius: %s, burn ticks: %s",
|
||||||
|
"item.quickly.blockcanolaplant": "canola plant",
|
||||||
"item.quickly.blockcottonplant": "cotton plant",
|
"item.quickly.blockcottonplant": "cotton plant",
|
||||||
|
"item.quickly.blockquickiepowder": "quickie powder block",
|
||||||
|
"item.quickly.blockspeedpowder": "speed powder block",
|
||||||
"item.quickly.blockturquoise": "block of turquoise",
|
"item.quickly.blockturquoise": "block of turquoise",
|
||||||
|
"item.quickly.canola": "canola",
|
||||||
|
"item.quickly.canolabottle": "canola oil",
|
||||||
|
"item.quickly.canolabottlestack": "canola oil collection",
|
||||||
|
"item.quickly.canolaseed": "canola seed",
|
||||||
|
"item.quickly.copperpowder": "copper powder",
|
||||||
|
"item.quickly.copperstick": "copper stick",
|
||||||
|
"item.quickly.copperstring": "copper string",
|
||||||
|
"item.quickly.copperstub": "copper stub",
|
||||||
"item.quickly.cotton": "cotton",
|
"item.quickly.cotton": "cotton",
|
||||||
"item.quickly.cottonseed": "cotton seed",
|
"item.quickly.cottonseed": "cotton seed",
|
||||||
|
"item.quickly.emptylavahoarder": "lava hoarder",
|
||||||
|
"item.quickly.itemhoarder": "item hoarder",
|
||||||
"item.quickly.kelpbundle": "kelp bundle",
|
"item.quickly.kelpbundle": "kelp bundle",
|
||||||
|
"item.quickly.lavahoarder": "filled lava hoarder",
|
||||||
|
"item.quickly.monsterhoarder": "monster hoarder",
|
||||||
"item.quickly.oredeepslateturquoise": "turquoise deepslate ore",
|
"item.quickly.oredeepslateturquoise": "turquoise deepslate ore",
|
||||||
"item.quickly.oreturquoise": "turquoise ore",
|
"item.quickly.oreturquoise": "turquoise ore",
|
||||||
|
"item.quickly.oxidizedcopperpowder": "oxidized copper powder",
|
||||||
|
"item.quickly.quickieingot": "quickie powder ingot",
|
||||||
|
"item.quickly.quickiepowder": "quickie powder",
|
||||||
"item.quickly.rawturquoise": "raw turquoise",
|
"item.quickly.rawturquoise": "raw turquoise",
|
||||||
|
"item.quickly.rotten_flesh_stripes": "rotton flesh stripes",
|
||||||
|
"item.quickly.speedingot": "speed powder ingot",
|
||||||
|
"item.quickly.speedpowder": "speed powder",
|
||||||
"item.quickly.stub": "stub",
|
"item.quickly.stub": "stub",
|
||||||
"item.quickly.turquoiseingot": "turquoise ingot"
|
"item.quickly.turquoise_boots": "turquoise boots",
|
||||||
|
"item.quickly.turquoise_chestplate": "turquoise chestplate",
|
||||||
|
"item.quickly.turquoise_helmet": "turquoise helmet",
|
||||||
|
"item.quickly.turquoise_leggings": "turquoise leggings",
|
||||||
|
"item.quickly.turquoiseingot": "turquoise ingot",
|
||||||
|
"tab.quickly": "quickly"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "quickly:block/blockquickiepowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "quickly:block/blockspeedpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent":"block/cross",
|
||||||
|
"textures":{
|
||||||
|
"cross":"quickly:block/canolaplant0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent":"block/cross",
|
||||||
|
"textures":{
|
||||||
|
"cross":"quickly:block/canolaplant1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent":"block/cross",
|
||||||
|
"textures":{
|
||||||
|
"cross":"quickly:block/canolaplant2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent":"block/cross",
|
||||||
|
"textures":{
|
||||||
|
"cross":"quickly:block/canolaplant3"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent":"block/cross",
|
||||||
|
"textures":{
|
||||||
|
"cross":"quickly:block/canolaplant4"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent":"block/cross",
|
||||||
|
"textures":{
|
||||||
|
"cross":"quickly:block/canolaplant5"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent":"block/cross",
|
||||||
|
"textures":{
|
||||||
|
"cross":"quickly:block/canolaplant6"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent":"block/cross",
|
||||||
|
"textures":{
|
||||||
|
"cross":"quickly:block/canolaplant7"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "quickly:block/emptylavahoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "quickly:block/lavahoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "quickly:block/monsterhoarder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"parent": "quickly:block/blockquickiepowder",
|
||||||
|
"display": {
|
||||||
|
"thirdperson": {
|
||||||
|
"rotation": [ 10, -45, 170 ],
|
||||||
|
"translation": [ 0, 1.5, -2.75 ],
|
||||||
|
"scale": [ 0.375, 0.375, 0.375 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"parent": "quickly:block/blockspeedpowder",
|
||||||
|
"display": {
|
||||||
|
"thirdperson": {
|
||||||
|
"rotation": [ 10, -45, 170 ],
|
||||||
|
"translation": [ 0, 1.5, -2.75 ],
|
||||||
|
"scale": [ 0.375, 0.375, 0.375 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/canola"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/canolabottle"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/canolabottlestack"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/canolaseed"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/canolaseed"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/copperpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/copperstick"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/copperstring"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/copperstub"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"parent": "quickly:block/emptylavahoarder",
|
||||||
|
"display": {
|
||||||
|
"thirdperson": {
|
||||||
|
"rotation": [ 10, -45, 170 ],
|
||||||
|
"translation": [ 0, 1.5, -2.75 ],
|
||||||
|
"scale": [ 0.375, 0.375, 0.375 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"parent": "quickly:block/lavahoarder",
|
||||||
|
"display": {
|
||||||
|
"thirdperson": {
|
||||||
|
"rotation": [ 10, -45, 170 ],
|
||||||
|
"translation": [ 0, 1.5, -2.75 ],
|
||||||
|
"scale": [ 0.375, 0.375, 0.375 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"parent": "quickly:block/monsterhoarder",
|
||||||
|
"display": {
|
||||||
|
"thirdperson": {
|
||||||
|
"rotation": [ 10, -45, 170 ],
|
||||||
|
"translation": [ 0, 1.5, -2.75 ],
|
||||||
|
"scale": [ 0.375, 0.375, 0.375 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/oxidizedcopperpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/quickieingot"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/quickiepowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/rotten_flesh_stripes"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/speedingot"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/speedpowder"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/turquoise_boots"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/turquoise_chestplate"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/turquoise_helmet"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/coal",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "quickly:item/turquoise_leggings"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 590 B |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 603 B |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 542 B |
BIN
src/main/resources/assets/quickly/textures/block/lavahoarder.png
Normal file
|
After Width: | Height: | Size: 709 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 4.8 KiB |