|
98 | 98 | import net.minecraft.world.inventory.ClickAction;
|
99 | 99 | import net.minecraft.world.inventory.ContainerLevelAccess;
|
100 | 100 | import net.minecraft.world.inventory.Slot;
|
101 |
| -import net.minecraft.world.item.AdventureModePredicate; |
102 |
| -import net.minecraft.world.item.BucketItem; |
103 |
| -import net.minecraft.world.item.CreativeModeTab; |
104 |
| -import net.minecraft.world.item.EnchantedBookItem; |
105 |
| -import net.minecraft.world.item.Item; |
106 |
| -import net.minecraft.world.item.ItemStack; |
107 |
| -import net.minecraft.world.item.PotionItem; |
108 |
| -import net.minecraft.world.item.SpawnEggItem; |
109 |
| -import net.minecraft.world.item.Tiers; |
110 |
| -import net.minecraft.world.item.TippedArrowItem; |
| 101 | +import net.minecraft.world.item.*; |
111 | 102 | import net.minecraft.world.item.alchemy.Potion;
|
112 | 103 | import net.minecraft.world.item.alchemy.PotionContents;
|
113 | 104 | import net.minecraft.world.item.context.UseOnContext;
|
|
124 | 115 | import net.minecraft.world.level.biome.MobSpawnSettings;
|
125 | 116 | import net.minecraft.world.level.block.Block;
|
126 | 117 | import net.minecraft.world.level.block.Blocks;
|
| 118 | +import net.minecraft.world.level.block.WeatheringCopper; |
127 | 119 | import net.minecraft.world.level.block.entity.BlockEntity;
|
128 | 120 | import net.minecraft.world.level.block.state.BlockState;
|
129 | 121 | import net.minecraft.world.level.block.state.pattern.BlockInWorld;
|
@@ -1360,4 +1352,30 @@ public static void onChunkUnload(PoiManager poiManager, ChunkAccess chunkAccess)
|
1360 | 1352 | poiManager.remove(sectionPosKey);
|
1361 | 1353 | }
|
1362 | 1354 | }
|
| 1355 | + |
| 1356 | + /** |
| 1357 | + * Registers a before and after blocks that can oxidize and de-oxidize |
| 1358 | + * |
| 1359 | + * @param before block with less oxidization |
| 1360 | + * @param after block with more oxidization |
| 1361 | + */ |
| 1362 | + public static void registerOxidizableBlock(Block before, Block after) { |
| 1363 | + Objects.requireNonNull(before, "Oxidizable Block before must not be null"); |
| 1364 | + Objects.requireNonNull(after, "Oxidizable Block after must not be null"); |
| 1365 | + |
| 1366 | + WeatheringCopper.NEXT_BY_BLOCK.get().put(before, after); |
| 1367 | + } |
| 1368 | + |
| 1369 | + /** |
| 1370 | + * Registers a before and after blocks that can be waxed and unwaxed |
| 1371 | + * |
| 1372 | + * @param before the unwaxed block |
| 1373 | + * @param after the waxed block |
| 1374 | + */ |
| 1375 | + public static void registerWaxableBlock(Block before, Block after) { |
| 1376 | + Objects.requireNonNull(before, "Waxable before before must not be null"); |
| 1377 | + Objects.requireNonNull(after, "Waxable Block after must not be null"); |
| 1378 | + |
| 1379 | + HoneycombItem.WAXABLES.get().put(before, after); |
| 1380 | + } |
1363 | 1381 | }
|
0 commit comments