firstcommit

This commit is contained in:
Soph :3 2024-10-13 15:18:05 +03:00
commit ba0a6793de
Signed by: sophie
GPG key ID: EDA5D222A0C270F2
68 changed files with 2906 additions and 0 deletions

View file

@ -0,0 +1,11 @@
{
"required": true,
"minVersion": "0.8",
"package": "sad.ovh.weed.mixin.client",
"compatibilityLevel": "JAVA_21",
"client": [
],
"injectors": {
"defaultRequire": 1
}
}

View file

@ -0,0 +1,62 @@
package sad.ovh.weed;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import eu.pb4.polymer.core.api.item.PolymerItemGroupUtils;
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
import net.fabricmc.api.ModInitializer;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.Items;
import net.minecraft.registry.RegistryKey;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
public class Weed implements ModInitializer {
public static final String MOD_ID = "weed";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
public static final ItemGroup group = PolymerItemGroupUtils.builder().displayName(Text.literal("Weed Mod's Group"))
.icon(() -> Items.DIAMOND.getDefaultStack()).build();
public static RegistryKey<ItemGroup> groupKey;
@Override
public void onInitialize() {
String weedAscii = """
.
M
dM
MMr
4MMML .
MMMMM. xf
. "MMMMM .MM-
Mh.. +MMMMMM .MMMM
.MMM. .MMMMML. MMMMMh
)MMMh. MMMMMM MMMMMMM
3MMMMx. 'MMMMMMf xnMMMMMM"
'*MMMMM MMMMMM. nMMMMMMP"
*MMMMMx "MMMMM .MMMMMMM=
*MMMMMh "MMMMM" JMMMMMMP
MMMMMM 3MMMM. dMMMMMM .
MMMMMM "MMMM .MMMMM( .nnMP"
=.. *MMMMx MMM" dMMMM" .nnMMMMM*
"MMn... 'MMMMr 'MM MMM" .nMMMMMMM*"
"4MMMMnn.. *MMM MM MMP" .dMMMMMMM""
^MMMMMMMMx. *ML "M .M* .MMMMMM**"
*PMMMMMMhn. *x > M .MMMM**""
""**MMMMhx/.h/ .=*"
.3P"%....
nP" "*MMnx""";
LOGGER.info(weedAscii);
LOGGER.info("weed fabric mod");
LOGGER.info("by @fucksophie - est. Sept 11 2024");
PolymerResourcePackUtils.addModAssets(MOD_ID);
PolymerResourcePackUtils.markAsRequired();
PolymerItemGroupUtils.registerPolymerItemGroup(Identifier.of("weed"), group);
Weed.groupKey = PolymerItemGroupUtils.getKey(group);
WeedBlocks.register();
WeedItems.register();
}
}

View file

@ -0,0 +1,67 @@
package sad.ovh.weed;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.AbstractBlock.Settings;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.block.MapColor;
import net.minecraft.block.enums.NoteBlockInstrument;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier;
import sad.ovh.weed.block.RollingPaperBlock;
import sad.ovh.weed.block.TrayBlock;
import sad.ovh.weed.block.UVLampBlock;
import sad.ovh.weed.block.WeedSeedsBlock;
import sad.ovh.weed.block.items.RollingPaperBlockItem;
import sad.ovh.weed.block.items.TrayBlockItem;
import sad.ovh.weed.block.items.UVLampBlockItem;
import sad.ovh.weed.block.items.WeedSeedsBlockItem;
public class WeedBlocks {
public static Block ROLLING_PAPER_BLOCK;
public static Block TRAY_BLOCK;
public static Block UV_LAMP_BLOCK;
public static Block WEED_SEEDS_BLOCK;
public static BlockItem ROLLING_PAPER_ITEM;
public static BlockItem TRAY_ITEM;
public static BlockItem UV_LAMP_ITEM;
public static BlockItem WEED_SEEDS_ITEM;
public static void register() {
ROLLING_PAPER_BLOCK = Registry.register(Registries.BLOCK, Identifier.of(Weed.MOD_ID, "rolling_paper"),
new RollingPaperBlock(AbstractBlock.Settings.copy(Blocks.GLASS).nonOpaque()));
TRAY_BLOCK = Registry.register(Registries.BLOCK, Identifier.of(Weed.MOD_ID, "tray"),
new TrayBlock(AbstractBlock.Settings.copy(Blocks.GLASS).nonOpaque()));
UV_LAMP_BLOCK = Registry.register(Registries.BLOCK, Identifier.of(Weed.MOD_ID, "uv_lamp"),
new UVLampBlock(Settings.create().breakInstantly().mapColor(MapColor.LAPIS_BLUE)
.instrument(NoteBlockInstrument.IRON_XYLOPHONE)
.sounds(BlockSoundGroup.GLASS).luminance((state) -> {
return 15;
}).noCollision()
.pistonBehavior(PistonBehavior.DESTROY)));
WEED_SEEDS_BLOCK = Registry.register(Registries.BLOCK, Identifier.of(Weed.MOD_ID, "weed_seeds"),
new WeedSeedsBlock(AbstractBlock.Settings.copy(Blocks.WHEAT)));
ROLLING_PAPER_ITEM = Registry.register(Registries.ITEM, Identifier.of(Weed.MOD_ID, "rolling_paper"),
new RollingPaperBlockItem(new Item.Settings(), ROLLING_PAPER_BLOCK, "item/rolling_paper"));
TRAY_ITEM = Registry.register(Registries.ITEM, Identifier.of(Weed.MOD_ID, "tray"),
new TrayBlockItem(new Item.Settings(), TRAY_BLOCK, "item/tray"));
UV_LAMP_ITEM = Registry.register(Registries.ITEM, Identifier.of(Weed.MOD_ID, "uv_lamp"),
new UVLampBlockItem(new Item.Settings(), UV_LAMP_BLOCK, "item/uv_lamp"));
WEED_SEEDS_ITEM = Registry.register(Registries.ITEM, Identifier.of(Weed.MOD_ID, "weed_seeds"),
new WeedSeedsBlockItem(new Item.Settings(), WEED_SEEDS_BLOCK, "item/weed_seeds"));
ItemGroupEvents.modifyEntriesEvent(Weed.groupKey).register(content -> {
content.add(ROLLING_PAPER_ITEM);
content.add(TRAY_ITEM);
content.add(UV_LAMP_ITEM);
content.add(WEED_SEEDS_ITEM);
});
}
}

