mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Merge remote-tracking branch 'origin/mc1.20.1/feature-dev' into mc1.21.1/dev
This commit is contained in:
commit
c08725d02e
4 changed files with 20 additions and 8 deletions
|
@ -22,10 +22,14 @@ import net.minecraft.world.phys.BlockHitResult;
|
|||
import net.neoforged.neoforge.common.SpecialPlantable;
|
||||
|
||||
public class AllPotatoProjectileBlockHitActions {
|
||||
public static void init() {
|
||||
|
||||
static {
|
||||
register("plant_crop", PlantCrop.CODEC);
|
||||
register("place_block_on_ground", PlaceBlockOnGround.CODEC);
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
}
|
||||
|
||||
private static void register(String name, MapCodec<? extends PotatoProjectileBlockHitAction> codec) {
|
||||
Registry.register(CreateBuiltInRegistries.POTATO_PROJECTILE_BLOCK_HIT_ACTION, Create.asResource(name), codec);
|
||||
|
|
|
@ -46,7 +46,8 @@ import net.neoforged.neoforge.event.EventHooks;
|
|||
import net.neoforged.neoforge.event.entity.EntityTeleportEvent;
|
||||
|
||||
public class AllPotatoProjectileEntityHitActions {
|
||||
public static void init() {
|
||||
|
||||
static {
|
||||
register("set_on_fire", SetOnFire.CODEC);
|
||||
register("potion_effect", PotionEffect.CODEC);
|
||||
register("food_effects", FoodEffects.CODEC);
|
||||
|
@ -54,6 +55,9 @@ public class AllPotatoProjectileEntityHitActions {
|
|||
register("cure_zombie_villager", CureZombieVillager.CODEC);
|
||||
register("suspicious_stew", SuspiciousStew.CODEC);
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
}
|
||||
|
||||
private static void register(String name, MapCodec<? extends PotatoProjectileEntityHitAction> codec) {
|
||||
Registry.register(CreateBuiltInRegistries.POTATO_PROJECTILE_ENTITY_HIT_ACTION, Create.asResource(name), codec);
|
||||
|
|
|
@ -20,12 +20,16 @@ import net.neoforged.api.distmarker.Dist;
|
|||
import net.neoforged.api.distmarker.OnlyIn;
|
||||
|
||||
public class AllPotatoProjectileRenderModes {
|
||||
public static void init() {
|
||||
|
||||
static {
|
||||
register("billboard", Billboard.CODEC);
|
||||
register("tumble", Tumble.CODEC);
|
||||
register("toward_motion", TowardMotion.CODEC);
|
||||
register("stuck_to_entity", StuckToEntity.CODEC);
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
}
|
||||
|
||||
private static void register(String name, MapCodec<? extends PotatoProjectileRenderMode> codec) {
|
||||
Registry.register(CreateBuiltInRegistries.POTATO_PROJECTILE_RENDER_MODE, Create.asResource(name), codec);
|
||||
|
|
|
@ -18,9 +18,9 @@ import com.simibubi.create.content.logistics.item.filter.attribute.attributes.In
|
|||
import com.simibubi.create.content.logistics.item.filter.attribute.attributes.ItemNameAttribute;
|
||||
import com.simibubi.create.content.logistics.item.filter.attribute.attributes.ShulkerFillLevelAttribute;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
|
@ -33,8 +33,6 @@ import net.minecraft.world.item.enchantment.Enchantment;
|
|||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.ComposterBlock;
|
||||
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
|
||||
|
||||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.neoforge.capabilities.Capabilities;
|
||||
|
||||
// TODO - Documentation
|
||||
|
@ -75,7 +73,7 @@ public class AllItemAttributeTypes {
|
|||
BOOK_AUTHOR = register("book_author", new BookAuthorAttribute.Type()),
|
||||
BOOK_COPY = register("book_copy", new BookCopyAttribute.Type());
|
||||
|
||||
private static <T extends Recipe<SingleRecipeInput>> boolean testRecipe(ItemStack s, Level w, RecipeType<T> type) {
|
||||
private static <T extends Recipe<SingleRecipeInput>> boolean testRecipe(ItemStack s, Level w, RecipeType<T> type) {
|
||||
return w.getRecipeManager()
|
||||
.getRecipeFor(type, new SingleRecipeInput(s.copy()), w)
|
||||
.isPresent();
|
||||
|
@ -102,5 +100,7 @@ public class AllItemAttributeTypes {
|
|||
return Registry.register(CreateBuiltInRegistries.ITEM_ATTRIBUTE_TYPE, Create.asResource(id), type);
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
public static void init() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue