Skip to content

Commit

Permalink
Remap sources using Mercury
Browse files Browse the repository at this point in the history
Mojmap 1.20.1 -> 1.7.10 userdev MCP

Using Intermediary and Calamus to map between versions
  • Loading branch information
makamys committed Mar 6, 2024
1 parent 937c43b commit bd69744
Show file tree
Hide file tree
Showing 19 changed files with 176 additions and 186 deletions.
11 changes: 5 additions & 6 deletions src/main/java/io/github/unix_supremacist/Alchemist.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.ResourceLocation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Alchemist {
public static final String MODID = "alchemist";
public static final Logger LOGGER = LoggerFactory.getLogger(MODID);
public static final ResourceLocation empower_packet = new ResourceLocation(Alchemist.MODID, "empower_packet");
public static final CreativeModeTab tab = FabricItemGroup.builder()
public static final CreativeTabs tab = FabricItemGroup.builder()
.icon(() -> new ItemStack(AlchemistItems.philosophers_stone.getItem()))
.title(Component.translatable("itemGroup."+MODID))
.title(IChatComponent.translatable("itemGroup."+MODID))
.build();


Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package io.github.unix_supremacist.block;

import io.github.unix_supremacist.interfaces.TransmuteEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.npc.Villager;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.World;
import net.minecraft.world.level.BlockGetter;
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.phys.AABB;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
Expand All @@ -25,12 +25,12 @@ public TransmutionCircleBlock(Properties properties) {
}

@Override
public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
public InteractionResult use(BlockState state, World level, ChunkCoordinates pos, EntityPlayer player, InteractionHand hand, BlockHitResult hit) {
if (!level.isClientSide()) {
AABB aABB = new AABB(pos);
List<Villager> villagerList = level.getEntitiesOfClass(Villager.class, aABB);
AxisAlignedBB aABB = new AxisAlignedBB(pos);
List<EntityVillager> villagerList = level.getEntitiesOfClass(EntityVillager.class, aABB);
if(!villagerList.isEmpty()){
level.setBlock(pos, Blocks.AIR.defaultBlockState(), 3);
level.setBlock(pos, Blocks.air.defaultBlockState(), 3);
return transmuteEntity(villagerList.get(0), level);
}
}
Expand All @@ -39,17 +39,17 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player
}

@Override
public VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
public VoxelShape getShape(BlockState state, BlockGetter level, ChunkCoordinates pos, CollisionContext context) {
return Shapes.box(0f, 0f, 0f, 1f, 0.02f, 1f);
}

@Override
public VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
public VoxelShape getCollisionShape(BlockState blockState, BlockGetter blockGetter, ChunkCoordinates blockPos, CollisionContext collisionContext) {
return Shapes.empty();
}

@Override
public VoxelShape getOcclusionShape(BlockState state, BlockGetter level, BlockPos pos) {
public VoxelShape getOcclusionShape(BlockState state, BlockGetter level, ChunkCoordinates pos) {
return Shapes.empty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import io.github.unix_supremacist.block.TransmutionCircleBlock;
import lombok.Getter;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.Block;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
import net.minecraft.util.ResourceLocation;

public enum AlchemistBlocks {
transmutation_circle(new TransmutionCircleBlock(FabricBlockSettings.create()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import net.fabricmc.fabric.api.registry.FuelRegistry;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.Item.Properties;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Item.Properties;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.item.Tiers;
import net.minecraft.world.level.block.Blocks;

public enum AlchemistItems {
alchemical_coal(25600),
Expand Down
27 changes: 13 additions & 14 deletions src/main/java/io/github/unix_supremacist/data/BlockTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
import io.github.unix_supremacist.Alchemist;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.block.Block;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.init.Blocks;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;

import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.concurrent.CompletableFuture;
Expand Down Expand Up @@ -48,16 +47,16 @@ public static void init(){
protected void addTags(HolderLookup.Provider arg) {
FabricTagBuilder terra = getOrCreateTagBuilder(terratag);
terra.add(Blocks.GRASS_BLOCK);
terra.add(Blocks.DIRT);
terra.add(Blocks.dirt);
terra.add(Blocks.COARSE_DIRT);
terra.add(Blocks.COBBLESTONE);
terra.add(Blocks.MOSSY_COBBLESTONE);
terra.add(Blocks.cobblestone);
terra.add(Blocks.mossy_cobblestone);
terra.add(Blocks.COBBLED_DEEPSLATE);
terra.add(Blocks.STONE);
terra.add(Blocks.stone);
terra.add(Blocks.DEEPSLATE);
terra.add(Blocks.SAND);
terra.add(Blocks.sand);
terra.add(Blocks.RED_SAND);
terra.add(Blocks.GRAVEL);
terra.add(Blocks.gravel);

FabricTagBuilder wood = getOrCreateTagBuilder(woodtag);
wood.add(Blocks.OAK_LOG);
Expand Down Expand Up @@ -107,16 +106,16 @@ protected void addTags(HolderLookup.Provider arg) {
stone.add(Blocks.ANDESITE);
stone.add(Blocks.DIORITE);
stone.add(Blocks.GRANITE);
stone.add(Blocks.SANDSTONE);
stone.add(Blocks.sandstone);
stone.add(Blocks.RED_SANDSTONE);
stone.add(Blocks.CLAY);
stone.add(Blocks.clay);

FabricTagBuilder obsidian = getOrCreateTagBuilder(obsidiantag);
obsidian.add(Blocks.OBSIDIAN);
obsidian.add(Blocks.obsidian);
obsidian.add(Blocks.CRYING_OBSIDIAN);

FabricTagBuilder stonebricks = getOrCreateTagBuilder(stonebrickstag);
stonebricks.add(Blocks.STONE_BRICKS);
stonebricks.add(Blocks.stonebrick);
stonebricks.add(Blocks.MOSSY_STONE_BRICKS);
}

Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/github/unix_supremacist/data/ItemTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;

import net.minecraft.util.ResourceLocation;
import java.util.concurrent.CompletableFuture;

import static io.github.unix_supremacist.content.AlchemistItems.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import net.fabricmc.fabric.api.datagen.v1.provider.FabricLanguageProvider;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.ResourceLocation;
import org.apache.commons.lang3.text.WordUtils;


Expand Down
Loading

0 comments on commit bd69744

Please sign in to comment.