View file

@ -0,0 +1,51 @@
package sad.ovh.weed;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.component.type.FoodComponent;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.item.Item;
import net.minecraft.item.Item.Settings;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
import net.minecraft.util.Rarity;
import sad.ovh.weed.item.FilterItem;
import sad.ovh.weed.item.JointItem;
import sad.ovh.weed.item.WeedItem;
public class WeedItems {
public static Item FILTER;
public static Item JOINT;
public static Item WEED;
public static void register() {
FoodComponent JointFoodComponent = new FoodComponent.Builder()
.alwaysEdible()
.statusEffect(new StatusEffectInstance(StatusEffects.HUNGER, 10 * 20, 2, false, true, true), 100)
.statusEffect(new StatusEffectInstance(StatusEffects.NAUSEA, 60 * 20, 1, false, true, true), 75)
.statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 10 * 20, 1, false, true, true), 75)
.statusEffect(new StatusEffectInstance(StatusEffects.HASTE, 5 * 20, 3, false, true, true), 40)
.build();
FILTER = Registry.register(Registries.ITEM, Identifier.of(Weed.MOD_ID, "filter"),
new FilterItem(new Settings()));
JOINT = Registry.register(Registries.ITEM, Identifier.of(Weed.MOD_ID, "joint"),
new JointItem(new Settings()
.rarity(Rarity.EPIC)
.food(JointFoodComponent)));
WEED = Registry.register(Registries.ITEM, Identifier.of(Weed.MOD_ID, "weed"),
new WeedItem(new Settings()));
ItemGroupEvents.modifyEntriesEvent(Weed.groupKey).register(
content -> {
content.add(FILTER);
content.add(JOINT);
content.add(WEED);
});
}
}

View file

@ -0,0 +1,72 @@
package sad.ovh.weed.block;
import java.util.ArrayList;
import java.util.List;
import org.jetbrains.annotations.ApiStatus.OverrideOnly;
import eu.pb4.polymer.blocks.api.BlockModelType;
import eu.pb4.polymer.blocks.api.PolymerBlockModel;
import eu.pb4.polymer.blocks.api.PolymerBlockResourceUtils;
import eu.pb4.polymer.blocks.api.PolymerTexturedBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.IntProperty;
import net.minecraft.util.Hand;
import net.minecraft.util.Identifier;
import net.minecraft.util.ItemActionResult;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.GameMode;
import net.minecraft.world.World;
import sad.ovh.weed.Weed;
import sad.ovh.weed.WeedBlocks;
public class RollingPaperBlock extends Block implements PolymerTexturedBlock {
private final List<BlockState> polymerBlockState = new ArrayList<BlockState>();
public static final IntProperty PAPERS = IntProperty.of("papers", 1, 5);
public RollingPaperBlock(Settings settings) {
super(settings);
for (int i = 1; i <= 5; i++) {
this.polymerBlockState.add(PolymerBlockResourceUtils.requestBlock(BlockModelType.TRANSPARENT_BLOCK,
PolymerBlockModel.of(Identifier.of(Weed.MOD_ID, "block/papers_" + i))));
}
setDefaultState(getDefaultState().with(PAPERS, 1));
}
@OverrideOnly
protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos,
PlayerEntity player_fake,
Hand hand, BlockHitResult hit) {
ServerPlayerEntity player = (ServerPlayerEntity) player_fake;
if (stack.getItem().equals(WeedBlocks.ROLLING_PAPER_ITEM)) {
Integer papers = state.get(PAPERS);
Integer papersIfAdded = papers + 1;
if (papersIfAdded <= 5) {
world.setBlockState(pos, state.with(PAPERS, papersIfAdded));
if(player.interactionManager.getGameMode().equals(GameMode.SURVIVAL)) {
stack.decrement(1);
player.setStackInHand(hand, stack);
}
return ItemActionResult.SUCCESS;
}
}
return ItemActionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
}
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(PAPERS);
}
@Override
public BlockState getPolymerBlockState(BlockState state) {
return this.polymerBlockState.get(state.get(PAPERS) - 1);
}
}

View file

@ -0,0 +1,25 @@
package sad.ovh.weed.block;
import eu.pb4.polymer.blocks.api.BlockModelType;
import eu.pb4.polymer.blocks.api.PolymerBlockModel;
import eu.pb4.polymer.blocks.api.PolymerBlockResourceUtils;
import eu.pb4.polymer.blocks.api.PolymerTexturedBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
public class TrayBlock extends Block implements PolymerTexturedBlock {
private final BlockState polymerBlockState;
public TrayBlock(Settings settings) {
super(settings);
this.polymerBlockState = PolymerBlockResourceUtils.requestBlock(BlockModelType.TRANSPARENT_BLOCK,
PolymerBlockModel.of(Identifier.of(Weed.MOD_ID, "block/tray")));
}
@Override
public BlockState getPolymerBlockState(BlockState state) {
return this.polymerBlockState;
}
}

