mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-20 16:37:39 +00:00
Fix several off-by-one issues in UploadFileMessage
We now fuzz UploadFileMessage, generating random files and checking they round-trip correctly. The joy of having a long-lasting refactor branch with an absolutely massive diff, is that you end up spotting bugs, and then it's a massive pain to merge the fix back into trunk!
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This file is part of ComputerCraft - http://www.computercraft.info
|
||||
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
|
||||
* Send enquiries to dratcliffe@gmail.com
|
||||
*/
|
||||
package dan200.computercraft.support;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.container.Container;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class FakeContainer extends Container
|
||||
{
|
||||
public FakeContainer()
|
||||
{
|
||||
super( null, 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stillValid( @Nonnull PlayerEntity player )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user