updated to 1.20.4 and took possession of the code
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
package io.github.cottonmc.templates;
|
||||
package fr.adrien1106.reframedtemplates;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import io.github.cottonmc.templates.block.TemplateBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateButtonBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateCandleBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateCarpetBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateDoorBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateEntity;
|
||||
import io.github.cottonmc.templates.block.TemplateFenceBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateFenceGateBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateLeverBlock;
|
||||
import io.github.cottonmc.templates.block.TemplatePaneBlock;
|
||||
import io.github.cottonmc.templates.block.TemplatePostBlock;
|
||||
import io.github.cottonmc.templates.block.TemplatePressurePlateBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateSlabBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateSlopeBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateStairsBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateTrapdoorBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateVerticalSlabBlock;
|
||||
import io.github.cottonmc.templates.block.TemplateWallBlock;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateButtonBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateCandleBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateCarpetBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateDoorBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateEntity;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateFenceBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateFenceGateBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateLeverBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplatePaneBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplatePostBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplatePressurePlateBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateSlabBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateSlopeBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateStairsBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateTrapdoorBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateVerticalSlabBlock;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateWallBlock;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
|
||||
@@ -48,6 +48,9 @@ import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* TODO handle random textures, handle grass side, multiple camos
|
||||
*/
|
||||
public class Templates implements ModInitializer {
|
||||
public static final String MODID = "templates";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.github.cottonmc.templates;
|
||||
package fr.adrien1106.reframedtemplates;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplatesClientApi;
|
||||
import io.github.cottonmc.templates.model.SlopeBaseMesh;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplatesClientApi;
|
||||
import fr.adrien1106.reframedtemplates.model.SlopeBaseMesh;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
||||
import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry;
|
||||
@@ -1,10 +1,10 @@
|
||||
package io.github.cottonmc.templates;
|
||||
package fr.adrien1106.reframedtemplates;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplatesClientApi;
|
||||
import io.github.cottonmc.templates.model.TemplateAppearanceManager;
|
||||
import io.github.cottonmc.templates.model.UnbakedAutoRetexturedModel;
|
||||
import io.github.cottonmc.templates.model.UnbakedJsonRetexturedModel;
|
||||
import io.github.cottonmc.templates.model.UnbakedMeshRetexturedModel;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplatesClientApi;
|
||||
import fr.adrien1106.reframedtemplates.model.TemplateAppearanceManager;
|
||||
import fr.adrien1106.reframedtemplates.model.UnbakedAutoRetexturedModel;
|
||||
import fr.adrien1106.reframedtemplates.model.UnbakedJsonRetexturedModel;
|
||||
import fr.adrien1106.reframedtemplates.model.UnbakedMeshRetexturedModel;
|
||||
import net.fabricmc.fabric.api.renderer.v1.Renderer;
|
||||
import net.fabricmc.fabric.api.renderer.v1.RendererAccess;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates;
|
||||
package fr.adrien1106.reframedtemplates;
|
||||
|
||||
import io.github.cottonmc.templates.model.TemplateAppearanceManager;
|
||||
import fr.adrien1106.reframedtemplates.model.TemplateAppearanceManager;
|
||||
import net.fabricmc.fabric.api.client.model.ModelProviderContext;
|
||||
import net.fabricmc.fabric.api.client.model.ModelResourceProvider;
|
||||
import net.fabricmc.fabric.api.client.model.ModelVariantProvider;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.api;
|
||||
package fr.adrien1106.reframedtemplates.api;
|
||||
|
||||
import io.github.cottonmc.templates.block.TemplateEntity;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateEntity;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
@@ -113,7 +113,7 @@ public class TemplateInteractionUtil {
|
||||
if(held.getItem() instanceof BlockItem bi && be.getThemeState().getBlock() == Blocks.AIR) {
|
||||
Block block = bi.getBlock();
|
||||
ItemPlacementContext ctx = new ItemPlacementContext(new ItemUsageContext(player, hand, hit));
|
||||
BlockState placementState = block.getPlacementState(ctx);
|
||||
BlockState placementState = block.getPlacementState(ctx); // TODO Smart
|
||||
if(placementState != null && Block.isShapeFullCube(placementState.getCollisionShape(world, pos)) && !(block instanceof BlockEntityProvider)) {
|
||||
if(!world.isClient) be.setRenderedState(placementState);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.api;
|
||||
package fr.adrien1106.reframedtemplates.api;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.github.cottonmc.templates.api;
|
||||
package fr.adrien1106.reframedtemplates.api;
|
||||
|
||||
import io.github.cottonmc.templates.TemplatesClient;
|
||||
import io.github.cottonmc.templates.model.TemplateAppearanceManager;
|
||||
import fr.adrien1106.reframedtemplates.model.TemplateAppearanceManager;
|
||||
import fr.adrien1106.reframedtemplates.TemplatesClient;
|
||||
import net.fabricmc.fabric.api.renderer.v1.Renderer;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.api;
|
||||
package fr.adrien1106.reframedtemplates.api;
|
||||
|
||||
import net.fabricmc.fabric.api.rendering.data.v1.RenderAttachmentBlockEntity;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockSetType;
|
||||
@@ -27,11 +27,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class TemplateButtonBlock extends ButtonBlock implements BlockEntityProvider {
|
||||
public TemplateButtonBlock(Settings settings) {
|
||||
this(settings, BlockSetType.OAK, 30, true);
|
||||
this(settings, BlockSetType.OAK, 30);
|
||||
}
|
||||
|
||||
public TemplateButtonBlock(Settings settings, BlockSetType blockSetType, int i, boolean bl) {
|
||||
super(settings, blockSetType, i, bl);
|
||||
public TemplateButtonBlock(Settings settings, BlockSetType blockSetType, int i) {
|
||||
super(blockSetType, i, settings);
|
||||
setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState()));
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockSetType;
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class TemplateDoorBlock extends DoorBlock implements BlockEntityProvider {
|
||||
public TemplateDoorBlock(Settings settings, BlockSetType blockSetType) {
|
||||
super(settings, blockSetType);
|
||||
super(blockSetType, settings);
|
||||
setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState()));
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import io.github.cottonmc.templates.api.ThemeableBlockEntity;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.api.ThemeableBlockEntity;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
@@ -18,9 +18,9 @@ import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Objects;
|
||||
|
||||
//Keeping the weight of this block entity down, both in terms of memory consumption and NBT sync traffic,
|
||||
@@ -80,7 +80,7 @@ public class TemplateEntity extends BlockEntity implements ThemeableBlockEntity
|
||||
if(bitfield != DEFAULT_BITFIELD) tag.putByte(BITFIELD_KEY, bitfield);
|
||||
}
|
||||
|
||||
public static @Nonnull BlockState readStateFromItem(ItemStack stack) {
|
||||
public static @NotNull BlockState readStateFromItem(ItemStack stack) {
|
||||
NbtCompound blockEntityTag = BlockItem.getBlockEntityNbt(stack);
|
||||
if(blockEntityTag == null) return Blocks.AIR.getDefaultState();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,9 +1,9 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtilExt;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtilExt;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class TemplateFenceGateBlock extends FenceGateBlock implements BlockEntityProvider, TemplateInteractionUtilExt {
|
||||
public TemplateFenceGateBlock(Settings settings, WoodType woodType) {
|
||||
super(settings, woodType);
|
||||
super(woodType, settings);
|
||||
setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState()));
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
@@ -1,14 +1,9 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockSetType;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.PressurePlateBlock;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
@@ -26,13 +21,13 @@ import net.minecraft.world.World;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class TemplatePressurePlateBlock extends PressurePlateBlock implements BlockEntityProvider {
|
||||
public TemplatePressurePlateBlock(ActivationRule activationRule, Settings settings, BlockSetType blockSetType) {
|
||||
super(activationRule, settings, blockSetType);
|
||||
public TemplatePressurePlateBlock(Settings settings, BlockSetType blockSetType) {
|
||||
super(blockSetType, settings);
|
||||
setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState()));
|
||||
}
|
||||
|
||||
public TemplatePressurePlateBlock(Settings settings) {
|
||||
this(ActivationRule.EVERYTHING, settings, BlockSetType.OAK);
|
||||
this(settings, BlockSetType.OAK);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,9 +1,9 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import io.github.cottonmc.templates.util.Edge;
|
||||
import io.github.cottonmc.templates.util.StairShapeMaker;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.util.Edge;
|
||||
import fr.adrien1106.reframedtemplates.util.StairShapeMaker;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
@@ -13,8 +13,7 @@ import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class TemplateSlopeBlock extends WaterloggableTemplateBlock {
|
||||
public static final EnumProperty<Edge> EDGE = EnumProperty.of("edge", Edge.class);
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,9 +1,9 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtilExt;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtilExt;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockSetType;
|
||||
@@ -27,8 +27,8 @@ import net.minecraft.world.World;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class TemplateTrapdoorBlock extends TrapdoorBlock implements BlockEntityProvider, TemplateInteractionUtilExt {
|
||||
public TemplateTrapdoorBlock(Settings settings, BlockSetType blah) {
|
||||
super(settings, blah);
|
||||
public TemplateTrapdoorBlock(Settings settings, BlockSetType woodType) {
|
||||
super(woodType, settings);
|
||||
setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState()));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
@@ -1,9 +1,9 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplateInteractionUtil;
|
||||
import io.github.cottonmc.templates.mixin.WallBlockAccessor;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil;
|
||||
import fr.adrien1106.reframedtemplates.mixin.WallBlockAccessor;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockEntityProvider;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.block;
|
||||
package fr.adrien1106.reframedtemplates.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.mixin;
|
||||
package fr.adrien1106.reframedtemplates.mixin;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.color.item.ItemColors;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.mixin;
|
||||
package fr.adrien1106.reframedtemplates.mixin;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.WallBlock;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.mixin.particles;
|
||||
package fr.adrien1106.reframedtemplates.mixin.particles;
|
||||
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.mixin.particles;
|
||||
package fr.adrien1106.reframedtemplates.mixin.particles;
|
||||
|
||||
import net.minecraft.client.particle.SpriteBillboardParticle;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.mixin.particles;
|
||||
package fr.adrien1106.reframedtemplates.mixin.particles;
|
||||
|
||||
import io.github.cottonmc.templates.api.ThemeableBlockEntity;
|
||||
import fr.adrien1106.reframedtemplates.api.ThemeableBlockEntity;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.particle.BlockDustParticle;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.mixin.particles;
|
||||
package fr.adrien1106.reframedtemplates.mixin.particles;
|
||||
|
||||
import io.github.cottonmc.templates.api.ThemeableBlockEntity;
|
||||
import fr.adrien1106.reframedtemplates.api.ThemeableBlockEntity;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.mixin.particles;
|
||||
package fr.adrien1106.reframedtemplates.mixin.particles;
|
||||
|
||||
import io.github.cottonmc.templates.api.ThemeableBlockEntity;
|
||||
import fr.adrien1106.reframedtemplates.api.ThemeableBlockEntity;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplatesClientApi;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplatesClientApi;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.MeshBuilder;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadView;
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import io.github.cottonmc.templates.block.TemplateEntity;
|
||||
import io.github.cottonmc.templates.mixin.MinecraftAccessor;
|
||||
import fr.adrien1106.reframedtemplates.block.TemplateEntity;
|
||||
import fr.adrien1106.reframedtemplates.mixin.MinecraftAccessor;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
|
||||
import net.fabricmc.fabric.api.renderer.v1.model.ForwardingBakedModel;
|
||||
@@ -26,7 +26,7 @@ import java.util.function.Supplier;
|
||||
|
||||
public abstract class RetexturingBakedModel extends ForwardingBakedModel {
|
||||
public RetexturingBakedModel(BakedModel baseModel, TemplateAppearanceManager tam, ModelBakeSettings settings, BlockState itemModelState, boolean ao) {
|
||||
this.wrapped = baseModel; //field from the superclass; vanilla getQuads etc will delegate through to this
|
||||
this.wrapped = baseModel; //field from the superclass; vanilla getQuads etc. will delegate through to this
|
||||
|
||||
this.tam = tam;
|
||||
this.facePermutation = MeshTransformUtil.facePermutation(settings);
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplatesClientApi;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplatesClientApi;
|
||||
import net.fabricmc.fabric.api.renderer.v1.Renderer;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.MeshBuilder;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import net.fabricmc.fabric.api.renderer.v1.material.RenderMaterial;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplatesClientApi;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplatesClientApi;
|
||||
import net.fabricmc.fabric.api.renderer.v1.Renderer;
|
||||
import net.fabricmc.fabric.api.renderer.v1.material.BlendMode;
|
||||
import net.fabricmc.fabric.api.renderer.v1.material.MaterialFinder;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplatesClientApi;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplatesClientApi;
|
||||
import net.fabricmc.fabric.api.renderer.v1.Renderer;
|
||||
import net.fabricmc.fabric.api.renderer.v1.material.RenderMaterial;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import io.github.cottonmc.templates.Templates;
|
||||
import io.github.cottonmc.templates.api.TemplatesClientApi;
|
||||
import fr.adrien1106.reframedtemplates.Templates;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplatesClientApi;
|
||||
import net.fabricmc.fabric.api.renderer.v1.Renderer;
|
||||
import net.fabricmc.fabric.api.renderer.v1.material.RenderMaterial;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.github.cottonmc.templates.model;
|
||||
package fr.adrien1106.reframedtemplates.model;
|
||||
|
||||
import io.github.cottonmc.templates.api.TemplatesClientApi;
|
||||
import fr.adrien1106.reframedtemplates.api.TemplatesClientApi;
|
||||
import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.util;
|
||||
package fr.adrien1106.reframedtemplates.util;
|
||||
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.util.StringIdentifiable;
|
||||
@@ -1,4 +1,4 @@
|
||||
package io.github.cottonmc.templates.util;
|
||||
package fr.adrien1106.reframedtemplates.util;
|
||||
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
Reference in New Issue
Block a user