View file

@ -0,0 +1,51 @@
package sad.ovh.weed.block;
import eu.pb4.polymer.blocks.api.BlockModelType;
import eu.pb4.polymer.blocks.api.PolymerBlockModel;
import eu.pb4.polymer.blocks.api.PolymerBlockResourceUtils;
import eu.pb4.polymer.blocks.api.PolymerTexturedBlock;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.MapColor;
import net.minecraft.block.enums.NoteBlockInstrument;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
import sad.ovh.weed.block.items.UVLampBlockItem;
public class UVLampBlock extends Block implements PolymerTexturedBlock {
private final BlockState polymerBlockState;
public UVLampBlock(Settings settings) {
super(settings);
this.polymerBlockState = PolymerBlockResourceUtils.requestBlock(BlockModelType.TRANSPARENT_BLOCK,
PolymerBlockModel.of(Identifier.of(Weed.MOD_ID, "block/uv_lamp")));
}
@Override
public BlockState getPolymerBlockState(BlockState state) {
return this.polymerBlockState;
}
public static void register() {
Identifier modId = Identifier.of(Weed.MOD_ID, "uv_lamp");
var block = Registry.register(Registries.BLOCK, modId,
new UVLampBlock(Settings.create().breakInstantly().mapColor(MapColor.LAPIS_BLUE)
.instrument(NoteBlockInstrument.IRON_XYLOPHONE)
.sounds(BlockSoundGroup.GLASS).luminance((state) -> {
return 15;
}).noCollision()
.pistonBehavior(PistonBehavior.DESTROY)));
Item item = Registry.register(Registries.ITEM, modId,
new UVLampBlockItem(new Item.Settings(), block, "item/uv_lamp"));
ItemGroupEvents.modifyEntriesEvent(Weed.groupKey).register(content -> content.add(item));
}
}

View file

@ -0,0 +1,67 @@
package sad.ovh.weed.block;
import java.util.ArrayList;
import java.util.List;
import eu.pb4.polymer.blocks.api.BlockModelType;
import eu.pb4.polymer.blocks.api.PolymerBlockModel;
import eu.pb4.polymer.blocks.api.PolymerBlockResourceUtils;
import eu.pb4.polymer.blocks.api.PolymerTexturedBlock;
import net.minecraft.block.BlockState;
import net.minecraft.block.CropBlock;
import net.minecraft.item.ItemConvertible;
import net.minecraft.state.property.IntProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import sad.ovh.weed.Weed;
public class WeedSeedsBlock extends CropBlock implements PolymerTexturedBlock {
private final List<BlockState> polymerBlockState = new ArrayList<BlockState>();
public static final IntProperty AGE = Properties.AGE_1;
public WeedSeedsBlock(Settings settings) {
super(settings);
for (int i = 1; i <= 3; i++) {
this.polymerBlockState.add(PolymerBlockResourceUtils.requestBlock(BlockModelType.PLANT_BLOCK,
PolymerBlockModel.of(Identifier.of(Weed.MOD_ID, "block/weed_seeds_" + i))));
}
}
@Override
public void applyGrowth(World world, BlockPos pos, BlockState state) {
if (world.getBaseLightLevel(pos, 0) < 9)
return;
int i = this.getAge(state) + this.getGrowthAmount(world);
int j = this.getMaxAge();
if (i > j) {
i = j;
}
world.setBlockState(pos, this.withAge(i), 2);
}
@Override
public BlockState getPolymerBlockState(BlockState state) {
Integer fakeAge = this.getAge(state);
Integer realAge = 0;
switch (fakeAge) {
case 0, 1, 2:
realAge = 0;
break;
case 3, 4, 5:
realAge = 1;
break;
case 6, 7:
realAge = 2;
break;
}
return this.polymerBlockState.get(realAge);
}
@Override
protected ItemConvertible getSeedsItem() {
return this;
}
}

View file

@ -0,0 +1,35 @@
package sad.ovh.weed.block.items;
import org.jetbrains.annotations.Nullable;
import eu.pb4.polymer.core.api.item.PolymerItem;
import eu.pb4.polymer.resourcepack.api.PolymerModelData;
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
public class RollingPaperBlockItem extends BlockItem implements PolymerItem {
private final PolymerModelData polymerModel;
public RollingPaperBlockItem(Settings settings, Block block, String modelId) {
super(block, settings);
this.polymerModel = PolymerResourcePackUtils.requestModel(Items.PAPER,
Identifier.of(Weed.MOD_ID, "item/rolling_paper"));
}
@Override
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.item();
}
@Override
public int getPolymerCustomModelData(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.value();
}
}

View file

@ -0,0 +1,34 @@
package sad.ovh.weed.block.items;
import org.jetbrains.annotations.Nullable;
import eu.pb4.polymer.core.api.item.PolymerItem;
import eu.pb4.polymer.resourcepack.api.PolymerModelData;
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
public class TrayBlockItem extends BlockItem implements PolymerItem {
private final PolymerModelData polymerModel;
public TrayBlockItem(Settings settings, Block block, String modelId) {
super(block, settings);
this.polymerModel = PolymerResourcePackUtils.requestModel(Items.GLASS, Identifier.of(Weed.MOD_ID, "item/tray"));
}
@Override
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.item();
}
@Override
public int getPolymerCustomModelData(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.value();
}
}

