Skip to content

Commit

Permalink
a bit less ugly
Browse files Browse the repository at this point in the history
  • Loading branch information
MehVahdJukaar committed Dec 9, 2024
1 parent 941df0d commit d6e99e1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
package net.mehvahdjukaar.every_compat.misc;


import net.fabricmc.api.Environment;
import net.mehvahdjukaar.moonlight.api.client.ICustomItemRendererProvider;
import net.mehvahdjukaar.moonlight.api.client.ItemStackRenderer;
import net.minecraft.world.item.Item;

public class AllWoodItem extends Item {
import java.util.function.Supplier;

public class AllWoodItem extends Item implements ICustomItemRendererProvider {

public AllWoodItem() {
super(new Properties());
}


@Environment(net.fabricmc.api.EnvType.CLIENT)
@Override
public Supplier<ItemStackRenderer> getRendererFactory() {
return WoodTypeCycleItemRenderer::new;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.List;

@Environment(net.fabricmc.api.EnvType.CLIENT)
public class BlockTypeCycleItemRenderer<T extends BlockType> extends ItemStackRenderer {
public abstract class BlockTypeCycleItemRenderer<T extends BlockType> extends ItemStackRenderer {

private final List<String> childKeys = new ArrayList<>();
private final List<T> moddedTypes = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package net.mehvahdjukaar.every_compat.misc;

import net.mehvahdjukaar.moonlight.api.set.wood.WoodType;

public class WoodTypeCycleItemRenderer extends BlockTypeCycleItemRenderer<WoodType> {
public WoodTypeCycleItemRenderer() {
super(WoodType.class);
}
}

This file was deleted.

1 change: 0 additions & 1 deletion common/src/main/resources/everycomp-common.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"package": "net.mehvahdjukaar.every_compat.mixins",
"compatibilityLevel": "JAVA_17",
"client": [
"DumbMixin"
],
"mixins": [
"LootTablesHackMixin"
Expand Down

0 comments on commit d6e99e1

Please sign in to comment.