Bump Forge version

This commit is contained in:
SquidDev 2019-07-21 09:41:58 +01:00
parent acfb72246c
commit ccd85eb055
20 changed files with 22 additions and 82 deletions

View File

@ -9,7 +9,7 @@
}
dependencies {
classpath 'com.google.code.gson:gson:2.8.1'
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.128'
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.130'
classpath 'net.sf.proguard:proguard-gradle:6.1.0beta2'
classpath 'org.ajoberstar.grgit:grgit-gradle:3.0.0'
}
@ -127,7 +127,7 @@ accessTransformer file('src/main/resources/META-INF/accesstransformer.cfg')
manifest {
attributes(["Specification-Title": "computercraft",
"Specification-Vendor": "SquidDev",
"Specification-Version": "26.0",
"Specification-Version": "1",
"Implementation-Title": "CC: Tweaked",
"Implementation-Version": "${mod_version}",
"Implementation-Vendor" :"SquidDev",

View File

@ -2,6 +2,6 @@
mod_version=1.83.1
# Minecraft properties
mc_version=1.14.3
forge_version=27.0.3
mappings_version=20190626-1.14.3
mc_version=1.14.4
forge_version=28.0.11
mappings_version=20190721-1.14.3

View File

@ -15,7 +15,6 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceResult;
@ -39,7 +38,7 @@ private CableHighlightRenderer()
* Draw an outline for a specific part of a cable "Multipart".
*
* @param event The event to observe
* @see WorldRenderer#drawSelectionBox(PlayerEntity, RayTraceResult, int, float)
* @see WorldRenderer#drawSelectionBox(ActiveRenderInfo, RayTraceResult, int)
*/
@SubscribeEvent
public static void drawHighlight( DrawBlockHighlightEvent event )
@ -48,7 +47,7 @@ public static void drawHighlight( DrawBlockHighlightEvent event )
BlockRayTraceResult hit = (BlockRayTraceResult) event.getTarget();
BlockPos pos = hit.getPos();
World world = event.getInfo().func_216773_g().getEntityWorld();
World world = event.getInfo().getRenderViewEntity().getEntityWorld();
ActiveRenderInfo info = event.getInfo();
BlockState state = world.getBlockState( pos );

View File

@ -42,12 +42,12 @@ private MonitorHighlightRenderer()
@SubscribeEvent
public static void drawHighlight( DrawBlockHighlightEvent event )
{
if( event.getTarget().getType() != RayTraceResult.Type.BLOCK || event.getInfo().func_216773_g().isSneaking() )
if( event.getTarget().getType() != RayTraceResult.Type.BLOCK || event.getInfo().getRenderViewEntity().isSneaking() )
{
return;
}
World world = event.getInfo().func_216773_g().getEntityWorld();
World world = event.getInfo().getRenderViewEntity().getEntityWorld();
BlockPos pos = ((BlockRayTraceResult) event.getTarget()).getPos();
TileEntity tile = world.getTileEntity( pos );

View File

@ -119,6 +119,7 @@ public boolean isBuiltInRenderer()
@Nonnull
@Override
@Deprecated
public TextureAtlasSprite getParticleTexture()
{
return m_baseModel.getParticleTexture();

View File

@ -202,6 +202,7 @@ public boolean isBuiltInRenderer()
@Nonnull
@Override
@Deprecated
public TextureAtlasSprite getParticleTexture()
{
return familyModel.getParticleTexture();

View File

@ -34,8 +34,8 @@
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.ServerWorld;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import javax.annotation.Nonnull;
import java.util.*;

View File

@ -35,7 +35,6 @@ public final void updateBlock()
markDirty();
BlockPos pos = getPos();
BlockState state = getBlockState();
getWorld().markForRerender( pos );
getWorld().notifyBlockUpdate( pos, state, state, 3 );
}

View File

@ -25,8 +25,8 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.ServerWorld;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.storage.loot.LootContext;
import net.minecraft.world.storage.loot.LootParameters;

View File

@ -23,7 +23,7 @@
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.GameRules;
import net.minecraft.world.ServerWorld;
import net.minecraft.world.server.ServerWorld;
import javax.annotation.Nonnull;
import java.util.HashMap;

View File

@ -509,28 +509,6 @@ private synchronized void ejectContents( boolean destroyed )
if( !destroyed ) getWorld().playBroadcastSound( 1000, getPos(), 0 );
}
@Override
protected void readDescription( @Nonnull CompoundNBT nbt )
{
super.readDescription( nbt );
customName = nbt.contains( NBT_NAME ) ? ITextComponent.Serializer.fromJson( nbt.getString( NBT_NAME ) ) : null;
m_diskStack = nbt.contains( NBT_ITEM ) ? ItemStack.read( nbt.getCompound( NBT_ITEM ) ) : ItemStack.EMPTY;
updateBlock();
}
@Override
protected void writeDescription( @Nonnull CompoundNBT nbt )
{
super.writeDescription( nbt );
if( customName != null ) nbt.putString( NBT_NAME, ITextComponent.Serializer.toJson( customName ) );
if( !m_diskStack.isEmpty() )
{
CompoundNBT item = new CompoundNBT();
m_diskStack.write( item );
nbt.put( NBT_ITEM, item );
}
}
// Private methods
private void playRecord()

View File

@ -34,7 +34,7 @@ private ContainerPrinter( int id, PlayerInventory player, IInventory inventory,
this.properties = properties;
this.inventory = inventory;
func_216961_a( properties );
trackIntArray( properties );
// Ink slot
addSlot( new Slot( inventory, 0, 13, 35 ) );

View File

@ -149,21 +149,6 @@ public CompoundNBT write( CompoundNBT nbt )
return super.write( nbt );
}
@Override
protected void writeDescription( @Nonnull CompoundNBT nbt )
{
super.writeDescription( nbt );
if( customName != null ) nbt.putString( NBT_NAME, ITextComponent.Serializer.toJson( customName ) );
}
@Override
public void readDescription( @Nonnull CompoundNBT nbt )
{
super.readDescription( nbt );
customName = nbt.contains( NBT_NAME ) ? ITextComponent.Serializer.fromJson( nbt.getString( NBT_NAME ) ) : null;
updateBlock();
}
public boolean isPrinting()
{
return m_printing;

View File

@ -563,7 +563,6 @@ protected void readDescription( @Nonnull CompoundNBT nbt )
{
super.readDescription( nbt );
m_brain.readDescription( nbt );
updateBlock();
}
// Privates

View File

@ -14,8 +14,8 @@
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ServerWorld;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import javax.annotation.Nonnull;

View File

@ -17,7 +17,7 @@
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.ServerWorld;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.util.FakePlayer;
import javax.annotation.Nonnull;

View File

@ -44,7 +44,7 @@ private ContainerTurtle(
super( TYPE, id, canUse, computer, family );
this.properties = properties;
func_216961_a( properties );
trackIntArray( properties );
// Turtle inventory
for( int y = 0; y < 4; y++ )

View File

@ -15,8 +15,8 @@
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.IRecipeType;
import net.minecraft.util.NonNullList;
import net.minecraft.world.ServerWorld;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.fml.hooks.BasicEventHooks;

View File

@ -6,16 +6,10 @@
package dan200.computercraft.shared.util;
import com.mojang.datafixers.DataFixUtils;
import com.mojang.datafixers.types.Type;
import dan200.computercraft.ComputerCraft;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SharedConstants;
import net.minecraft.util.datafix.DataFixesManager;
import net.minecraft.util.datafix.TypeReferences;
import javax.annotation.Nonnull;
import java.util.Collections;
@ -30,7 +24,7 @@ public final class NamedTileEntityType<T extends TileEntity> extends TileEntityT
private NamedTileEntityType( ResourceLocation identifier, Supplier<? extends T> supplier )
{
super( supplier, Collections.emptySet(), getDatafixer( identifier ) );
super( supplier, Collections.emptySet(), null );
this.identifier = identifier;
setRegistryName( identifier );
}
@ -62,22 +56,6 @@ public ResourceLocation getId()
return identifier;
}
private static Type<?> getDatafixer( ResourceLocation id )
{
try
{
return DataFixesManager.getDataFixer()
.getSchema( DataFixUtils.makeKey( ComputerCraft.DATAFIXER_VERSION ) )
.getChoiceType( TypeReferences.BLOCK_ENTITY, id.toString() );
}
catch( IllegalArgumentException e )
{
if( SharedConstants.developmentMode ) throw e;
ComputerCraft.log.warn( "No data fixer registered for block entity " + id );
return null;
}
}
private static final class FixedPointSupplier<T extends TileEntity> implements Supplier<T>
{
final NamedTileEntityType<T> factory;

View File

@ -1,5 +1,5 @@
modLoader="javafml"
loaderVersion="[27,28)"
loaderVersion="[28,29)"
issueTrackerURL="https://github.com/SquidDev-CC/CC-Tweaked/issues"
displayURL="https://github.com/SquidDev-CC/CC-Tweaked"
@ -19,6 +19,6 @@ CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles a
[[dependencies.computercraft]]
modId="forge"
mandatory=true
versionRange="[27,28)"
versionRange="[28,29)"
ordering="NONE"
side="BOTH"