View file

@ -0,0 +1,35 @@
package sad.ovh.weed.block.items;
import org.jetbrains.annotations.Nullable;
import eu.pb4.polymer.core.api.item.PolymerItem;
import eu.pb4.polymer.resourcepack.api.PolymerModelData;
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
public class UVLampBlockItem extends BlockItem implements PolymerItem {
private final PolymerModelData polymerModel;
public UVLampBlockItem(Settings settings, Block block, String modelId) {
super(block, settings);
this.polymerModel = PolymerResourcePackUtils.requestModel(Items.GLOWSTONE,
Identifier.of(Weed.MOD_ID, "item/uv_lamp"));
}
@Override
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.item();
}
@Override
public int getPolymerCustomModelData(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.value();
}
}

View file

@ -0,0 +1,35 @@
package sad.ovh.weed.block.items;
import org.jetbrains.annotations.Nullable;
import eu.pb4.polymer.core.api.item.PolymerItem;
import eu.pb4.polymer.resourcepack.api.PolymerModelData;
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
public class WeedSeedsBlockItem extends BlockItem implements PolymerItem {
private final PolymerModelData polymerModel;
public WeedSeedsBlockItem(Settings settings, Block block, String modelId) {
super(block, settings);
this.polymerModel = PolymerResourcePackUtils.requestModel(Items.WHEAT_SEEDS,
Identifier.of(Weed.MOD_ID, "item/weed_seeds"));
}
@Override
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.item();
}
@Override
public int getPolymerCustomModelData(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.value();
}
}

View file

@ -0,0 +1,33 @@
package sad.ovh.weed.item;
import org.jetbrains.annotations.Nullable;
import eu.pb4.polymer.core.api.item.PolymerItem;
import eu.pb4.polymer.resourcepack.api.PolymerModelData;
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
public class FilterItem extends Item implements PolymerItem {
private final PolymerModelData polymerModel;
public FilterItem(Settings settings) {
super(settings);
this.polymerModel = PolymerResourcePackUtils.requestModel(Items.BARRIER,
Identifier.of(Weed.MOD_ID, "item/filter"));
}
@Override
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.item();
}
@Override
public int getPolymerCustomModelData(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.value();
}
}

View file

@ -0,0 +1,33 @@
package sad.ovh.weed.item;
import org.jetbrains.annotations.Nullable;
import eu.pb4.polymer.core.api.item.PolymerItem;
import eu.pb4.polymer.resourcepack.api.PolymerModelData;
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
public class JointItem extends Item implements PolymerItem {
private final PolymerModelData polymerModel;
public JointItem(Settings settings) {
super(settings);
this.polymerModel = PolymerResourcePackUtils.requestModel(Items.BARRIER,
Identifier.of(Weed.MOD_ID, "item/joint"));
}
@Override
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.item();
}
@Override
public int getPolymerCustomModelData(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.value();
}
}

View file

@ -0,0 +1,33 @@
package sad.ovh.weed.item;
import org.jetbrains.annotations.Nullable;
import eu.pb4.polymer.core.api.item.PolymerItem;
import eu.pb4.polymer.resourcepack.api.PolymerModelData;
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import sad.ovh.weed.Weed;
public class WeedItem extends Item implements PolymerItem {
private final PolymerModelData polymerModel;
public WeedItem(Settings settings) {
super(settings);
this.polymerModel = PolymerResourcePackUtils.requestModel(Items.BARRIER,
Identifier.of(Weed.MOD_ID, "item/weed"));
}
@Override
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.item();
}
@Override
public int getPolymerCustomModelData(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
return this.polymerModel.value();
}
}

View file

@ -0,0 +1,9 @@
{
"item.weed.weed": "Weed",
"block.weed.weed_seeds": "Weed Seeds",
"block.weed.uv_lamp": "UV Grow Lamp",
"item.weed.joint": "Legendary J",
"item.weed.filter": "Filter",
"block.weed.tray": "Tray",
"block.weed.rolling_paper": "Rolling Paper"
}

View file

@ -0,0 +1,22 @@
{
"credit": "Made with Blockbench",
"textures": {
"0": "block/white_concrete",
"particle": "block/white_concrete"
},
"elements": [
{
"from": [2, 0, 12],
"to": [15, 1, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 13]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
}
]
}

View file

