Updated mappings

This commit is contained in:
alesto
2018-11-22 16:02:40 +01:00
parent 5737109dec
commit 151dcc06da
14 changed files with 30 additions and 20 deletions
+12 -2
View File
@@ -1,5 +1,7 @@
buildscript { buildscript {
repositories { repositories {
mavenCentral()
mavenLocal()
jcenter() jcenter()
maven { url = "http://files.minecraftforge.net/maven" } maven { url = "http://files.minecraftforge.net/maven" }
} }
@@ -8,6 +10,7 @@ buildscript {
} }
} }
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
@@ -29,10 +32,16 @@ minecraft {
// stable_# stables are built at the discretion of the MCP team. // stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work. // Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace. // simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20180316" mappings = "stable_39"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
} }
repositories {
mavenLocal()
mavenCentral()
maven { url = "http://maven.bluexin.be/repository/snapshots/" }
}
dependencies { dependencies {
// you may put jars on which you depend on in ./libs // you may put jars on which you depend on in ./libs
// or you may define them like so.. // or you may define them like so..
@@ -54,7 +63,8 @@ dependencies {
// for more info... // for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html // http://www.gradle.org/docs/current/userguide/dependency_management.html
deobfCompile ("com.teamwizardry.librarianlib:librarianlib-particle-system-1.12.2:4.16-SNAPSHOT:deobf") {changing = true}
deobfCompile "com.teamwizardry:wizardry:0.9.7"
} }
processResources { processResources {
@@ -179,11 +179,11 @@ public class Wizardry {
public static void onMissingMappingEvent(RegistryEvent.MissingMappings<Item> event){ public static void onMissingMappingEvent(RegistryEvent.MissingMappings<Item> event){
// Just get, not getAll, since the mod id didn't change! // Just get, not getAll, since the mod id didn't change!
for(RegistryEvent.MissingMappings.Mapping<Item> mapping : event.getAllMappings()){ for(RegistryEvent.MissingMappings.Mapping<Item> mapping : event.getAllMappings()){
if(mapping.key.getResourceDomain().equals(Wizardry.MODID)){ if(mapping.key.getNamespace().equals(Wizardry.MODID)){
Item replacement = null; Item replacement = null;
switch(mapping.key.getResourcePath()){ switch(mapping.key.getPath()){
case "wand_basic": replacement = WizardryItems.magic_wand; break; case "wand_basic": replacement = WizardryItems.magic_wand; break;
case "wand_basic_fire": replacement = WizardryItems.basic_fire_wand; break; case "wand_basic_fire": replacement = WizardryItems.basic_fire_wand; break;
@@ -175,7 +175,7 @@ public class WizardryWorldGenerator implements IWorldGenerator {
} }
// 0 = West, 1 = North, 2 = East, 3 = South (The way you would face when walking out of the door) // 0 = West, 1 = North, 2 = East, 3 = South (The way you would face when walking out of the door)
EnumFacing orientation = EnumFacing.getHorizontal(random.nextInt(4)); EnumFacing orientation = EnumFacing.byHorizontalIndex(random.nextInt(4));
boolean flip = random.nextBoolean(); boolean flip = random.nextBoolean();
if(checkSpaceForTower(world, origin, towerBlueprint, orientation, flip)){ if(checkSpaceForTower(world, origin, towerBlueprint, orientation, flip)){
@@ -299,7 +299,7 @@ public class WizardryWorldGenerator implements IWorldGenerator {
// Rotates the door depending on whether flip is true. // Rotates the door depending on whether flip is true.
ItemDoor.placeDoor( ItemDoor.placeDoor(
world, pos, flip world, pos, flip
? EnumFacing.getHorizontal(3 - orientation.getHorizontalIndex()) ? EnumFacing.byHorizontalIndex(3 - orientation.getHorizontalIndex())
.getOpposite() .getOpposite()
: orientation.rotateYCCW(), : orientation.rotateYCCW(),
Blocks.OAK_DOOR, false); Blocks.OAK_DOOR, false);
@@ -51,7 +51,7 @@ public class BlockSnare extends BlockContainer {
} }
@Override @Override
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity){ public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity entity){
if(!world.isRemote && entity instanceof EntityLivingBase){ if(!world.isRemote && entity instanceof EntityLivingBase){
if(world.getTileEntity(pos) instanceof TileEntityPlayerSave){ if(world.getTileEntity(pos) instanceof TileEntityPlayerSave){
@@ -80,7 +80,7 @@ public class BlockSnare extends BlockContainer {
} }
@Override @Override
public BlockRenderLayer getBlockLayer(){ public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT; return BlockRenderLayer.CUTOUT;
} }
@@ -36,7 +36,7 @@ public class BlockSpectral extends BlockContainer {
// Replaces getRenderBlockPass // Replaces getRenderBlockPass
@Override @Override
public BlockRenderLayer getBlockLayer(){ public BlockRenderLayer getRenderLayer(){
return BlockRenderLayer.TRANSLUCENT; return BlockRenderLayer.TRANSLUCENT;
} }
@@ -97,7 +97,7 @@ public class BlockStatue extends BlockContainer {
} }
@Override @Override
public BlockRenderLayer getBlockLayer(){ public BlockRenderLayer getRenderLayer(){
return this.isIce ? BlockRenderLayer.TRANSLUCENT : BlockRenderLayer.SOLID; return this.isIce ? BlockRenderLayer.TRANSLUCENT : BlockRenderLayer.SOLID;
} }
@@ -55,7 +55,7 @@ public class BlockVanishingCobweb extends BlockContainer {
} }
@Override @Override
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity){ public void onEntityCollision(World world, BlockPos pos, IBlockState state, Entity entity){
entity.setInWeb(); entity.setInWeb();
} }
@@ -95,7 +95,7 @@ public interface Imbuement {
})){ })){
// If any imbuements were removed, inform about the removal of the enchantment(s), or // If any imbuements were removed, inform about the removal of the enchantment(s), or
// delete the book entirely if there are none left. // delete the book entirely if there are none left.
if(enchantmentList.hasNoTags()){ if(enchantmentList.isEmpty()){
slot.putStack(ItemStack.EMPTY); // NOTE: Will need changing in 1.11 slot.putStack(ItemStack.EMPTY); // NOTE: Will need changing in 1.11
Wizardry.logger.info("Deleted enchanted book with illegal enchantments"); Wizardry.logger.info("Deleted enchanted book with illegal enchantments");
}else{ }else{
@@ -434,7 +434,7 @@ public abstract class EntityMagicArrow extends Entity implements IProjectile, IE
this.onBlockHit(); this.onBlockHit();
if(this.stuckInBlock.getMaterial() != Material.AIR){ if(this.stuckInBlock.getMaterial() != Material.AIR){
this.stuckInBlock.getBlock().onEntityCollidedWithBlock(this.world, raytraceresult.getBlockPos(), this.stuckInBlock.getBlock().onEntityCollision(this.world, raytraceresult.getBlockPos(),
this.stuckInBlock, this); this.stuckInBlock, this);
} }
} }
@@ -70,7 +70,7 @@ public final class WizardryBlocks {
*/ */
public static void registerBlock(IForgeRegistry<Block> registry, Block block, String name){ public static void registerBlock(IForgeRegistry<Block> registry, Block block, String name){
block.setRegistryName(Wizardry.MODID, name); block.setRegistryName(Wizardry.MODID, name);
block.setUnlocalizedName(block.getRegistryName().toString()); block.setTranslationKey(block.getRegistryName().toString());
registry.register(block); registry.register(block);
} }
@@ -271,7 +271,7 @@ public final class WizardryItems {
*/ */
public static void registerItem(IForgeRegistry<Item> registry, Item item, String name){ public static void registerItem(IForgeRegistry<Item> registry, Item item, String name){
item.setRegistryName(Wizardry.MODID, name); item.setRegistryName(Wizardry.MODID, name);
item.setUnlocalizedName(item.getRegistryName().toString()); item.setTranslationKey(item.getRegistryName().toString());
registry.register(item); registry.register(item);
} }
@@ -31,7 +31,7 @@ public final class WizardryTabs {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public ItemStack getTabIconItem(){ public ItemStack createIcon(){
return new ItemStack(WizardryItems.wizard_handbook); return new ItemStack(WizardryItems.wizard_handbook);
} }
@@ -47,7 +47,7 @@ public final class WizardryTabs {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public ItemStack getTabIconItem(){ public ItemStack createIcon(){
return new ItemStack(WizardryItems.spell_book); return new ItemStack(WizardryItems.spell_book);
} }
@@ -399,7 +399,7 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
*/ */
public static Spell get(String name){ public static Spell get(String name){
ResourceLocation key = new ResourceLocation(name); ResourceLocation key = new ResourceLocation(name);
if(key.getResourceDomain().equals("minecraft")) key = new ResourceLocation(Wizardry.MODID, name); if(key.getNamespace().equals("minecraft")) key = new ResourceLocation(Wizardry.MODID, name);
return ((ForgeRegistry<Spell>)registry).getValue(key); return ((ForgeRegistry<Spell>)registry).getValue(key);
} }
@@ -540,7 +540,7 @@ public final class WizardryUtilities {
Vec3d start = new Vec3d(entity.posX, entity.getEntityBoundingBox().minY + entity.getEyeHeight(), entity.posZ); Vec3d start = new Vec3d(entity.posX, entity.getEntityBoundingBox().minY + entity.getEyeHeight(), entity.posZ);
Vec3d look = entity.getLookVec(); Vec3d look = entity.getLookVec();
Vec3d end = start.addVector(look.x * range, look.y * range, look.z * range); Vec3d end = start.add(look.x * range, look.y * range, look.z * range);
return world.rayTraceBlocks(start, end, hitLiquids); return world.rayTraceBlocks(start, end, hitLiquids);
} }
@@ -893,7 +893,7 @@ public final class WizardryUtilities {
// The original tag list should remain unchanged, hence the copy. // The original tag list should remain unchanged, hence the copy.
NBTTagList tagList2 = (NBTTagList)tagList.copy(); NBTTagList tagList2 = (NBTTagList)tagList.copy();
while(!tagList2.hasNoTags()){ while(!tagList2.isEmpty()){
NBTBase tag = tagList2.removeTag(0); NBTBase tag = tagList2.removeTag(0);
// Why oh why is NBTTagList not parametrised? It even has a tagType field, so it must know! // Why oh why is NBTTagList not parametrised? It even has a tagType field, so it must know!
try{ try{