1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 22:53:22 +00:00

Bump version to 1.100.6

This commit is contained in:
Jonathan Coates 2022-06-09 23:41:16 +01:00
parent cbbb34cdd4
commit 1e044aed68
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
10 changed files with 47 additions and 17 deletions

View File

@ -1,5 +1,5 @@
# Mod properties
mod_version=1.100.5
mod_version=1.100.6
# Minecraft properties (update mods.toml when changing)
mc_version=1.16.5

View File

@ -232,7 +232,7 @@ public static void registerAPIFactory( @Nonnull ILuaAPIFactory factory )
* @param type The type of object that this provider can provide details for. Should be {@link BlockReference},
* {@link FluidStack} or {@link ItemStack}.
* @param provider The detail provider to register.
* @param <T> The type of object that this provider can provide details for.
* @param <T> The type of object that this provider can provide details for.
*/
public static <T> void registerDetailProvider( @Nonnull Class<T> type, @Nonnull IDetailProvider<T> provider )
{

View File

@ -64,14 +64,14 @@ public abstract void provideDetails( @Nonnull Map<? super String, Object> data,
public void provideDetails( @Nonnull Map<? super String, Object> data, @Nonnull ItemStack stack )
{
Item item = stack.getItem();
if ( !itemType.isInstance( item ) ) return;
if( !itemType.isInstance( item ) ) return;
// If `namespace` is specified, insert into a new data map instead of the existing one.
Map<? super String, Object> child = namespace == null ? data : new HashMap<>();
provideDetails( child, stack, itemType.cast( item ) );
if ( namespace != null )
if( namespace != null )
{
data.put( namespace, child );
}

View File

@ -12,7 +12,6 @@
* This interface is used to provide details about a block, fluid, or item.
*
* @param <T> The type of object that this provider can provide details for.
*
* @see dan200.computercraft.api.ComputerCraftAPI#registerDetailProvider(Class, IDetailProvider)
*/
@FunctionalInterface

View File

@ -6,7 +6,10 @@
package dan200.computercraft.core.lua;
import dan200.computercraft.ComputerCraft;
import dan200.computercraft.api.lua.*;
import dan200.computercraft.api.lua.IDynamicLuaObject;
import dan200.computercraft.api.lua.ILuaAPI;
import dan200.computercraft.api.lua.ILuaContext;
import dan200.computercraft.api.lua.ILuaFunction;
import dan200.computercraft.core.asm.LuaMethod;
import dan200.computercraft.core.asm.ObjectSource;
import dan200.computercraft.core.computer.Computer;
@ -14,7 +17,6 @@
import dan200.computercraft.core.tracking.Tracking;
import dan200.computercraft.core.tracking.TrackingField;
import dan200.computercraft.shared.util.ThreadUtils;
import org.squiddev.cobalt.LuaTable;
import org.squiddev.cobalt.*;
import org.squiddev.cobalt.compiler.CompileException;
import org.squiddev.cobalt.compiler.LoadState;

View File

@ -6,7 +6,10 @@
package dan200.computercraft.core.lua;
import dan200.computercraft.ComputerCraft;
import dan200.computercraft.api.lua.*;
import dan200.computercraft.api.lua.ILuaCallback;
import dan200.computercraft.api.lua.ILuaContext;
import dan200.computercraft.api.lua.LuaException;
import dan200.computercraft.api.lua.MethodResult;
import dan200.computercraft.core.asm.LuaMethod;
import org.squiddev.cobalt.*;
import org.squiddev.cobalt.debug.DebugFrame;

View File

@ -21,7 +21,7 @@ public static synchronized <T> void registerProvider( Class<T> type, IDetailProv
Objects.requireNonNull( type, "type cannot be null" );
Objects.requireNonNull( provider, "provider cannot be null" );
if ( type != BlockReference.class && type != ItemStack.class && type != FluidStack.class )
if( type != BlockReference.class && type != ItemStack.class && type != FluidStack.class )
{
throw new IllegalArgumentException( "type must be assignable from BlockReference, ItemStack or FluidStack" );
}
@ -33,9 +33,9 @@ public static synchronized <T> void registerProvider( Class<T> type, IDetailProv
public static <T> void fillData( Class<T> type, Map<? super String, Object> data, T value )
{
Collection<IDetailProvider<T>> providers = (Collection<IDetailProvider<T>>) (Object) allProviders.get( type );
if ( providers == null ) return;
if( providers == null ) return;
for ( IDetailProvider<T> provider : providers )
for( IDetailProvider<T> provider : providers )
{
provider.provideDetails( data, value );
}

View File

@ -37,7 +37,10 @@ private ContainerPrinter( int id, PlayerInventory player, IInventory inventory,
addSlot( new ValidatingSlot( inventory, 0, 13, 35, TilePrinter::isInk ) );
// In-tray
for( int x = 0; x < 6; x++ ) addSlot( new ValidatingSlot( inventory, x + 1, 61 + x * 18, 22, TilePrinter::isPaper ) );
for( int x = 0; x < 6; x++ )
{
addSlot( new ValidatingSlot( inventory, x + 1, 61 + x * 18, 22, TilePrinter::isPaper ) );
}
// Out-tray
for( int x = 0; x < 6; x++ ) addSlot( new ValidatingSlot( inventory, x + 7, 61 + x * 18, 49, o -> false ) );

View File

@ -1,3 +1,19 @@
# New features in CC: Tweaked 1.100.6
* Various documentation improvements (MCJack123, FayneAldan).
* Allow CC's blocks to be rotated when used in structure blocks (Seniorendi).
* Several performance improvements to computer execution.
* Add parse_empty_array option to textutils.unserialiseJSON (@ChickChicky).
* Add an API to allow other mods to provide extra item/block details (Lemmmy).
* All blocks with GUIs can now be "locked" (via a command or NBT editing tools) like vanilla inventories. Players can only interact with them with a specific named item.
Several bug fixes:
* Fix printouts being rendered with an offset in item frames (coolsa).
* Reduce position latency when playing audio with a noisy pocket computer.
* Fix total counts in /computercraft turn-on/shutdown commands.
* Fix "Run" command not working in the editor when run from a subdirectory (Wojbie).
* Pocket computers correctly preserve their on state.
# New features in CC: Tweaked 1.100.5
* Generic peripherals now use capabilities on the given side if one isn't provided on the internal side.

View File

@ -1,10 +1,17 @@
New features in CC: Tweaked 1.100.5
New features in CC: Tweaked 1.100.6
* Generic peripherals now use capabilities on the given side if one isn't provided on the internal side.
* Improve performance of monitor rendering.
* Various documentation improvements (MCJack123, FayneAldan).
* Allow CC's blocks to be rotated when used in structure blocks (Seniorendi).
* Several performance improvements to computer execution.
* Add parse_empty_array option to textutils.unserialiseJSON (@ChickChicky).
* Add an API to allow other mods to provide extra item/block details (Lemmmy).
* All blocks with GUIs can now be "locked" (via a command or NBT editing tools) like vanilla inventories. Players can only interact with them with a specific named item.
Several bug fixes:
* Various documentation fixes (bclindner, Hasaabitt)
* Speaker sounds are now correctly positioned on the centre of the speaker block.
* Fix printouts being rendered with an offset in item frames (coolsa).
* Reduce position latency when playing audio with a noisy pocket computer.
* Fix total counts in /computercraft turn-on/shutdown commands.
* Fix "Run" command not working in the editor when run from a subdirectory (Wojbie).
* Pocket computers correctly preserve their on state.
Type "help changelog" to see the full version history.