@ -0,0 +1,35 @@
{
"credit": "Made with Blockbench",
"textures": {
"0": "block/white_concrete",
"particle": "block/white_concrete"
},
"elements": [
{
"from": [2, 0, 12],
"to": [15, 1, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 13]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
},
{
"from": [12, 0, -2],
"to": [15, 1, 11],
"rotation": {"angle": 45, "axis": "y", "origin": [14, 0, 9]},
"faces": {
"north": {"uv": [0, 0, 3, 1], "texture": "#0"},
"east": {"uv": [0, 0, 13, 1], "texture": "#0"},
"south": {"uv": [0, 0, 3, 1], "texture": "#0"},
"west": {"uv": [0, 0, 13, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "rotation": 270, "texture": "#0"}
}
}
]
}

View file

@ -0,0 +1,48 @@
{
"credit": "Made with Blockbench",
"textures": {
"0": "block/white_concrete",
"particle": "block/white_concrete"
},
"elements": [
{
"from": [2, 0, 12],
"to": [15, 1, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 13]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
},
{
"from": [12, 0, -2],
"to": [15, 1, 11],
"rotation": {"angle": 45, "axis": "y", "origin": [14, 0, 9]},
"faces": {
"north": {"uv": [0, 0, 3, 1], "texture": "#0"},
"east": {"uv": [0, 0, 13, 1], "texture": "#0"},
"south": {"uv": [0, 0, 3, 1], "texture": "#0"},
"west": {"uv": [0, 0, 13, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "rotation": 270, "texture": "#0"}
}
},
{
"from": [-1, 1, 3],
"to": [12, 2, 6],
"rotation": {"angle": 45, "axis": "y", "origin": [10, 1, 4]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
}
]
}

View file

@ -0,0 +1,61 @@
{
"credit": "Made with Blockbench",
"textures": {
"0": "block/white_concrete",
"particle": "block/white_concrete"
},
"elements": [
{
"from": [2, 0, 12],
"to": [15, 1, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 13]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
},
{
"from": [12, 0, -2],
"to": [15, 1, 11],
"rotation": {"angle": 45, "axis": "y", "origin": [14, 0, 9]},
"faces": {
"north": {"uv": [0, 0, 3, 1], "texture": "#0"},
"east": {"uv": [0, 0, 13, 1], "texture": "#0"},
"south": {"uv": [0, 0, 3, 1], "texture": "#0"},
"west": {"uv": [0, 0, 13, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "rotation": 270, "texture": "#0"}
}
},
{
"from": [-1, 1, 3],
"to": [12, 2, 6],
"rotation": {"angle": 45, "axis": "y", "origin": [10, 1, 4]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
},
{
"from": [3, 1, 9],
"to": [16, 2, 12],
"rotation": {"angle": 22.5, "axis": "y", "origin": [14, 1, 10]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
}
]
}

View file

@ -0,0 +1,74 @@
{
"credit": "Made with Blockbench",
"textures": {
"0": "block/white_concrete",
"particle": "block/white_concrete"
},
"elements": [
{
"from": [2, 0, 12],
"to": [15, 1, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 13]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
},
{
"from": [12, 0, -2],
"to": [15, 1, 11],
"rotation": {"angle": 45, "axis": "y", "origin": [14, 0, 9]},
"faces": {
"north": {"uv": [0, 0, 3, 1], "texture": "#0"},
"east": {"uv": [0, 0, 13, 1], "texture": "#0"},
"south": {"uv": [0, 0, 3, 1], "texture": "#0"},
"west": {"uv": [0, 0, 13, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "rotation": 270, "texture": "#0"}
}
},
{
"from": [-1, 1, 3],
"to": [12, 2, 6],
"rotation": {"angle": 45, "axis": "y", "origin": [10, 1, 4]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
},
{
"from": [0, 4, 4],
"to": [13, 5, 7],
"rotation": {"angle": 22.5, "axis": "z", "origin": [11, 4, 5]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
},
{
"from": [3, 1, 9],
"to": [16, 2, 12],
"rotation": {"angle": 22.5, "axis": "y", "origin": [14, 1, 10]},
"faces": {
"north": {"uv": [0, 0, 13, 1], "texture": "#0"},
"east": {"uv": [0, 0, 3, 1], "texture": "#0"},
"south": {"uv": [0, 0, 13, 1], "texture": "#0"},
"west": {"uv": [0, 0, 3, 1], "texture": "#0"},
"up": {"uv": [0, 0, 13, 3], "texture": "#0"},
"down": {"uv": [0, 0, 13, 3], "texture": "#0"}
}
}
]
}

View file

@ -0,0 +1,300 @@
{
"credit": "Made with Blockbench",
"textures": {
"0": "block/green_concrete",
"1": "block/green_concrete_powder",
"3": "block/white_concrete",
"4": "block/lime_concrete_powder",
"7": "block/lime_concrete",
"particle": "block/green_concrete"
},
"elements": [
{
"from": [3, 0, 3],
"to": [13, 1, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 13]},
"faces": {
"north": {"uv": [0, 0, 10, 1], "texture": "#3"},
"east": {"uv": [0, 0, 10, 1], "texture": "#3"},
"south": {"uv": [0, 0, 10, 1], "texture": "#3"},
"west": {"uv": [0, 0, 10, 1], "texture": "#3"},
"up": {"uv": [0, 0, 10, 10], "texture": "#3"},
"down": {"uv": [0, 0, 10, 10], "texture": "#3"}
}
},
{
"from": [1, 2, 2],
"to": [2, 3, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 1, 1]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#3"},
"east": {"uv": [0, 0, 12, 1], "texture": "#3"},
"south": {"uv": [0, 0, 1, 1], "texture": "#3"},
"west": {"uv": [0, 0, 12, 1], "texture": "#3"},
"up": {"uv": [0, 0, 1, 12], "texture": "#3"},
"down": {"uv": [0, 0, 1, 12], "texture": "#3"}
}
},
{
"from": [13, 1, 2],
"to": [14, 2, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [12, 0, 1]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#3"},
"east": {"uv": [0, 0, 12, 1], "texture": "#3"},
"south": {"uv": [0, 0, 1, 1], "texture": "#3"},
"west": {"uv": [0, 0, 12, 1], "texture": "#3"},
"up": {"uv": [0, 0, 1, 12], "texture": "#3"},
"down": {"uv": [0, 0, 1, 12], "texture": "#3"}
}
},
{
"from": [2, 1, 2],
"to": [3, 2, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [1, 0, 1]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#3"},
"east": {"uv": [0, 0, 12, 1], "texture": "#3"},
"south": {"uv": [0, 0, 1, 1], "texture": "#3"},
"west": {"uv": [0, 0, 12, 1], "texture": "#3"},
"up": {"uv": [0, 0, 1, 12], "texture": "#3"},
"down": {"uv": [0, 0, 1, 12], "texture": "#3"}
}
},
{
"from": [2, 2, 14],
"to": [14, 3, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [3, 0, 1]},
"faces": {
"north": {"uv": [0, 0, 12, 1], "texture": "#3"},
"east": {"uv": [0, 0, 1, 1], "texture": "#3"},
"south": {"uv": [0, 0, 12, 1], "texture": "#3"},
"west": {"uv": [0, 0, 1, 1], "texture": "#3"},
"up": {"uv": [0, 0, 12, 1], "texture": "#3"},
"down": {"uv": [0, 0, 12, 1], "texture": "#3"}
}
},
{
"from": [2, 2, 1],
"to": [14, 3, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [3, 0, -12]},
"faces": {
"north": {"uv": [0, 0, 12, 1], "texture": "#3"},
"east": {"uv": [0, 0, 1, 1], "texture": "#3"},
"south": {"uv": [0, 0, 12, 1], "texture": "#3"},
"west": {"uv": [0, 0, 1, 1], "texture": "#3"},
"up": {"uv": [0, 0, 12, 1], "texture": "#3"},
"down": {"uv": [0, 0, 12, 1], "texture": "#3"}
}
},
{
"from": [14, 2, 2],
"to": [15, 3, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [3, 0, -2]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#3"},
"east": {"uv": [0, 0, 12, 1], "texture": "#3"},
"south": {"uv": [0, 0, 1, 1], "texture": "#3"},
"west": {"uv": [0, 0, 12, 1], "texture": "#3"},
"up": {"uv": [0, 0, 1, 12], "texture": "#3"},
"down": {"uv": [0, 0, 1, 12], "texture": "#3"}
}
},
{
"from": [3, 1, 13],
"to": [13, 2, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [3, -1, 0]},
"faces": {
"north": {"uv": [0, 0, 10, 1], "texture": "#3"},
"east": {"uv": [0, 0, 1, 1], "texture": "#3"},
"south": {"uv": [0, 0, 10, 1], "texture": "#3"},
"west": {"uv": [0, 0, 1, 1], "texture": "#3"},
"up": {"uv": [0, 0, 10, 1], "texture": "#3"},
"down": {"uv": [0, 0, 10, 1], "texture": "#3"}
}
},
{
"from": [3, 1, 2],
"to": [13, 2, 3],
"rotation": {"angle": 0, "axis": "y", "origin": [3, -1, -11]},
"faces": {
"north": {"uv": [0, 0, 10, 1], "texture": "#3"},
"east": {"uv": [0, 0, 1, 1], "texture": "#3"},
"south": {"uv": [0, 0, 10, 1], "texture": "#3"},
"west": {"uv": [0, 0, 1, 1], "texture": "#3"},
"up": {"uv": [0, 0, 10, 1], "texture": "#3"},
"down": {"uv": [0, 0, 10, 1], "texture": "#3"}
}
},
{
"from": [4, 2, 10],
"to": [5, 3, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [4, 2, 9]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
}
},
{
"from": [7, 2, 10],
"to": [9, 3, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 9]},
"faces": {
"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
"east": {"uv": [0, 0, 1, 1], "texture": "#1"},
"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
"west": {"uv": [0, 0, 1, 1], "texture": "#1"},
"up": {"uv": [0, 0, 2, 1], "texture": "#1"},
"down": {"uv": [0, 0, 2, 1], "texture": "#1"}
}
},
{
"from": [8, 2, 4],
"to": [9, 3, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 3]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#4"},
"east": {"uv": [0, 0, 1, 1], "texture": "#4"},
"south": {"uv": [0, 0, 1, 1], "texture": "#4"},
"west": {"uv": [0, 0, 1, 1], "texture": "#4"},
"up": {"uv": [0, 0, 1, 1], "texture": "#4"},
"down": {"uv": [0, 0, 1, 1], "texture": "#4"}
}
},
{
"from": [7, 2, 7],
"to": [9, 3, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 6]},
"faces": {
"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
"east": {"uv": [0, 0, 1, 1], "texture": "#1"},
"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
"west": {"uv": [0, 0, 1, 1], "texture": "#1"},
"up": {"uv": [0, 0, 2, 1], "texture": "#1"},
"down": {"uv": [0, 0, 2, 1], "texture": "#1"}
}
},
{
"from": [9, 2, 9],
"to": [11, 3, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]},
"faces": {
"north": {"uv": [0, 0, 2, 1], "texture": "#1"},
"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
"south": {"uv": [0, 0, 2, 1], "texture": "#1"},
"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
"up": {"uv": [0, 0, 2, 2], "texture": "#1"},
"down": {"uv": [0, 0, 2, 2], "texture": "#1"}
}
},
{
"from": [3, 2, 7],
"to": [5, 3, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [4, 2, 6]},
"faces": {
"north": {"uv": [0, 0, 2, 1], "texture": "#4"},
"east": {"uv": [0, 0, 1, 1], "texture": "#4"},
"south": {"uv": [0, 0, 2, 1], "texture": "#4"},
"west": {"uv": [0, 0, 1, 1], "texture": "#4"},
"up": {"uv": [0, 0, 2, 1], "texture": "#4"},
"down": {"uv": [0, 0, 2, 1], "texture": "#4"}
}
},
{
"from": [11, 2, 7],
"to": [12, 3, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [11, 2, 6]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
}
},
{
"from": [5, 2, 4],
"to": [7, 3, 6],
"rotation": {"angle": 0, "axis": "y", "origin": [4, 2, 3]},
"faces": {
"north": {"uv": [0, 0, 2, 1], "texture": "#7"},
"east": {"uv": [0, 0, 2, 1], "texture": "#7"},
"south": {"uv": [0, 0, 2, 1], "texture": "#7"},
"west": {"uv": [0, 0, 2, 1], "texture": "#7"},
"up": {"uv": [0, 0, 2, 2], "texture": "#7"},
"down": {"uv": [0, 0, 2, 2], "texture": "#7"}
}
},
{
"from": [10, 2, 3],
"to": [11, 3, 7],
"rotation": {"angle": 0, "axis": "y", "origin": [9, 2, 3]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#4"},
"east": {"uv": [0, 0, 4, 1], "texture": "#4"},
"south": {"uv": [0, 0, 1, 1], "texture": "#4"},
"west": {"uv": [0, 0, 4, 1], "texture": "#4"},
"up": {"uv": [0, 0, 1, 4], "texture": "#4"},
"down": {"uv": [0, 0, 1, 4], "texture": "#4"}
}
},
{
"from": [4, 2, 11],
"to": [6, 3, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [3, 2, 10]},
"faces": {
"north": {"uv": [0, 0, 2, 1], "texture": "#0"},
"east": {"uv": [0, 0, 2, 1], "texture": "#0"},
"south": {"uv": [0, 0, 2, 1], "texture": "#0"},
"west": {"uv": [0, 0, 2, 1], "texture": "#0"},
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
}
},
{
"from": [4, 2, 3],
"to": [5, 3, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [3, 2, 3]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#1"},
"east": {"uv": [0, 0, 2, 1], "texture": "#1"},
"south": {"uv": [0, 0, 1, 1], "texture": "#1"},
"west": {"uv": [0, 0, 2, 1], "texture": "#1"},
"up": {"uv": [0, 0, 1, 2], "texture": "#1"},
"down": {"uv": [0, 0, 1, 2], "texture": "#1"}
}
},
{
"from": [10, 2, 11],
"to": [12, 3, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [9, 2, 10]},
"faces": {
"north": {"uv": [0, 0, 2, 1], "texture": "#7"},
"east": {"uv": [0, 0, 1, 1], "texture": "#7"},
"south": {"uv": [0, 0, 2, 1], "texture": "#7"},
"west": {"uv": [0, 0, 1, 1], "texture": "#7"},
"up": {"uv": [0, 0, 2, 1], "texture": "#7"},
"down": {"uv": [0, 0, 2, 1], "texture": "#7"}
}
}
],
"groups": [
{
"name": "table",
"origin": [3, -1, -11],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8]
},
{
"name": "za",
"origin": [4, 2, 3],
"color": 0,
"children": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
}
]
}

View file

@ -0,0 +1,92 @@
{
"credit": "Made with Blockbench",
"textures": {
"0": "block/oak_log",
"2": "block/amethyst_block",
"3": "block/oak_log_top",
"particle": "block/oak_log"
},
"elements": [
{
"from": [12, 6, 7],
"to": [13, 7, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [12, 5, 7]},
"faces": {
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
"east": {"uv": [0, 0, 2, 1], "texture": "#0"},
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
"west": {"uv": [0, 0, 2, 1], "texture": "#0"},
"up": {"uv": [0, 0, 1, 2], "texture": "#0"},
"down": {"uv": [0, 0, 1, 2], "texture": "#0"}
}
},
{
"from": [13, 0, 7],
"to": [15, 7, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, -1]},
"faces": {
"north": {"uv": [0, 0, 2, 7], "texture": "#0"},
"east": {"uv": [0, 0, 2, 7], "texture": "#0"},
"south": {"uv": [0, 0, 2, 7], "texture": "#0"},
"west": {"uv": [0, 0, 2, 7], "texture": "#0"},
"up": {"uv": [0, 0, 2, 2], "texture": "#3"},
"down": {"uv": [0, 0, 2, 2], "texture": "#3"}
}
},
{
"from": [12, 7, 7],
"to": [14, 12, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [11, 7, -1]},
"faces": {
"north": {"uv": [0, 0, 2, 5], "texture": "#0"},
"east": {"uv": [0, 0, 2, 5], "texture": "#0"},
"south": {"uv": [0, 0, 2, 5], "texture": "#0"},
"west": {"uv": [0, 0, 2, 5], "texture": "#0"},
"up": {"uv": [0, 0, 2, 2], "texture": "#3"},
"down": {"uv": [0, 0, 2, 2], "texture": "#missing"}
}
},
{
"name": "Backboard",
"from": [-1, 13, 0],
"to": [13, 15, 17],
"rotation": {"angle": -22.5, "axis": "z", "origin": [7, 13, 5]},
"faces": {
"north": {"uv": [0, 0, 14, 2], "texture": "#0"},
"east": {"uv": [0, 0, 16, 2], "texture": "#0"},
"south": {"uv": [0, 0, 14, 2], "texture": "#0"},
"west": {"uv": [0, 0, 16, 2], "texture": "#0"},
"up": {"uv": [0, 0, 14, 16], "texture": "#0"},
"down": {"uv": [0, 0, 14, 16], "texture": "#0"}
}
},
{
"name": "Lights",
"from": [0, 11, 2],
"to": [10, 13, 15],
"rotation": {"angle": -22.5, "axis": "z", "origin": [10, 11, 7]},
"faces": {
"north": {"uv": [0, 0, 2, 10], "rotation": 90, "texture": "#2"},
"east": {"uv": [0, 0, 2, 13], "rotation": 270, "texture": "#2"},
"south": {"uv": [0, 0, 2, 10], "rotation": 270, "texture": "#2"},
"west": {"uv": [0, 0, 2, 13], "rotation": 270, "texture": "#2"},
"up": {"uv": [0, 0, 13, 10], "rotation": 270, "texture": "#2"},
"down": {"uv": [0, 0, 13, 10], "rotation": 270, "texture": "#2"}
}
}
],
"groups": [
{
"name": "Stik",
"origin": [11, 7, -1],
"color": 0,
"children": [0, 1, 2]
},
{
"name": "group",
"origin": [10, 11, 7],
"color": 0,
"children": [3, 4]
}
]
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/crop",
"textures": {
"crop": "weed:block/weed_seeds_1"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/crop",
"textures": {
"crop": "weed:block/weed_seeds_2"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/crop",
"textures": {
"crop": "weed:block/weed_seeds_3"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "weed:item/filter"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "weed:item/joint"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "weed:item/rolling_paper"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "weed:item/tray"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "weed:item/uv_lamp"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "weed:item/weed"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "weed:item/weed_seeds"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "weed:tray"
}
]
}
]
}

