Get the build working I guess?

This commit is contained in:
SquidDev 2019-06-09 09:07:31 +01:00
parent 15d4a55cd8
commit d9cadf64e8
11 changed files with 13 additions and 13 deletions

View File

@ -149,7 +149,7 @@
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true" />
<property name="ignoreEnhancedForColon" value="false" />
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,DO_WHILE,EQUAL,GE,GT,LAMBDA,LAND,LCURLY,LE,LITERAL_RETURN,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND" />
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAMBDA,LAND,LCURLY,LE,LITERAL_RETURN,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND" />
</module>
</module>

View File

@ -12,12 +12,10 @@
import dan200.computercraft.shared.media.items.ItemDisk;
import dan200.computercraft.shared.pocket.items.ItemPocketComputer;
import dan200.computercraft.shared.util.Colour;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.resources.IResourceManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.ColorHandlerEvent;
@ -79,11 +77,13 @@ public static void registerModels( ModelRegistryEvent event )
@SubscribeEvent
public static void onTextureStitchEvent( TextureStitchEvent.Pre event )
{
/*
IResourceManager manager = Minecraft.getInstance().getResourceManager();
for( String extra : EXTRA_TEXTURES )
{
// TODO: event.getMap().registerSprite( manager, new ResourceLocation( ComputerCraft.MOD_ID, extra ) );
}
*/
}
@SubscribeEvent

View File

@ -94,8 +94,8 @@ private void renderTurtleAt( TileTurtle turtle, double posX, double posY, double
GameRenderer.drawNameplate(
getFontRenderer(), label,
(float) posX + 0.5F, (float) posY + 1.2F, (float) posZ + 0.5F, 0,
rendererDispatcher.field_217666_g.func_216778_f(), rendererDispatcher.field_217666_g.func_216777_e(), false
// yaw, pitch
rendererDispatcher.field_217666_g.func_216778_f(), rendererDispatcher.field_217666_g.func_216777_e(), false
);
setLightmapDisabled( false );
}

View File

@ -333,7 +333,7 @@ void connectionsChanged()
for( Direction facing : DirectionUtil.FACINGS )
{
BlockPos offset = current.offset( facing );
if( !world.isBlockLoaded( offset ) ) continue;
if( !world.isAreaLoaded( offset, 0 ) ) continue;
LazyOptional<IWiredElement> element = ComputerCraftAPI.getWiredElementAt( world, offset, facing.getOpposite() );
if( !element.isPresent() ) continue;

View File

@ -286,7 +286,7 @@ private void connectionsChanged()
for( Direction facing : DirectionUtil.FACINGS )
{
BlockPos offset = current.offset( facing );
if( !world.isBlockLoaded( offset ) ) continue;
if( !world.isAreaLoaded( offset, 0 ) ) continue;
LazyOptional<IWiredElement> element = ComputerCraftAPI.getWiredElementAt( world, offset, facing.getOpposite() );
if( !element.isPresent() ) continue;

View File

@ -362,7 +362,7 @@ private TileMonitor getSimilarMonitorAt( BlockPos pos )
int y = pos.getY();
World world = getWorld();
if( world == null || !world.isBlockLoaded( pos ) ) return null;
if( world == null || !world.isAreaLoaded( pos, 0 ) ) return null;
TileEntity tile = world.getTileEntity( pos );
if( !(tile instanceof TileMonitor) ) return null;

View File

@ -306,7 +306,7 @@ public boolean teleportTo( @Nonnull World world, @Nonnull BlockPos pos )
}
// Ensure the chunk is loaded
if( !world.isBlockLoaded( pos ) ) return false;
if( !world.isAreaLoaded( pos, 0 ) ) return false;
// Ensure we're inside the world border
if( !world.getWorldBorder().contains( pos ) ) return false;

View File

@ -146,7 +146,7 @@ private static TurtleCommandResult canEnter( TurtlePlayer turtlePlayer, World wo
return TurtleCommandResult.failure( "Cannot enter protected area" );
}
if( !world.isBlockLoaded( position ) ) return TurtleCommandResult.failure( "Cannot leave loaded world" );
if( !world.isAreaLoaded( position, 0 ) ) return TurtleCommandResult.failure( "Cannot leave loaded world" );
if( !world.getWorldBorder().contains( position ) )
{
return TurtleCommandResult.failure( "Cannot pass the world border" );

View File

@ -59,7 +59,7 @@ public static void tick( TickEvent.ServerTickEvent event )
World world = tile.getWorld();
BlockPos pos = tile.getPos();
if( world != null && pos != null && world.isBlockLoaded( pos ) && world.getTileEntity( pos ) == tile )
if( world != null && pos != null && world.isAreaLoaded( pos, 0 ) && world.getTileEntity( pos ) == tile )
{
world.getPendingBlockTicks().scheduleTick( pos, tile.getBlockState().getBlock(), 0 );
}

View File

@ -40,7 +40,7 @@ public void testWriteTruncates() throws FileSystemException, LuaException, IOExc
wrapper.call( "close" );
}
assertEquals( "This is a long line", Files.toString( new File( ROOT, "out.txt" ), StandardCharsets.UTF_8 ) );
assertEquals( "This is a long line", Files.asCharSource( new File( ROOT, "out.txt" ), StandardCharsets.UTF_8 ).read() );
{
FileSystemWrapper<BufferedWriter> writer = fs.openForWrite( "out.txt", false, EncodedWritableHandle::openUtf8 );
@ -49,6 +49,6 @@ public void testWriteTruncates() throws FileSystemException, LuaException, IOExc
wrapper.call( "close" );
}
assertEquals( "Tiny line", Files.toString( new File( ROOT, "out.txt" ), StandardCharsets.UTF_8 ) );
assertEquals( "Tiny line", Files.asCharSource( new File( ROOT, "out.txt" ), StandardCharsets.UTF_8 ).read() );
}
}

View File

@ -28,7 +28,7 @@ public class ResourceMountTest
@BeforeEach
public void before()
{
SimpleReloadableResourceManager manager = new SimpleReloadableResourceManager( ResourcePackType.SERVER_DATA );
SimpleReloadableResourceManager manager = new SimpleReloadableResourceManager( ResourcePackType.SERVER_DATA, null );
manager.addResourcePack( new FolderPack( new File( "src/main/resources" ) ) );
mount = new ResourceMount( "computercraft", "lua/rom", manager );