mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-11 18:00:29 +00:00
Some post-merge cleanup
This commit is contained in:
parent
d7729337ac
commit
759d02a249
@ -47,7 +47,7 @@ minecraft {
|
||||
}
|
||||
|
||||
server {
|
||||
workingDirectory project.file('run')
|
||||
workingDirectory project.file("run/server-${mc_version}")
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
@ -99,8 +99,8 @@ dependencies {
|
||||
|
||||
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
|
||||
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2")
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.3:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.3")
|
||||
|
||||
shade 'org.squiddev:Cobalt:0.5.1-SNAPSHOT'
|
||||
|
||||
|
@ -6,14 +6,15 @@
|
||||
|
||||
package dan200.computercraft.client.render;
|
||||
|
||||
import dan200.computercraft.ComputerCraft;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import dan200.computercraft.client.gui.GuiComputer;
|
||||
import dan200.computercraft.shared.turtle.core.TurtlePlayer;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class TurtlePlayerRenderer extends EntityRenderer<TurtlePlayer>
|
||||
{
|
||||
@ -22,16 +23,15 @@ public class TurtlePlayerRenderer extends EntityRenderer<TurtlePlayer>
|
||||
super( renderManager );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public void doRender( @Nonnull TurtlePlayer entity, double x, double y, double z, float entityYaw, float partialTicks )
|
||||
public ResourceLocation getEntityTexture( @Nonnull TurtlePlayer entity )
|
||||
{
|
||||
ComputerCraft.log.error( "Rendering TurtlePlayer on the client side, at {}", entity.getPosition() );
|
||||
return GuiComputer.BACKGROUND_NORMAL;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture( @Nonnull TurtlePlayer entity )
|
||||
public void render( @Nonnull TurtlePlayer entityIn, float entityYaw, float partialTicks, @Nonnull MatrixStack transform, @Nonnull IRenderTypeBuffer buffer, int packedLightIn )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class OSAPI implements ILuaAPI
|
||||
double t = alarm.m_day * 24.0 + alarm.m_time;
|
||||
if( now >= t )
|
||||
{
|
||||
queueLuaEvent( "alarm", new Object[] { entry.getKey() } );
|
||||
queueLuaEvent( "alarm", new Object[] { entry.getIntKey() } );
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ import java.util.OptionalLong;
|
||||
|
||||
class MountWrapper
|
||||
{
|
||||
private String label;
|
||||
private String location;
|
||||
private final String label;
|
||||
private final String location;
|
||||
|
||||
private IMount mount;
|
||||
private IWritableMount writableMount;
|
||||
private final IMount mount;
|
||||
private final IWritableMount writableMount;
|
||||
|
||||
MountWrapper( String label, String location, IMount mount )
|
||||
{
|
||||
@ -36,7 +36,9 @@ class MountWrapper
|
||||
|
||||
MountWrapper( String label, String location, IWritableMount mount )
|
||||
{
|
||||
this( label, location, (IMount) mount );
|
||||
this.label = label;
|
||||
this.location = location;
|
||||
this.mount = mount;
|
||||
writableMount = mount;
|
||||
}
|
||||
|
||||
@ -154,7 +156,7 @@ class MountWrapper
|
||||
{
|
||||
if( mount.exists( path ) && !mount.isDirectory( path ) )
|
||||
{
|
||||
return mount.openChannelForRead( path );
|
||||
return mount.openForRead( path );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -232,7 +234,7 @@ class MountWrapper
|
||||
writableMount.makeDirectory( dir );
|
||||
}
|
||||
}
|
||||
return writableMount.openChannelForWrite( path );
|
||||
return writableMount.openForWrite( path );
|
||||
}
|
||||
}
|
||||
catch( AccessDeniedException e )
|
||||
@ -262,7 +264,7 @@ class MountWrapper
|
||||
writableMount.makeDirectory( dir );
|
||||
}
|
||||
}
|
||||
return writableMount.openChannelForWrite( path );
|
||||
return writableMount.openForWrite( path );
|
||||
}
|
||||
else if( mount.isDirectory( path ) )
|
||||
{
|
||||
@ -270,7 +272,7 @@ class MountWrapper
|
||||
}
|
||||
else
|
||||
{
|
||||
return writableMount.openChannelForAppend( path );
|
||||
return writableMount.openForAppend( path );
|
||||
}
|
||||
}
|
||||
catch( AccessDeniedException e )
|
||||
|
@ -14,9 +14,10 @@ import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.DirectoryCache;
|
||||
import net.minecraft.data.IDataProvider;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.storage.loot.LootParameterSets;
|
||||
import net.minecraft.world.storage.loot.LootTable;
|
||||
import net.minecraft.world.storage.loot.LootTableManager;
|
||||
import net.minecraft.world.storage.loot.ValidationResults;
|
||||
import net.minecraft.world.storage.loot.ValidationTracker;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
@ -42,17 +43,17 @@ public abstract class LootTableProvider implements IDataProvider
|
||||
@Override
|
||||
public void act( @Nonnull DirectoryCache cache )
|
||||
{
|
||||
|
||||
ValidationResults validation = new ValidationResults();
|
||||
Map<ResourceLocation, LootTable> tables = new HashMap<>();
|
||||
ValidationTracker validation = new ValidationTracker( LootParameterSets.GENERIC, x -> null, tables::get );
|
||||
|
||||
registerLoot( ( id, table ) -> {
|
||||
if( tables.containsKey( id ) ) validation.addProblem( "Duplicate loot tables for " + id );
|
||||
if( tables.containsKey( id ) ) validation.func_227530_a_( "Duplicate loot tables for " + id );
|
||||
tables.put( id, table );
|
||||
} );
|
||||
|
||||
tables.forEach( ( key, value ) -> LootTableManager.func_215302_a( validation, key, value, tables::get ) );
|
||||
tables.forEach( ( key, value ) -> LootTableManager.func_227508_a_( validation, key, value ) );
|
||||
|
||||
Multimap<String, String> problems = validation.getProblems();
|
||||
Multimap<String, String> problems = validation.func_227527_a_();
|
||||
if( !problems.isEmpty() )
|
||||
{
|
||||
problems.forEach( ( child, problem ) ->
|
||||
|
@ -54,7 +54,7 @@ public final class ClientMonitor extends ClientTerminal
|
||||
if( buffer != null ) return false;
|
||||
|
||||
deleteBuffers();
|
||||
buffer = new VertexBuffer( FixedWidthFontRenderer.POSITION_COLOR_TEX );
|
||||
buffer = new VertexBuffer( FixedWidthFontRenderer.TYPE.getVertexFormat() );
|
||||
addMonitor();
|
||||
return true;
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
package dan200.computercraft.shared.peripheral.monitor;
|
||||
|
||||
import com.mojang.blaze3d.platform.GLX;
|
||||
import dan200.computercraft.ComputerCraft;
|
||||
import dan200.computercraft.client.render.TileEntityMonitorRenderer;
|
||||
|
||||
@ -73,22 +72,7 @@ public enum MonitorRenderer
|
||||
public static MonitorRenderer current()
|
||||
{
|
||||
MonitorRenderer current = ComputerCraft.monitorRenderer;
|
||||
switch( current )
|
||||
{
|
||||
case BEST:
|
||||
return best();
|
||||
case VBO:
|
||||
if( !GLX.useVbo() )
|
||||
{
|
||||
ComputerCraft.log.warn( "VBOs are not supported on your graphics card. Falling back to default." );
|
||||
ComputerCraft.monitorRenderer = BEST;
|
||||
return best();
|
||||
}
|
||||
|
||||
return VBO;
|
||||
default:
|
||||
return current;
|
||||
}
|
||||
return current == MonitorRenderer.BEST ? best() : current;
|
||||
}
|
||||
|
||||
private static MonitorRenderer best()
|
||||
|
Loading…
Reference in New Issue
Block a user