View file

@ -0,0 +1,72 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "weed:rolling_paper",
"functions": [
{
"function": "minecraft:set_count",
"count": 1,
"add": true,
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "weed:rolling_paper",
"properties": {
"papers": "2"
}
}
]
},
{
"function": "minecraft:set_count",
"count": 2,
"add": true,
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "weed:rolling_paper",
"properties": {
"papers": "3"
}
}
]
},
{
"function": "minecraft:set_count",
"count": 3,
"add": true,
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "weed:rolling_paper",
"properties": {
"papers": "4"
}
}
]
},
{
"function": "minecraft:set_count",
"count": 4,
"add": true,
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "weed:rolling_paper",
"properties": {
"papers": "5"
}
}
]
}
]
}
]
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "weed:tray"
}
]
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "weed:uv_lamp"
}
]
}
]
}

View file

@ -0,0 +1,68 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"name": "weed:weed",
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "weed:weed_seeds",
"properties": {
"age": "7"
}
}
]
},
{
"type": "minecraft:item",
"name": "weed:weed_seeds"
}
]
}
]
},
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "weed:weed_seeds",
"functions": [
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:binomial_with_bonus_count",
"parameters": {
"extra": 3,
"probability": 0.5714286
}
}
]
}
],
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "weed:weed_seeds",
"properties": {
"age": "7"
}
}
]
}
],
"functions": [
{
"function": "minecraft:explosion_decay"
}
]
}

