Skip to content

Commit

Permalink
Update to 24w11a.
Browse files Browse the repository at this point in the history
- Update to 24w11a (thanks to Hugman76)
- Deprecate SpriteIdentifierRegistry
  • Loading branch information
gniftygnome committed Mar 15, 2024
1 parent 4d1431a commit 3302bf1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fabric.loom.multiProjectOptimisation=true
maven_group=com.terraformersmc.terraform-api
version=10.0.0-alpha.7

minecraft_version=24w10a
yarn_mappings=24w10a+build.7
minecraft_version=24w11a
yarn_mappings=24w11a+build.2
loader_version=0.15.7
fabric_version=0.96.8+1.20.5
fabric_version=0.96.10+1.20.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.terraformersmc.terraform.sign;

import java.util.Collection;
import java.util.List;

import net.minecraft.client.util.SpriteIdentifier;

/**
* @deprecated SpriteIdentifierRegistry is no longer used
*
* <p>It is no longer necessary to separately register the sign sprite identifiers.
* This class is deprecated and will be removed.
* Calls to {@link #addIdentifier(SpriteIdentifier)} are now no-ops.
*/
@Deprecated(forRemoval = true, since = "10.0.0")
public class SpriteIdentifierRegistry {
public static final SpriteIdentifierRegistry INSTANCE = new SpriteIdentifierRegistry();

/**
* @deprecated Ignores the provided sprite identifier
*
* @param sprite Sprite identifier which no longer needs to be registered
*/
@Deprecated(forRemoval = true, since = "10.0.0")
public void addIdentifier(SpriteIdentifier sprite) {
}

/**
* @deprecated Returns an empty list
*
* @return Collection of registered sign sprite identifiers
*/
@Deprecated(forRemoval = true, since = "10.0.0")
public Collection<SpriteIdentifier> getIdentifiers() {
return List.of();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.item.HangingSignItem;
Expand Down Expand Up @@ -72,16 +72,16 @@ public void onInitialize() {
.build();

// Signs
Block sign = new TerraformSignBlock(SIGN_TEXTURE_ID, FabricBlockSettings.copyOf(Blocks.OAK_SIGN).sounds(BlockSoundGroup.ANVIL));
Block sign = new TerraformSignBlock(SIGN_TEXTURE_ID, AbstractBlock.Settings.copy(Blocks.OAK_SIGN).sounds(BlockSoundGroup.ANVIL));
Registry.register(Registries.BLOCK, CUSTOM_SIGN_ID, sign);

Block wallSign = new TerraformWallSignBlock(SIGN_TEXTURE_ID, FabricBlockSettings.copyOf(Blocks.OAK_WALL_SIGN).sounds(BlockSoundGroup.SAND).dropsLike(sign));
Block wallSign = new TerraformWallSignBlock(SIGN_TEXTURE_ID, AbstractBlock.Settings.copy(Blocks.OAK_WALL_SIGN).sounds(BlockSoundGroup.SAND).dropsLike(sign));
Registry.register(Registries.BLOCK, CUSTOM_WALL_SIGN_ID, wallSign);

Block hangingSign = new TerraformHangingSignBlock(HANGING_SIGN_TEXTURE_ID, HANGING_SIGN_GUI_TEXTURE_ID, FabricBlockSettings.copyOf(Blocks.OAK_HANGING_SIGN).sounds(BlockSoundGroup.WOOL));
Block hangingSign = new TerraformHangingSignBlock(HANGING_SIGN_TEXTURE_ID, HANGING_SIGN_GUI_TEXTURE_ID, AbstractBlock.Settings.copy(Blocks.OAK_HANGING_SIGN).sounds(BlockSoundGroup.WOOL));
Registry.register(Registries.BLOCK, CUSTOM_HANGING_SIGN_ID, hangingSign);

Block wallHangingSign = new TerraformWallHangingSignBlock(HANGING_SIGN_TEXTURE_ID, HANGING_SIGN_GUI_TEXTURE_ID, FabricBlockSettings.copyOf(Blocks.OAK_WALL_HANGING_SIGN).sounds(BlockSoundGroup.SCULK_SENSOR).dropsLike(hangingSign));
Block wallHangingSign = new TerraformWallHangingSignBlock(HANGING_SIGN_TEXTURE_ID, HANGING_SIGN_GUI_TEXTURE_ID, AbstractBlock.Settings.copy(Blocks.OAK_WALL_HANGING_SIGN).sounds(BlockSoundGroup.SCULK_SENSOR).dropsLike(hangingSign));
Registry.register(Registries.BLOCK, CUSTOM_WALL_HANGING_SIGN_ID, wallHangingSign);

Item signItem = new SignItem(new Item.Settings().maxCount(16), sign, wallSign);
Expand Down

0 comments on commit 3302bf1

Please sign in to comment.