View file

@ -0,0 +1,23 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"STS",
"TPT",
"STS"
],
"key": {
"P": {
"item": "minecraft:paper"
},
"S": {
"item": "minecraft:sugar_cane"
},
"T": {
"item": "minecraft:string"
}
},
"result": {
"id": "weed:filter",
"count": 1
}
}

View file

@ -0,0 +1,23 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"PPP",
"FWW",
"PPP"
],
"key": {
"P": {
"item": "minecraft:paper"
},
"F": {
"item": "weed:filter"
},
"W": {
"item": "weed:weed"
}
},
"result": {
"id": "weed:joint",
"count": 1
}
}

View file

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"PPP",
"PPP",
"PPP"
],
"key": {
"P": {
"item": "minecraft:paper"
}
},
"result": {
"id": "weed:rolling_paper",
"count": 3
}
}

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"GGG",
"GWG",
"GGG"
],
"key": {
"G": {
"item": "minecraft:glass"
},
"W": {
"item": "weed:weed"
}
},
"result": {
"id": "weed:tray",
"count": 1
}
}

View file

@ -0,0 +1,23 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"LEL",
"DDD",
"LEL"
],
"key": {
"D": {
"item": "minecraft:diamond"
},
"L": {
"item": "minecraft:lapis_block"
},
"E": {
"item": "minecraft:emerald"
}
},
"result": {
"id": "weed:uv_lamp",
"count": 1
}
}

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"CSC",
"SCS",
"CSC"
],
"key": {
"C": {
"item": "minecraft:sugar_cane"
},
"S": {
"item": "minecraft:torchflower_seeds"
}
},
"result": {
"id": "weed:weed_seeds",
"count": 2
}
}

View file

@ -0,0 +1,29 @@
{
"schemaVersion": 1,
"id": "weed",
"version": "${version}",
"name": "weed",
"description": "",
"authors": [],
"contact": {},
"license": "GPL-3.0",
"icon": "assets/weed/icon.png",
"environment": "server",
"entrypoints": {
"main": [
"sad.ovh.weed.Weed"
]
},
"mixins": [
"weed.mixins.json",
{
"config": "weed.client.mixins.json",
"environment": "client"
}
],
"depends": {
"fabricloader": ">=${loader_version}",
"fabric": "*",
"minecraft": "${minecraft_version}"
}
}

View file

@ -0,0 +1,11 @@
{
"required": true,
"minVersion": "0.8",
"package": "sad.ovh.weed.mixin",
"compatibilityLevel": "JAVA_21",
"mixins": [
],
"injectors": {
"defaultRequire": 1
}
}